+
+ To add a new label, enter the username for who you'd like to add the
+ label for, then press the Add New Label button.
+
+ Changes are not automatically saved!
+
+ If there are any unsaved changes an asterisk will appear in the Save
+ All Changes button. To undo all unsaved changes simply refresh the
+ page.
+
+
+
+
+
+
+ Add New Label
+
+
+
+ Save All Changes${hasUnsavedChanges ? '*' : ''}
+
+
+ ${labels}
+
+ `;
+ }
+}
diff --git a/source/scss/_button.scss b/source/scss/_button.scss
new file mode 100644
index 0000000..a5b94fb
--- /dev/null
+++ b/source/scss/_button.scss
@@ -0,0 +1,21 @@
+@mixin button {
+ --button-color: var(--blue);
+ --button-color-alt: var(--dark-blue);
+
+ background-color: var(--button-color);
+ border: none;
+ color: var(--foreground);
+ font-weight: bold;
+ min-width: 15rem;
+ padding: 8px 0;
+
+ &:hover {
+ background-color: var(--button-color-alt);
+ cursor: pointer;
+ }
+
+ &.destructive {
+ --button-color: var(--red);
+ --button-color-alt: var(--dark-red);
+ }
+}
diff --git a/source/scss/_settings.scss b/source/scss/_settings.scss
index 8becd88..c7cd1e7 100644
--- a/source/scss/_settings.scss
+++ b/source/scss/_settings.scss
@@ -60,25 +60,7 @@
}
.button {
- --button-color: var(--blue);
- --button-color-alt: var(--dark-blue);
-
- background-color: var(--button-color);
- border: none;
- color: var(--foreground);
- font-weight: bold;
- min-width: 15rem;
- padding: 8px 0;
-
- &:hover {
- background-color: var(--button-color-alt);
- cursor: pointer;
- }
-
- &.destructive {
- --button-color: var(--red);
- --button-color-alt: var(--dark-red);
- }
+ @include button;
}
.import-export {
diff --git a/source/scss/index.scss b/source/scss/index.scss
index 2c51110..81f2ccd 100644
--- a/source/scss/index.scss
+++ b/source/scss/index.scss
@@ -1,6 +1,7 @@
@import 'reset';
@import 'variables';
@import 'colors';
+@import 'button';
html {
font-size: 62.5%;
@@ -47,7 +48,8 @@ details {
.main-wrapper,
.page-header,
-.page-footer {
+.page-footer,
+.user-label-editor {
margin-left: auto;
margin-right: auto;
width: $large-breakpoint;
diff --git a/source/scss/user-label-editor.scss b/source/scss/user-label-editor.scss
new file mode 100644
index 0000000..db7c5a7
--- /dev/null
+++ b/source/scss/user-label-editor.scss
@@ -0,0 +1,74 @@
+@import 'button';
+
+.user-label-editor {
+ input {
+ background-color: var(--background-primary);
+ border: 1px solid var(--blue);
+ color: var(--foreground);
+ padding: 8px;
+ }
+
+ .button {
+ @include button;
+ }
+
+ .info {
+ border: 1px solid var(--blue);
+ margin-bottom: 8px;
+ padding: 8px;
+ }
+
+ .main-controls {
+ display: flex;
+ gap: 8px;
+ margin-bottom: 8px;
+ }
+}
+
+.groups {
+ display: grid;
+ gap: 8px;
+ grid-template-columns: repeat(1, 1fr);
+}
+
+.group {
+ border: 1px solid var(--blue);
+ padding: 16px;
+
+ h2 {
+ align-items: center;
+ display: flex;
+ gap: 8px;
+ margin-bottom: 16px;
+ }
+
+ input {
+ width: 100%;
+ }
+
+ label {
+ background-color: var(--blue);
+ display: flex;
+ flex-direction: column;
+ padding: 4px;
+ }
+
+ li {
+ display: grid;
+ gap: 8px;
+ grid-template-columns: 40% 30% auto auto;
+ list-style: none;
+ }
+
+ ul {
+ display: grid;
+ gap: 8px;
+ grid-template-columns: repeat(1, 1fr);
+ }
+}
+
+.label-preview {
+ font-size: 60%;
+ padding: 4px 8px;
+ text-shadow: 0 0 2px #000, 0 0 4px #000;
+}
diff --git a/vite.config.ts b/vite.config.ts
index ecce248..20bfb55 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -18,6 +18,7 @@ export default defineConfig({
plugins: [
preact(),
webExtension({
+ additionalInputs: ['options/user-label-editor.html'],
assets: 'assets',
browser: 'firefox',
manifest: path.join(sourceDir, 'manifest.json'),