Merge branch 'main' into 94-add-gps-reporting-to-the-background-service

This commit is contained in:
Philip Abbey
2024-01-29 20:37:56 +00:00
2 changed files with 23 additions and 1 deletions

View File

@ -15,6 +15,11 @@
<style>
@import url('https://unpkg.com/@catppuccin/palette/css/catppuccin.css');
body {
display: flex;
flex-direction: column;
}
html,
body,
#container {
@ -212,6 +217,9 @@
&[icon='download']::before {
background-image: url(https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/download/default/48px.svg);
}
&[icon='copy']::before {
background-image: url(https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/content_copy/default/48px.svg);
}
}
}
</style>
@ -239,6 +247,12 @@
icon="download"
id="download"
type="button"></button>
<button
title="Copy the content of the editor to the clipboard"
class="icon"
icon="copy"
id="copy"
type="button"></button>
<input
required
autocomplete="new-password"

View File

@ -569,6 +569,13 @@ require(['vs/editor/editor.main'], async () => {
document.querySelector('#menu_url').classList.add('invalid');
}
});
document.querySelector('#copy').addEventListener('click', async (e) => {
navigator.clipboard.writeText(model.getValue());
toast({
text: 'Copied!',
color: 'var(--ctp-mocha-green)',
});
});
document.querySelector('#api_url').addEventListener('change', (e) => {
api_url = e.target.value;
@ -661,7 +668,8 @@ require(['vs/editor/editor.main'], async () => {
i--;
} while (
i >= 0 &&
word.word[i].toUpperCase() != word.word[i].toLowerCase()
(word.word[i] == '_' ||
word.word[i].toUpperCase() != word.word[i].toLowerCase())
);
i++;
var range = {