feat(ui): light mode and new theming system (#1468)

This commit is contained in:
Alex
2026-05-26 01:07:33 -04:00
committed by GitHub
parent 3211d7818a
commit 22ff6d8e90
131 changed files with 2816 additions and 3391 deletions
@@ -61,8 +61,8 @@
<strong>{{ t('kobo.twoWaySyncNote') }}</strong>
</p>
@if (syncForm.controls.twoWayProgressSync.value && !koboSettings.convertToKepub) {
<p class="setting-warning" role="status" aria-live="polite" aria-atomic="true">
<i class="pi pi-exclamation-triangle" aria-hidden="true"></i>
<p class="setting-warning border-l-red-700 dark:border-l-red-300" role="status" aria-live="polite" aria-atomic="true">
<i class="pi pi-exclamation-triangle text-red-700 dark:text-red-300" aria-hidden="true"></i>
@if (isAdmin) {
{{ t('kobo.twoWaySyncKepubWarningAdmin') }}
} @else {
@@ -51,7 +51,7 @@
padding: 3rem 2rem;
text-align: center;
color: var(--p-text-muted-color);
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border-radius: 6px;
.pi {
@@ -81,7 +81,7 @@
}
.provider-item {
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-left: 3px solid var(--p-content-border-color);
border-radius: 6px;
@@ -89,7 +89,7 @@
transition: border-color 0.2s ease, background 0.2s ease;
&:hover {
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
background: var(--color-card);
}
&.is-default {
@@ -51,7 +51,7 @@
padding: 3rem 2rem;
text-align: center;
color: var(--p-text-muted-color);
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border-radius: 6px;
.pi {
@@ -81,7 +81,7 @@
}
.recipient-item {
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-left: 3px solid var(--p-content-border-color);
border-radius: 6px;
@@ -89,7 +89,7 @@
transition: border-color 0.2s ease, background 0.2s ease;
&:hover {
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
background: var(--color-card);
}
&.is-default {
@@ -11,10 +11,10 @@
</p>
</div>
<div class="warning-notice">
<i class="pi pi-exclamation-triangle"></i>
<div class="warning-notice border-l-red-700 dark:border-l-red-300">
<i class="pi pi-exclamation-triangle text-red-700 dark:text-red-300"></i>
<div>
<strong>{{ t('warning.title') }}</strong> {{ t('warning.text') }}
<strong class="text-red-700 dark:text-red-300">{{ t('warning.title') }}</strong> {{ t('warning.text') }}
</div>
</div>
@@ -55,7 +55,7 @@
<i class="pi pi-eye"></i>
{{ t('defaultPattern.preview') }}
</span>
<code class="preview-value">{{ generateDefaultPreview() }}</code>
<code class="preview-value text-emerald-700 dark:text-emerald-300">{{ generateDefaultPreview() }}</code>
</div>
</div>
</div>
@@ -120,7 +120,7 @@
<i class="pi pi-eye"></i>
{{ t('libraryOverrides.preview') }}
</span>
<code class="preview-value">{{ generateLibraryPreview(library) }}</code>
<code class="preview-value text-emerald-700 dark:text-emerald-300">{{ generateLibraryPreview(library) }}</code>
</div>
</div>
</div>
@@ -160,16 +160,16 @@
{{ t('placeholders.available') }}
</h4>
<div class="placeholder-list">
<div class="placeholder-item"><code>{{ '{title}' }}</code><span>{{ t('placeholders.title') }}</span></div>
<div class="placeholder-item"><code>{{ '{subtitle}' }}</code><span>{{ t('placeholders.subtitle') }}</span></div>
<div class="placeholder-item"><code>{{ '{authors}' }}</code><span>{{ t('placeholders.authors') }}</span></div>
<div class="placeholder-item"><code>{{ '{year}' }}</code><span>{{ t('placeholders.year') }}</span></div>
<div class="placeholder-item"><code>{{ '{series}' }}</code><span>{{ t('placeholders.series') }}</span></div>
<div class="placeholder-item"><code>{{ '{seriesIndex}' }}</code><span>{{ t('placeholders.seriesIndex') }}</span></div>
<div class="placeholder-item"><code>{{ '{language}' }}</code><span>{{ t('placeholders.language') }}</span></div>
<div class="placeholder-item"><code>{{ '{publisher}' }}</code><span>{{ t('placeholders.publisher') }}</span></div>
<div class="placeholder-item"><code>{{ '{isbn}' }}</code><span>{{ t('placeholders.isbn') }}</span></div>
<div class="placeholder-item"><code>{{ '{currentFilename}' }}</code><span>{{ t('placeholders.currentFilename') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{title}' }}</code><span>{{ t('placeholders.title') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{subtitle}' }}</code><span>{{ t('placeholders.subtitle') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{authors}' }}</code><span>{{ t('placeholders.authors') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{year}' }}</code><span>{{ t('placeholders.year') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{series}' }}</code><span>{{ t('placeholders.series') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{seriesIndex}' }}</code><span>{{ t('placeholders.seriesIndex') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{language}' }}</code><span>{{ t('placeholders.language') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{publisher}' }}</code><span>{{ t('placeholders.publisher') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{isbn}' }}</code><span>{{ t('placeholders.isbn') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{currentFilename}' }}</code><span>{{ t('placeholders.currentFilename') }}</span></div>
</div>
</div>
@@ -183,14 +183,14 @@
<div class="example-block">
<div class="example-pattern">
<span class="pattern-prefix">{{ t('placeholders.pattern') }}</span>
<code>{{ '{<{seriesIndex} - >{title}' }}</code>
<code class="text-orange-700 dark:text-orange-300">{{ '{<{seriesIndex} - >{title}' }}</code>
</div>
<div class="example-results">
<div class="result-item">
<div class="result-item text-emerald-700 dark:text-emerald-300">
<span class="result-prefix">{{ t('placeholders.withIndex') }}</span>
<code>01 - Dune</code>
</div>
<div class="result-item">
<div class="result-item text-emerald-700 dark:text-emerald-300">
<span class="result-prefix">{{ t('placeholders.without') }}</span>
<code>Dune</code>
</div>
@@ -208,14 +208,14 @@
<div class="example-block">
<div class="example-pattern">
<span class="pattern-prefix">{{ t('placeholders.pattern') }}</span>
<code>{{ '{<{series}|Standalone>/{title}' }}</code>
<code class="text-orange-700 dark:text-orange-300">{{ '{<{series}|Standalone>/{title}' }}</code>
</div>
<div class="example-results">
<div class="result-item">
<div class="result-item text-emerald-700 dark:text-emerald-300">
<span class="result-prefix">{{ t('placeholders.withSeries') }}</span>
<code>The Kingkiller Chronicle/The Name of the Wind</code>
</div>
<div class="result-item">
<div class="result-item text-emerald-700 dark:text-emerald-300">
<span class="result-prefix">{{ t('placeholders.withoutSeries') }}</span>
<code>Standalone/The Name of the Wind</code>
</div>
@@ -231,11 +231,11 @@
<p class="group-description" [innerHTML]="t('placeholders.modifiersDesc')">
</p>
<div class="placeholder-list">
<div class="placeholder-item"><code>{{ '{authors:first}' }}</code><span>{{ t('placeholders.modFirst') }}</span></div>
<div class="placeholder-item"><code>{{ '{authors:sort}' }}</code><span>{{ t('placeholders.modSort') }}</span></div>
<div class="placeholder-item"><code>{{ '{title:initial}' }}</code><span>{{ t('placeholders.modInitial') }}</span></div>
<div class="placeholder-item"><code>{{ '{title:upper}' }}</code><span>{{ t('placeholders.modUpper') }}</span></div>
<div class="placeholder-item"><code>{{ '{title:lower}' }}</code><span>{{ t('placeholders.modLower') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{authors:first}' }}</code><span>{{ t('placeholders.modFirst') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{authors:sort}' }}</code><span>{{ t('placeholders.modSort') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{title:initial}' }}</code><span>{{ t('placeholders.modInitial') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{title:upper}' }}</code><span>{{ t('placeholders.modUpper') }}</span></div>
<div class="placeholder-item"><code class="text-orange-700 dark:text-orange-300">{{ '{title:lower}' }}</code><span>{{ t('placeholders.modLower') }}</span></div>
</div>
</div>
</div>
@@ -256,9 +256,9 @@
<div class="section-body">
<div class="examples-container">
<div class="metadata-reference">
<div class="metadata-panel metadata-panel-full">
<div class="metadata-panel metadata-panel-full border-l-emerald-500 dark:border-l-emerald-300">
<div class="metadata-panel-header">
<i class="pi pi-check-circle metadata-icon-full"></i>
<i class="pi pi-check-circle metadata-icon-full text-emerald-700 dark:text-emerald-300"></i>
<span>{{ t('examples.fullMetadata') }}</span>
</div>
<div class="metadata-grid">
@@ -270,9 +270,9 @@
<span class="metadata-key">year</span><code class="metadata-val">2007</code>
</div>
</div>
<div class="metadata-panel metadata-panel-partial">
<div class="metadata-panel metadata-panel-partial border-l-orange-700 dark:border-l-orange-300">
<div class="metadata-panel-header">
<i class="pi pi-question-circle metadata-icon-partial"></i>
<i class="pi pi-question-circle metadata-icon-partial text-orange-700 dark:text-orange-300"></i>
<span>{{ t('examples.partialMetadata') }}</span>
</div>
<div class="metadata-grid">
@@ -294,33 +294,33 @@
<div class="example-grid">
<div class="example-row">
<span class="pattern-label">{{ t('examples.basicPattern') }}</span>
<span class="pattern-col"><code>{{ '{authors} - {title}' }}</code></span>
<span class="result-col"><code>Patrick Rothfuss - The Name of the Wind.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{authors} - {title}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>Patrick Rothfuss - The Name of the Wind.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.seriesInFolder') }}</span>
<span class="pattern-col"><code>{{ '{authors}/{series}/{seriesIndex} - {title}' }}</code></span>
<span class="result-col"><code>Patrick Rothfuss/The Kingkiller Chronicle/01 - The Name of the Wind.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{authors}/{series}/{seriesIndex} - {title}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>Patrick Rothfuss/The Kingkiller Chronicle/01 - The Name of the Wind.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.titleSubtitle') }}</span>
<span class="pattern-col"><code>{{ '{title}: {subtitle}' }}</code></span>
<span class="result-col"><code>The Name of the Wind: Special Edition.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{title}: {subtitle}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>The Name of the Wind: Special Edition.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.absolutePath') }}</span>
<span class="pattern-col"><code>{{ '/{authors}/{title}' }}</code></span>
<span class="result-col"><code>/Patrick Rothfuss/The Name of the Wind.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '/{authors}/{title}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>/Patrick Rothfuss/The Name of the Wind.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.folderOnly') }}</span>
<span class="pattern-col"><code>{{ '{title}/' }}</code></span>
<span class="result-col"><code>The Name of the Wind/name_of_the_wind_original.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{title}/' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>The Name of the Wind/name_of_the_wind_original.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.yearPrefix') }}</span>
<span class="pattern-col"><code>{{ '({year}) {title}' }}</code></span>
<span class="result-col"><code>(2007) The Name of the Wind.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '({year}) {title}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>(2007) The Name of the Wind.epub</code></span>
</div>
</div>
</div>
@@ -335,50 +335,50 @@
<div class="example-grid">
<div class="example-row-conditional">
<span class="pattern-label">{{ t('examples.optionalBlock') }}</span>
<span class="pattern-col"><code>{{ '<{seriesIndex}. >{title}' }}</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '<{seriesIndex}. >{title}' }}</code></span>
<div class="result-col-dual">
<span class="result-with"><i class="pi pi-check-circle"></i> <code>01. The Name of the Wind.epub</code></span>
<span class="result-without"><i class="pi pi-question-circle"></i> <code>Project Hail Mary.epub</code></span>
<span class="result-with text-emerald-700 dark:text-emerald-300"><i class="pi pi-check-circle"></i> <code>01. The Name of the Wind.epub</code></span>
<span class="result-without text-orange-700 dark:text-orange-300"><i class="pi pi-question-circle"></i> <code>Project Hail Mary.epub</code></span>
</div>
</div>
<div class="example-row-conditional">
<span class="pattern-label">{{ t('examples.subtitleConditional') }}</span>
<span class="pattern-col"><code>{{ '{title}<: {subtitle}>' }}</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{title}<: {subtitle}>' }}</code></span>
<div class="result-col-dual">
<span class="result-with"><i class="pi pi-check-circle"></i> <code>The Name of the Wind: Special Edition.epub</code></span>
<span class="result-without"><i class="pi pi-question-circle"></i> <code>Project Hail Mary.epub</code></span>
<span class="result-with text-emerald-700 dark:text-emerald-300"><i class="pi pi-check-circle"></i> <code>The Name of the Wind: Special Edition.epub</code></span>
<span class="result-without text-orange-700 dark:text-orange-300"><i class="pi pi-question-circle"></i> <code>Project Hail Mary.epub</code></span>
</div>
</div>
<div class="example-row-conditional">
<span class="pattern-label">{{ t('examples.multipleOptional') }}</span>
<span class="pattern-col"><code>{{ '{authors}/<{series}/><{seriesIndex}. >{title}< ({year})>' }}</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{authors}/<{series}/><{seriesIndex}. >{title}< ({year})>' }}</code></span>
<div class="result-col-dual">
<span class="result-with"><i class="pi pi-check-circle"></i> <code>Patrick Rothfuss/The Kingkiller Chronicle/01. The Name of the Wind (2007).epub</code></span>
<span class="result-without"><i class="pi pi-question-circle"></i> <code>Andy Weir/Project Hail Mary (2021).epub</code></span>
<span class="result-with text-emerald-700 dark:text-emerald-300"><i class="pi pi-check-circle"></i> <code>Patrick Rothfuss/The Kingkiller Chronicle/01. The Name of the Wind (2007).epub</code></span>
<span class="result-without text-orange-700 dark:text-orange-300"><i class="pi pi-question-circle"></i> <code>Andy Weir/Project Hail Mary (2021).epub</code></span>
</div>
</div>
<div class="example-row-conditional">
<span class="pattern-label">{{ t('examples.elseClause') }}</span>
<span class="pattern-col"><code>{{ '<{series}|Standalone>/{title}' }}</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '<{series}|Standalone>/{title}' }}</code></span>
<div class="result-col-dual">
<span class="result-with"><i class="pi pi-check-circle"></i> <code>The Kingkiller Chronicle/The Name of the Wind.epub</code></span>
<span class="result-without"><i class="pi pi-question-circle"></i> <code>Standalone/Project Hail Mary.epub</code></span>
<span class="result-with text-emerald-700 dark:text-emerald-300"><i class="pi pi-check-circle"></i> <code>The Kingkiller Chronicle/The Name of the Wind.epub</code></span>
<span class="result-without text-orange-700 dark:text-orange-300"><i class="pi pi-question-circle"></i> <code>Standalone/Project Hail Mary.epub</code></span>
</div>
</div>
<div class="example-row-conditional">
<span class="pattern-label">{{ t('examples.elseClauseFallback') }}</span>
<span class="pattern-col"><code>{{ '<{series}/{seriesIndex} - {title}|{title}>' }}</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '<{series}/{seriesIndex} - {title}|{title}>' }}</code></span>
<div class="result-col-dual">
<span class="result-with"><i class="pi pi-check-circle"></i> <code>The Kingkiller Chronicle/01 - The Name of the Wind.epub</code></span>
<span class="result-without"><i class="pi pi-question-circle"></i> <code>Project Hail Mary.epub</code></span>
<span class="result-with text-emerald-700 dark:text-emerald-300"><i class="pi pi-check-circle"></i> <code>The Kingkiller Chronicle/01 - The Name of the Wind.epub</code></span>
<span class="result-without text-orange-700 dark:text-orange-300"><i class="pi pi-question-circle"></i> <code>Project Hail Mary.epub</code></span>
</div>
</div>
<div class="example-row-conditional">
<span class="pattern-label">{{ t('examples.elseWithModifier') }}</span>
<span class="pattern-col"><code>{{ '<{series}|{authors:sort}>/{title}' }}</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '<{series}|{authors:sort}>/{title}' }}</code></span>
<div class="result-col-dual">
<span class="result-with"><i class="pi pi-check-circle"></i> <code>The Kingkiller Chronicle/The Name of the Wind.epub</code></span>
<span class="result-without"><i class="pi pi-question-circle"></i> <code>Weir, Andy/Project Hail Mary.epub</code></span>
<span class="result-with text-emerald-700 dark:text-emerald-300"><i class="pi pi-check-circle"></i> <code>The Kingkiller Chronicle/The Name of the Wind.epub</code></span>
<span class="result-without text-orange-700 dark:text-orange-300"><i class="pi pi-question-circle"></i> <code>Weir, Andy/Project Hail Mary.epub</code></span>
</div>
</div>
</div>
@@ -394,38 +394,38 @@
<div class="example-grid">
<div class="example-row">
<span class="pattern-label">{{ t('examples.modifierSort') }}</span>
<span class="pattern-col"><code>{{ '{authors:sort}/{title}' }}</code></span>
<span class="result-col"><code>Rothfuss, Patrick/The Name of the Wind.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{authors:sort}/{title}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>Rothfuss, Patrick/The Name of the Wind.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.modifierInitial') }}</span>
<span class="pattern-col"><code>{{ '{authors:initial}/{authors:sort}/{title}' }}</code></span>
<span class="result-col"><code>R/Rothfuss, Patrick/The Name of the Wind.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{authors:initial}/{authors:sort}/{title}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>R/Rothfuss, Patrick/The Name of the Wind.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.modFirst') }}</span>
<span class="pattern-col"><code>{{ '{authors:first}/{title}' }}</code></span>
<span class="result-col"><code>Patrick Rothfuss/The Name of the Wind.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{authors:first}/{title}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>Patrick Rothfuss/The Name of the Wind.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.modUpper') }}</span>
<span class="pattern-col"><code>{{ '{title:upper}' }}</code></span>
<span class="result-col"><code>THE NAME OF THE WIND.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{title:upper}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>THE NAME OF THE WIND.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.modLower') }}</span>
<span class="pattern-col"><code>{{ '{title:lower}' }}</code></span>
<span class="result-col"><code>the name of the wind.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{title:lower}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>the name of the wind.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.letterFolder') }}</span>
<span class="pattern-col"><code>{{ '{title:initial}/{authors}/{title}' }}</code></span>
<span class="result-col"><code>T/Patrick Rothfuss/The Name of the Wind.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{title:initial}/{authors}/{title}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>T/Patrick Rothfuss/The Name of the Wind.epub</code></span>
</div>
<div class="example-row">
<span class="pattern-label">{{ t('examples.combinedMods') }}</span>
<span class="pattern-col"><code>{{ '{authors:sort} - {title:lower}' }}</code></span>
<span class="result-col"><code>Rothfuss, Patrick - the name of the wind.epub</code></span>
<span class="pattern-col text-orange-700 dark:text-orange-300"><code>{{ '{authors:sort} - {title:lower}' }}</code></span>
<span class="result-col text-emerald-700 dark:text-emerald-300"><code>Rothfuss, Patrick - the name of the wind.epub</code></span>
</div>
</div>
</div>
@@ -53,7 +53,7 @@
padding: 3rem 2rem;
text-align: center;
color: var(--p-text-muted-color);
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border-radius: 6px;
.pi {
@@ -77,7 +77,7 @@
// Default pattern card
.default-pattern-card {
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-left: 3px solid var(--p-primary-color);
border-radius: 6px;
@@ -141,7 +141,6 @@
}
.preview-value {
color: var(--p-green-400);
font-size: settings.$settings-section-description-size;
background: transparent;
padding: 0;
@@ -156,14 +155,14 @@
}
.library-item {
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-left: 3px solid var(--p-content-border-color);
border-radius: 6px;
transition: border-color 0.2s ease, background 0.2s ease;
&:hover {
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
background: var(--color-card);
}
&.has-pattern {
@@ -230,8 +229,8 @@
display: inline-flex;
align-items: center;
padding: 0.125rem 0.5rem;
background: color-mix(in srgb, #6b7280 15%, transparent);
color: #6b7280;
background: color-mix(in srgb, var(--color-text-secondary) 15%, transparent);
color: var(--color-text-secondary);
border-radius: 12px;
font-size: 0.625rem;
font-weight: 700;
@@ -260,7 +259,7 @@
}
.placeholder-group {
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border-radius: 6px;
padding: 1rem;
border-left: 3px solid var(--p-primary-color);
@@ -292,7 +291,7 @@
margin: 0 0 0.75rem;
code {
color: var(--p-orange-400);
color: var(--color-primary);
font-size: settings.$settings-description-size;
}
}
@@ -310,7 +309,6 @@
font-size: settings.$settings-section-description-size;
code {
color: var(--p-orange-400);
font-size: settings.$settings-description-size;
min-width: 130px;
}
@@ -321,7 +319,7 @@
}
.example-block {
background: color-mix(in srgb, var(--p-surface-800) 30%, transparent);
background: color-mix(in srgb, var(--color-card) 30%, transparent);
border-radius: 4px;
padding: 0.75rem;
}
@@ -338,7 +336,6 @@
}
code {
color: var(--p-orange-400);
font-size: settings.$settings-section-description-size;
}
}
@@ -362,7 +359,6 @@
}
code {
color: var(--p-green-400);
font-size: settings.$settings-description-size;
}
}
@@ -386,18 +382,11 @@
}
.metadata-panel {
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
padding: 1rem 1.25rem;
border-radius: 6px;
border-left: 3px solid var(--p-content-border-color);
&.metadata-panel-full {
border-left-color: var(--p-green-400);
}
&.metadata-panel-partial {
border-left-color: var(--p-orange-400);
}
}
.metadata-panel-header {
@@ -416,14 +405,6 @@
}
}
.metadata-icon-full {
color: var(--p-green-400);
}
.metadata-icon-partial {
color: var(--p-orange-400);
}
.metadata-grid {
display: grid;
grid-template-columns: auto 1fr;
@@ -485,7 +466,7 @@
grid-template-columns: 130px 1fr 1fr;
gap: 0.75rem;
padding: 0.625rem 0.75rem;
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border-radius: 4px;
font-size: settings.$settings-section-description-size;
align-items: center;
@@ -501,7 +482,7 @@
grid-template-columns: 130px 1fr 1fr;
gap: 0.75rem;
padding: 0.625rem 0.75rem;
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border-radius: 4px;
font-size: settings.$settings-section-description-size;
align-items: start;
@@ -525,7 +506,6 @@
.pattern-col {
code {
color: var(--p-orange-400);
font-size: settings.$settings-description-size;
word-break: break-all;
}
@@ -537,14 +517,13 @@
.result-col {
code {
color: var(--p-green-400);
font-size: settings.$settings-description-size;
word-break: break-all;
}
@media (width <= 1024px) {
padding-left: 0.5rem;
border-left: 2px solid var(--p-green-400);
border-left: 2px solid currentcolor;
}
}
@@ -563,27 +542,3 @@
margin-right: 0.25rem;
}
}
.result-with {
color: var(--p-green-400);
.pi {
color: var(--p-green-400);
}
code {
color: var(--p-green-400);
}
}
.result-without {
color: var(--p-orange-400);
.pi {
color: var(--p-orange-400);
}
code {
color: var(--p-orange-400);
}
}
@@ -2,7 +2,7 @@
display: flex;
flex-direction: column;
gap: 1.25rem;
background: var(--card-background);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-radius: 8px;
padding: 1.5rem;
@@ -23,11 +23,11 @@
gap: 0.5rem;
font-size: 1.25rem;
font-weight: 600;
color: var(--text-color);
color: var(--color-text);
margin: 0 0 0.5rem;
.pi {
color: var(--primary-color);
color: var(--color-primary);
font-size: 1.125rem;
}
}
@@ -53,8 +53,8 @@
.setting-item {
padding: 0.875rem 1rem;
border-radius: 6px;
border-left: 3px solid var(--primary-color);
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
border-left: 3px solid var(--color-primary);
background: var(--color-card);
@media (width <= 768px) {
padding: 0.75rem;
@@ -83,7 +83,7 @@
.action-label {
font-size: 0.9375rem;
font-weight: 500;
color: var(--text-color);
color: var(--color-text);
}
.action-description {
@@ -100,7 +100,7 @@
}
.weights-icon {
color: var(--primary-color);
color: var(--color-primary);
font-size: 0.875rem;
flex-shrink: 0;
}
@@ -108,7 +108,7 @@
.weights-label {
font-size: 0.9375rem;
font-weight: 500;
color: var(--text-color);
color: var(--color-text);
margin: 0;
}
@@ -141,14 +141,14 @@
justify-content: space-between;
gap: 0.5rem;
padding: 0.5rem 0.625rem;
background: var(--ground-background);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-radius: 4px;
.field-label {
font-size: 0.875rem;
font-weight: 500;
color: var(--text-color);
color: var(--color-text);
text-transform: capitalize;
}
@@ -89,12 +89,12 @@
}
.p-accordion-header {
background: var(--p-surface-100);
background: var(--color-card);
border: none;
border-radius: 0;
&:hover {
background: var(--p-surface-200);
background: var(--color-card);
}
.p-accordion-header-content {
@@ -154,7 +154,7 @@
.library-name {
font-weight: settings.$settings-section-title-weight;
color: var(--text-color);
color: var(--color-text);
}
.dot-separator {
@@ -21,7 +21,7 @@
</div>
} @else {
<div class="section-notice">
<div class="warning-notice">
<div class="warning-notice warning-notice-danger">
<i class="pi pi-exclamation-triangle"></i>
<div>
<strong>{{ t('networkWarningTitle') }}</strong> {{ t('networkWarning') }}
@@ -26,6 +26,28 @@
@include settings.settings-warning-notice;
}
.warning-notice-danger {
border-left-color: var(--color-red-700);
color: var(--color-red-700);
.pi,
strong {
color: var(--color-red-700);
}
}
:host-context(.dark) {
.warning-notice-danger {
border-left-color: var(--color-red-300);
color: var(--color-red-300);
.pi,
strong {
color: var(--color-red-300);
}
}
}
.info-notice {
@include settings.settings-info-notice;
}
@@ -65,13 +65,13 @@
justify-content: space-between;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
background: var(--ground-background);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-radius: 4px;
transition: border-color 0.2s ease;
&:hover {
border-color: var(--primary-color);
border-color: var(--color-primary);
}
}
@@ -83,7 +83,7 @@
.provider-label {
font-weight: settings.$settings-label-weight;
color: var(--text-color);
color: var(--color-text);
font-size: settings.$settings-description-size;
}
@@ -103,14 +103,14 @@
padding: 0.25rem 0.375rem;
border: 1px solid var(--p-content-border-color);
border-radius: 4px;
background: var(--p-surface-800);
color: var(--text-color);
background: var(--color-card);
color: var(--color-text);
font-size: settings.$settings-description-size;
text-align: center;
&:focus {
outline: none;
border-color: var(--primary-color);
border-color: var(--color-primary);
}
}
@@ -123,7 +123,7 @@
font-style: italic;
margin-top: 0.5rem;
padding: 0.75rem;
background: var(--ground-background);
background: var(--color-card);
border-radius: 4px;
.pi {
@@ -25,7 +25,7 @@
<div class="section-body">
<div class="toggle-list">
<div class="toggle-item" [class.is-active]="opdsEnabled">
<div class="toggle-item border-l-(--p-content-border-color) [&.is-active]:border-l-emerald-500 dark:[&.is-active]:border-l-emerald-300" [class.is-active]="opdsEnabled">
<div class="toggle-content">
<div class="toggle-header">
<div class="toggle-icon">
@@ -33,7 +33,7 @@
</div>
<div class="toggle-info">
<span class="toggle-label">{{ t('server.opdsLabel') }}</span>
<span class="toggle-status" [class.active]="opdsEnabled">
<span class="toggle-status text-(--p-text-muted-color) [&.active]:text-emerald-700 dark:[&.active]:text-emerald-300" [class.active]="opdsEnabled">
{{ opdsEnabled ? t('server.enabled') : t('server.disabled') }}
</span>
</div>
@@ -49,7 +49,7 @@
</p-toggleswitch>
</div>
<div class="toggle-item" [class.is-active]="komgaApiEnabled">
<div class="toggle-item border-l-(--p-content-border-color) [&.is-active]:border-l-emerald-500 dark:[&.is-active]:border-l-emerald-300" [class.is-active]="komgaApiEnabled">
<div class="toggle-content">
<div class="toggle-header">
<div class="toggle-icon">
@@ -57,7 +57,7 @@
</div>
<div class="toggle-info">
<span class="toggle-label">{{ t('server.komgaLabel') }}</span>
<span class="toggle-status" [class.active]="komgaApiEnabled">
<span class="toggle-status text-(--p-text-muted-color) [&.active]:text-emerald-700 dark:[&.active]:text-emerald-300" [class.active]="komgaApiEnabled">
{{ komgaApiEnabled ? t('server.enabled') : t('server.disabled') }}
</span>
</div>
@@ -74,7 +74,7 @@
</div>
@if (komgaApiEnabled) {
<div class="toggle-item sub-item" [class.is-active]="komgaGroupUnknown">
<div class="toggle-item sub-item border-l-orange-500 dark:border-l-orange-400 [&.is-active]:border-l-emerald-500 dark:[&.is-active]:border-l-emerald-300" [class.is-active]="komgaGroupUnknown">
<div class="toggle-content">
<div class="toggle-header">
<div class="toggle-icon sub-icon">
@@ -82,7 +82,7 @@
</div>
<div class="toggle-info">
<span class="toggle-label">{{ t('server.groupUnknownLabel') }}</span>
<span class="toggle-status" [class.active]="komgaGroupUnknown">
<span class="toggle-status text-(--p-text-muted-color) [&.active]:text-emerald-700 dark:[&.active]:text-emerald-300" [class.active]="komgaGroupUnknown">
{{ komgaGroupUnknown ? t('server.grouped') : t('server.individual') }}
</span>
</div>
@@ -68,28 +68,20 @@
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-left: 3px solid var(--p-content-border-color);
border-left-width: 3px;
border-left-style: solid;
border-radius: 6px;
padding: 1rem;
transition: border-color 0.2s ease, background 0.2s ease;
&:hover {
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
}
&.is-active {
border-left-color: var(--p-green-500);
background: var(--color-card);
}
&.sub-item {
margin-left: 1.5rem;
border-left-color: var(--p-orange-500);
&.is-active {
border-left-color: var(--p-green-500);
}
@media (width <= 600px) {
margin-left: 0;
@@ -157,11 +149,6 @@
.toggle-status {
font-size: 0.875rem;
font-weight: 600;
color: var(--p-text-muted-color);
&.active {
color: var(--p-green-400);
}
}
.toggle-description {
@@ -184,7 +171,7 @@
}
.endpoint-item {
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-left: 3px solid var(--p-primary-color);
border-radius: 6px;
@@ -262,7 +249,7 @@
padding: 3rem 2rem;
text-align: center;
color: var(--p-text-muted-color);
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border-radius: 6px;
.pi {
@@ -296,7 +283,7 @@
align-items: center;
justify-content: space-between;
gap: 1rem;
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-left: 3px solid var(--p-primary-color);
border-radius: 6px;
@@ -304,7 +291,7 @@
transition: background 0.2s ease;
&:hover {
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
background: var(--color-card);
}
@media (width <= 600px) {
@@ -457,7 +444,7 @@
gap: 1rem;
padding: 1.5rem;
border-radius: settings.$settings-card-border-radius;
background: color-mix(in srgb, var(--ground-background) 85%, var(--p-red-600) 15%);
background: color-mix(in srgb, var(--color-card) 85%, var(--p-red-600) 15%);
border: 1px solid var(--p-content-border-color);
border-left: 3px solid var(--p-red-500);
max-width: 500px;
@@ -52,19 +52,6 @@
&.action-item {
border-left-color: var(--p-orange-500);
background: color-mix(
in srgb,
var(--ground-background) 40%,
var(--p-surface-800) 60%
);
&:hover {
background: color-mix(
in srgb,
var(--ground-background) 20%,
var(--p-surface-800) 80%
);
}
}
@media (width <= 768px) {
@@ -97,7 +84,7 @@
.setting-value {
font-weight: 600;
color: var(--text-color);
color: var(--color-text);
white-space: nowrap;
}
@@ -86,14 +86,14 @@
}
.task-item {
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-left: 3px solid var(--p-content-border-color);
border-radius: 6px;
transition: border-color 0.2s ease, background 0.2s ease;
&:hover {
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
background: var(--color-surface-hover);
}
&.is-running {
@@ -276,7 +276,7 @@
gap: 0.75rem;
flex-wrap: wrap;
padding: 0.75rem;
background: var(--p-surface-800);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-radius: 6px;
@@ -317,7 +317,7 @@
flex-direction: column;
gap: 0.5rem;
padding: 0.25rem 0.5rem;
background: var(--p-surface-800);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-radius: 6px;
}
@@ -343,10 +343,10 @@
font-family: 'SF Mono', Monaco, 'Courier New', monospace;
font-size: 0.75rem;
color: var(--p-primary-color);
background: var(--p-surface-900);
background: var(--color-card);
padding: 0.25rem 0.5rem;
border-radius: 4px;
border: 1px solid var(--p-surface-700);
border: 1px solid var(--color-border);
white-space: nowrap;
}
@@ -373,10 +373,10 @@
font-family: 'SF Mono', Monaco, 'Courier New', monospace;
font-size: 0.75rem;
color: var(--p-text-color);
background: var(--p-surface-900);
background: var(--color-card);
padding: 0.25rem 0.5rem;
border-radius: 4px;
border: 1px solid var(--p-surface-700);
border: 1px solid var(--color-border);
outline: none;
transition: border-color 0.2s;
@@ -416,7 +416,7 @@
// Task Progress (Running State)
.task-progress {
padding: 1rem;
background: var(--p-surface-800);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-radius: 6px;
display: flex;
@@ -60,11 +60,13 @@
<div class="user-identity">
<div class="user-name-row">
<span class="username">{{ user.username }}</span>
<span class="user-type-badge" [attr.data-type]="user.provisioningMethod || 'LOCAL'">
<span
class="user-type-badge"
[attr.data-type]="user.provisioningMethod || 'LOCAL'">
{{ (user.provisioningMethod || 'LOCAL') | lowercase | titlecase }}
</span>
@if (user.permissions.admin) {
<span class="admin-badge">
<span class="admin-badge bg-emerald-500/15 text-emerald-700 dark:text-emerald-300">
<i class="pi pi-shield"></i>
{{ t('admin') }}
</span>
@@ -67,7 +67,7 @@
padding: 3rem 2rem;
text-align: center;
color: var(--p-text-muted-color);
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border-radius: 6px;
.pi {
@@ -97,18 +97,18 @@
}
.user-card {
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%);
background: var(--color-card);
border: 1px solid var(--p-content-border-color);
border-left: 3px solid var(--p-content-border-color);
border-radius: 6px;
transition: border-color 0.2s ease, background 0.2s ease;
&:hover {
background: color-mix(in srgb, var(--ground-background) 40%, var(--p-surface-800) 60%);
background: var(--color-card);
}
&.is-admin {
border-left-color: #10b981;
border-left-color: var(--color-emerald-500);
}
&.is-expanded {
@@ -156,7 +156,7 @@
flex-shrink: 0;
&:hover {
background: var(--p-surface-100);
background: var(--color-card);
color: var(--p-primary-color);
}
@@ -207,16 +207,22 @@
text-transform: uppercase;
letter-spacing: 0.025em;
&[data-type="LOCAL"] {
color: #3b82f6;
background: color-mix(in srgb, #3b82f6 15%, transparent);
border-color: #3b82f6;
&[data-type='LOCAL'] {
background: color-mix(in srgb, var(--color-blue-500) 15%, transparent);
border-color: var(--color-blue-500);
color: var(--color-blue-700);
}
&[data-type="OIDC"] {
color: #8b5cf6;
background: color-mix(in srgb, #8b5cf6 15%, transparent);
border-color: #8b5cf6;
&[data-type='OIDC'] {
background: color-mix(in srgb, var(--color-violet-500) 15%, transparent);
border-color: var(--color-violet-500);
color: var(--color-violet-700);
}
&[data-type='REMOTE'] {
background: color-mix(in srgb, var(--color-teal-500) 15%, transparent);
border-color: var(--color-teal-500);
color: var(--color-teal-700);
}
}
@@ -225,8 +231,6 @@
align-items: center;
gap: 0.25rem;
padding: 0.125rem 0.5rem;
background: color-mix(in srgb, #10b981 15%, transparent);
color: #10b981;
border-radius: 12px;
font-size: 0.625rem;
font-weight: 700;
@@ -276,36 +280,70 @@
border-radius: 16px;
font-size: 0.75rem;
font-weight: 600;
background: var(--p-surface-100);
border: 1px solid var(--p-content-border-color);
border-width: 1px;
border-style: solid;
transition: all 0.2s;
.pi {
font-size: 0.75rem;
}
&[data-level="none"] {
background: color-mix(in srgb, #6b7280 15%, transparent);
border-color: #6b7280;
color: #6b7280;
&[data-level='none'] {
background: color-mix(in srgb, var(--color-gray-500) 15%, transparent);
border-color: var(--color-gray-500);
color: var(--color-gray-700);
}
&[data-level="low"] {
background: color-mix(in srgb, #ef4444 15%, transparent);
border-color: #ef4444;
color: #ef4444;
&[data-level='low'] {
background: color-mix(in srgb, var(--color-red-500) 15%, transparent);
border-color: var(--color-red-500);
color: var(--color-red-700);
}
&[data-level="medium"] {
background: color-mix(in srgb, #f59e0b 15%, transparent);
border-color: #f59e0b;
color: #f59e0b;
&[data-level='medium'] {
background: color-mix(in srgb, var(--color-amber-500) 15%, transparent);
border-color: var(--color-amber-500);
color: var(--color-amber-700);
}
&[data-level="high"] {
background: color-mix(in srgb, #10b981 15%, transparent);
border-color: #10b981;
color: #10b981;
&[data-level='high'] {
background: color-mix(in srgb, var(--color-emerald-500) 15%, transparent);
border-color: var(--color-emerald-500);
color: var(--color-emerald-700);
}
}
:host-context(.dark) {
.user-type-badge {
&[data-type='LOCAL'] {
color: var(--color-blue-300);
}
&[data-type='OIDC'] {
color: var(--color-violet-300);
}
&[data-type='REMOTE'] {
color: var(--color-teal-300);
}
}
.permission-badge {
&[data-level='none'] {
color: var(--color-gray-300);
}
&[data-level='low'] {
color: var(--color-red-300);
}
&[data-level='medium'] {
color: var(--color-amber-300);
}
&[data-level='high'] {
color: var(--color-emerald-300);
}
}
}
@@ -544,7 +582,7 @@
color: var(--p-text-muted-color);
&:hover {
background: var(--p-surface-100);
background: var(--color-card);
color: var(--p-text-color);
}
}
@@ -614,11 +652,11 @@
align-items: flex-start;
gap: 0.75rem;
padding: 0.875rem 1rem;
background: color-mix(in srgb, #ef4444 12%, var(--p-content-background));
border: 1px solid color-mix(in srgb, #ef4444 30%, transparent);
border-left: 3px solid #ef4444;
background: color-mix(in srgb, var(--color-red-500) 12%, var(--p-content-background));
border: 1px solid color-mix(in srgb, var(--color-red-500) 30%, transparent);
border-left: 3px solid var(--color-red-500);
border-radius: 6px;
color: #ef4444;
color: var(--color-red-500);
font-size: settings.$settings-section-description-size;
font-weight: 500;
@@ -653,7 +691,7 @@
background: transparent;
&:hover {
background: var(--p-surface-100);
background: var(--color-card);
}
}
@@ -22,6 +22,89 @@
</div>
<div class="form-container">
<div class="form-section preferences-section">
<h3 class="section-title">
<i class="pi pi-palette" aria-hidden="true"></i>
{{ 'settingsView.theme.sectionTitle' | transloco }}
</h3>
<div class="form-field">
<label class="field-label" for="app-appearance">{{ 'layout.theme.appearance' | transloco }}</label>
<p-select
inputId="app-appearance"
[options]="appearanceOptions()"
[ngModel]="selectedAppearancePreference()"
(ngModelChange)="updateAppearancePreference($event)"
optionLabel="label"
optionValue="value"
appendTo="body"
class="preference-select">
</p-select>
</div>
<div class="form-field">
<label class="field-label" for="app-theme">{{ 'layout.theme.theme' | transloco }}</label>
<p-select
inputId="app-theme"
[options]="themeOptions()"
[ngModel]="selectedThemePreference()"
(ngModelChange)="updateThemePreference($event)"
optionLabel="label"
optionValue="value"
appendTo="body"
class="preference-select">
<ng-template #selectedItem let-option>
@if (option) {
<span class="inline-flex items-center gap-2.5 min-w-0">
@if (option.value !== 'custom') {
<span
class="w-3.5 h-3.5 rounded-full shrink-0 ring-1 ring-black/15 ring-inset bg-(--color-primary-500)"
[attr.data-app-theme]="option.value"
aria-hidden="true">
</span>
}
<span>{{ option.label }}</span>
</span>
}
</ng-template>
<ng-template #item let-option>
<span class="inline-flex items-center gap-2.5 min-w-0">
@if (option.value !== 'custom') {
<span
class="w-3.5 h-3.5 rounded-full shrink-0 ring-1 ring-black/15 ring-inset bg-(--color-primary-500)"
[attr.data-app-theme]="option.value"
aria-hidden="true">
</span>
}
<span>{{ option.label }}</span>
</span>
</ng-template>
</p-select>
</div>
@if (selectedThemePreference() === 'custom') {
<fieldset class="form-field">
<legend class="field-label">{{ 'layout.theme.customPrimary' | transloco }}</legend>
<div class="custom-primary-card">
<div class="custom-primary-options">
@for (palette of customPrimaryOptions; track palette) {
<button
type="button"
[class]="'w-7 h-7 rounded-full cursor-pointer shadow-[inset_0_0_0_1px_rgb(0_0_0_/_0.1)] dark:shadow-[inset_0_0_0_1px_rgb(255_255_255_/_0.1)] ' + (palette === selectedCustomPrimary() ? 'ring-1 ring-black dark:ring-white' : '')"
[style.background]="'var(--color-' + palette + '-500)'"
[attr.aria-label]="palette"
[attr.aria-pressed]="palette === selectedCustomPrimary()"
(click)="updateCustomPrimary(palette)">
</button>
}
</div>
</div>
</fieldset>
}
</div>
<div class="gradient-divider"></div>
<div class="form-section preferences-section">
<h3 class="section-title">
<i class="pi pi-language" aria-hidden="true"></i>
@@ -29,64 +112,18 @@
</h3>
<p-select
size="small"
[options]="languageOptions"
[ngModel]="activeLang()"
(ngModelChange)="onLanguageChange($event)"
optionLabel="label"
optionValue="value"
appendTo="body"
class="language-select">
class="preference-select">
</p-select>
</div>
<div class="gradient-divider"></div>
<div class="form-section preferences-section">
<div class="preference-group">
<h3 class="section-title">
<i class="pi pi-palette" aria-hidden="true"></i>
{{ 'settingsView.theme.sectionTitle' | transloco }}
</h3>
<div class="theme-row">
<span class="theme-row-label">{{ 'layout.theme.primary' | transloco }}</span>
<div class="color-swatches">
@for (primaryColor of primaryColors; track primaryColor.name) {
<button
type="button"
[title]="primaryColor.name"
[attr.aria-label]="primaryColor.name"
[attr.aria-pressed]="primaryColor.name === selectedPrimaryColor()"
(click)="updateThemeColor($event, 'primary', primaryColor)"
[ngClass]="{ 'active-color': primaryColor.name === selectedPrimaryColor() }"
[style]="{ 'background-color': primaryColor.name === 'noir' ? 'var(--text-color)' : primaryColor.palette['500'] || 'transparent' }">
</button>
}
</div>
</div>
<div class="theme-row">
<span class="theme-row-label">{{ 'layout.theme.surface' | transloco }}</span>
<div class="color-swatches">
@for (surface of surfaces; track surface.name) {
<button
type="button"
[title]="surface.name"
[attr.aria-label]="surface.name"
[attr.aria-pressed]="selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : surface.name === 'zinc'"
(click)="updateThemeColor($event, 'surface', surface)"
[ngClass]="{ 'active-color': selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : surface.name === 'zinc' }"
[style]="{ 'background-color': surface.name === 'noir' ? 'var(--text-color)' : surface.palette['500'] }">
</button>
}
</div>
</div>
</div>
</div>
<div class="gradient-divider"></div>
<div class="form-section">
<h3 class="section-title">
<i class="pi pi-id-card"></i>
@@ -26,8 +26,8 @@
flex-direction: column;
gap: 2rem;
padding: 2rem;
background: var(--card-background);
border: 1px solid var(--border-color);
background: var(--color-page);
border: 1px solid var(--color-border);
border-top: none;
border-radius: 0 0 10px 10px;
box-shadow: 0 2px 6px rgb(0 0 0 / 8%);
@@ -52,10 +52,10 @@
margin: 0 0 0.5rem;
font-size: 1rem;
font-weight: 600;
color: var(--text-color);
color: var(--color-text);
i {
color: var(--primary-color);
color: var(--color-primary);
font-size: 1.125rem;
}
}
@@ -71,56 +71,8 @@
gap: 1rem;
}
.language-select {
width: 11rem;
max-width: 100%;
min-width: 0;
}
.preference-group {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.theme-row {
display: flex;
flex-direction: column;
gap: 0.625rem;
padding: 0.75rem;
background: var(--ground-background);
border-radius: 8px;
box-shadow: inset 0 0 0 1px var(--border-color);
}
.theme-row-label {
color: var(--text-color-secondary);
font-size: var(--text-sm);
font-weight: 500;
line-height: 1.25rem;
}
.color-swatches {
display: flex;
flex-wrap: wrap;
gap: 0.375rem;
min-width: 0;
button {
width: 1.5rem;
height: 1.5rem;
padding: 0;
border: 0;
border-radius: 50%;
cursor: pointer;
outline: transparent solid 2px;
outline-offset: 1px;
&:focus-visible,
&.active-color {
outline-color: var(--primary-color);
}
}
.preference-select {
width: 100%;
}
.form-field {
@@ -131,16 +83,16 @@
.field-label {
font-size: 0.9rem;
font-weight: 500;
color: var(--text-color);
color: var(--color-text);
}
.field-input {
width: 100%;
&.p-inputtext:disabled {
background: color-mix(in srgb, var(--ground-background) 50%, var(--p-surface-800) 50%) !important;
color: var(--text-color-secondary);
-webkit-text-fill-color: var(--text-color-secondary);
background: var(--color-card) !important;
color: var(--color-text-secondary);
-webkit-text-fill-color: var(--color-text-secondary);
opacity: 1;
cursor: not-allowed;
}
@@ -160,10 +112,10 @@
.field-value {
font-size: 1rem;
color: var(--text-color);
color: var(--color-text);
padding: 0.75rem;
background: var(--ground-background);
border: 1px solid var(--border-color);
background: var(--color-card);
border: 1px solid var(--color-border);
border-radius: 6px;
margin: 0;
}
@@ -172,7 +124,7 @@
display: flex;
align-items: center;
gap: 0.375rem;
color: #ef4444;
color: var(--color-red-500);
font-size: 0.875rem;
margin-top: -0.25rem;
@@ -182,6 +134,26 @@
}
}
fieldset.form-field {
min-width: 0;
margin: 0;
padding: 0;
border: 0;
}
.custom-primary-card {
padding: 0.75rem;
background: var(--color-card);
border-radius: 6px;
box-shadow: inset 0 0 0 1px var(--color-border);
}
.custom-primary-options {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.edit-actions {
margin-top: 0.5rem;
@@ -205,17 +177,11 @@
.loading-icon {
font-size: 2rem;
color: var(--primary-color);
color: var(--color-primary);
}
p {
font-size: 1rem;
color: var(--text-secondary-color);
}
}
@media #{variables.$mobile-shell-media-query} {
.language-select {
width: 100%;
color: var(--color-text-secondary);
}
}
@@ -1,4 +1,3 @@
import {NgClass} from '@angular/common';
import {Component, DestroyRef, computed, effect, inject} from '@angular/core';
import {Button} from 'primeng/button';
import {AbstractControl, FormBuilder, FormGroup, FormsModule, ReactiveFormsModule, ValidationErrors, ValidatorFn, Validators} from '@angular/forms';
@@ -13,14 +12,14 @@ import {takeUntilDestroyed, toSignal} from '@angular/core/rxjs-interop';
import {AVAILABLE_LANGS, LANG_LABELS} from '../../../core/config/transloco-loader';
import {LANG_STORAGE_KEY} from '../../../core/config/language-initializer';
import {AppConfigService} from '../../../shared/service/app-config.service';
import Aura from '../../../shared/layout/theme-palette-extend';
type ColorPalette = Record<string, string>;
interface Palette {
name: string;
palette: ColorPalette;
}
import {
AppearancePreference,
AppTheme,
CUSTOM_PRIMARY_OPTIONS,
CustomPrimary,
DEFAULT_APP_THEME,
DEFAULT_CUSTOM_PRIMARY,
} from '../../../shared/model/app-state.model';
export const passwordMatchValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {
const newPassword = control.get('newPassword');
@@ -42,7 +41,6 @@ export const passwordMatchValidator: ValidatorFn = (control: AbstractControl): V
InputText,
Password,
Select,
NgClass,
TranslocoDirective,
TranslocoPipe,
],
@@ -68,10 +66,27 @@ export class UserProfileDialogComponent {
private readonly t = inject(TranslocoService);
private readonly destroyRef = inject(DestroyRef);
protected readonly activeLang = toSignal(this.t.langChanges$, {initialValue: this.t.getActiveLang()});
protected readonly selectedPrimaryColor = computed(() => this.configService.appState().primary);
protected readonly selectedSurfaceColor = computed(() => this.configService.appState().surface);
protected readonly surfaces = this.configService.surfaces;
protected readonly primaryColors = this.getPrimaryColors();
protected readonly selectedThemePreference = computed(() => this.configService.appState().themePreference ?? DEFAULT_APP_THEME);
protected readonly selectedAppearancePreference = computed(() => this.configService.appState().appearancePreference ?? 'system');
protected readonly selectedCustomPrimary = computed<CustomPrimary>(
() => this.configService.appState().customPrimary ?? DEFAULT_CUSTOM_PRIMARY,
);
protected readonly customPrimaryOptions = CUSTOM_PRIMARY_OPTIONS;
protected readonly themeOptions = computed(() => {
this.activeLang();
return this.configService.themes.map((theme) => ({
value: theme.name,
label: this.t.translate(theme.labelKey),
}));
});
protected readonly appearanceOptions = computed(() => {
this.activeLang();
return [
{value: 'light' as AppearancePreference, label: this.t.translate('layout.theme.light')},
{value: 'dark' as AppearancePreference, label: this.t.translate('layout.theme.dark')},
{value: 'system' as AppearancePreference, label: this.t.translate('layout.theme.system')},
];
});
constructor() {
this.changePasswordForm = this.fb.group(
@@ -119,31 +134,16 @@ export class UserProfileDialogComponent {
});
}
updateThemeColor(event: Event, type: 'primary' | 'surface', color: { name: string; palette?: ColorPalette }): void {
this.configService.appState.update((state) => ({
...state,
[type]: color.name,
}));
event.stopPropagation();
updateThemePreference(themePreference: AppTheme): void {
this.configService.setThemePreference(themePreference);
}
private getPrimaryColors(): Palette[] {
const presetPalette = (Aura.primitive ?? {}) as Record<string, ColorPalette>;
const colors = [
'orange', 'amber', 'yellow', 'lime', 'green', 'emerald',
'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet',
'purple', 'fuchsia', 'pink', 'rose', 'red',
'coralSunset', 'roseBlush', 'melonBlush', 'cottonCandy',
'apricotSunrise', 'antiqueBronze', 'butteryYellow', 'vanillaCream',
'citrusMint', 'freshMint', 'sagePearl', 'skyBlue', 'periwinkleCream',
'pastelRoyalBlue', 'lavenderDream', 'dustyNeutral',
];
return [{name: 'noir', palette: {}}].concat(
colors.map(name => ({
name,
palette: presetPalette[name] ?? {},
})),
);
updateCustomPrimary(customPrimary: CustomPrimary): void {
this.configService.setCustomPrimary(customPrimary);
}
updateAppearancePreference(appearancePreference: AppearancePreference): void {
this.configService.setAppearancePreference(appearancePreference);
}
updateProfile(): void {