diff --git a/src/app/actions/actions/actions.component.html b/src/app/actions/actions/actions.component.html index 1cee6b4..3e6187f 100644 --- a/src/app/actions/actions/actions.component.html +++ b/src/app/actions/actions/actions.component.html @@ -3,10 +3,10 @@
- + Filter by type - + filter_list {{filter.name}} @@ -17,7 +17,7 @@
- + Search
- \ No newline at end of file diff --git a/src/app/actions/actions/actions.component.scss b/src/app/actions/actions/actions.component.scss index 0139b68..d85db3c 100644 --- a/src/app/actions/actions/actions.component.scss +++ b/src/app/actions/actions/actions.component.scss @@ -1,12 +1,12 @@ -body, +content, h3 { padding: 0; margin: 0; } -body { - height: 100vh; - overflow: auto; +content { + display: flex; + flex-direction: column; margin-top: 3em; } @@ -19,8 +19,7 @@ section { display: flex; justify-content: space-between; width: 70%; - margin-left: auto; - margin-right: auto; + margin: 0 auto; @media (max-width:1250px) { display: block; @@ -30,6 +29,7 @@ section { article { display: flex; justify-content: space-around; + margin: 1em 0; } } diff --git a/src/app/app.component.html b/src/app/app.component.html index f50582a..56c0273 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,6 +1,6 @@
-
@if (isSidebarOpen) { diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 4befec6..004049b 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -1,9 +1,8 @@ -.container { +.grid { display: grid; grid-template-columns: 20em 0px 1fr; } .full { - width: 80%; margin: 0 auto; } \ No newline at end of file diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 0b8bc10..316a312 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -107,12 +107,20 @@ export class AppComponent implements OnInit, OnDestroy { this.overlayContainer.getContainerElement().classList.add(this.themeService.theme + '-theme'); + this.addSubscription(this.events.listen('theme_change', data => { + const classList = this.overlayContainer.getContainerElement().classList; + classList.remove(data.previous_theme + '-theme'); + classList.add(data.current_theme + '-theme'); + })); + this.ngZone.runOutsideAngular(() => setInterval(() => this.client.heartbeat(), 15000)); } ngOnDestroy() { for (let s of this.subscriptions) { - s.unsubscribe(); + if (s) { + s.unsubscribe(); + } } } diff --git a/src/app/navigation/sidebar/sidebar.component.scss b/src/app/navigation/sidebar/sidebar.component.scss index 0e55ac8..a7e1764 100644 --- a/src/app/navigation/sidebar/sidebar.component.scss +++ b/src/app/navigation/sidebar/sidebar.component.scss @@ -1,5 +1,6 @@ @use "@angular/material" as mat; + ul { padding: 0; } @@ -8,9 +9,9 @@ li { list-style: none; width: 100%; display: flex; - flex-grow: 1; justify-content: center; flex-direction: column; + margin: 0.5em 0; } a { diff --git a/src/app/policies/policy-item-edit/policy-item-edit.component.html b/src/app/policies/policy-item-edit/policy-item-edit.component.html index ee08ac5..536ca04 100644 --- a/src/app/policies/policy-item-edit/policy-item-edit.component.html +++ b/src/app/policies/policy-item-edit/policy-item-edit.component.html @@ -60,6 +60,7 @@ diff --git a/src/app/redemptions/redemption-item-edit/redemption-item-edit.component.scss b/src/app/redemptions/redemption-item-edit/redemption-item-edit.component.scss index cdb2012..f29081f 100644 --- a/src/app/redemptions/redemption-item-edit/redemption-item-edit.component.scss +++ b/src/app/redemptions/redemption-item-edit/redemption-item-edit.component.scss @@ -1,4 +1,9 @@ - .buttons { margin: -0.75em; +} + +.mat-mdc-card-content { + display: grid; + row-gap: 1em; + align-self: center; } \ No newline at end of file diff --git a/src/app/redemptions/redemption-list/redemption-list.component.html b/src/app/redemptions/redemption-list/redemption-list.component.html index 5db7d08..6f4ba36 100644 --- a/src/app/redemptions/redemption-list/redemption-list.component.html +++ b/src/app/redemptions/redemption-list/redemption-list.component.html @@ -1,4 +1,4 @@ -
+ @@ -64,4 +64,4 @@ *matRowDef="let row; columns: displayedColumns;">
-
\ No newline at end of file + \ No newline at end of file diff --git a/src/app/redemptions/redemption-list/redemption-list.component.scss b/src/app/redemptions/redemption-list/redemption-list.component.scss index 472fd0d..82867e9 100644 --- a/src/app/redemptions/redemption-list/redemption-list.component.scss +++ b/src/app/redemptions/redemption-list/redemption-list.component.scss @@ -1,9 +1,3 @@ -.content { - height: 100vh; - display: flex; - flex-direction: column; -} - .add { width: 100%; margin-top: 3em; @@ -21,10 +15,10 @@ } .table-container { - min-width: 800px; + width: 800px; flex: 1; height: 60vh; - overflow: auto; + overflow: scroll; margin-bottom: 2em; border-radius: 15px; } \ No newline at end of file diff --git a/src/app/shared/services/theme.service.ts b/src/app/shared/services/theme.service.ts index 6528c1f..f4a5ed4 100644 --- a/src/app/shared/services/theme.service.ts +++ b/src/app/shared/services/theme.service.ts @@ -1,9 +1,11 @@ -import { Injectable, signal } from '@angular/core'; +import { inject, Injectable, signal } from '@angular/core'; +import EventService from './EventService'; @Injectable({ providedIn: 'root' }) export class ThemeService { + private events = inject(EventService); private _current = signal<'light' | 'dark'>('dark'); get theme() { @@ -11,7 +13,12 @@ export class ThemeService { } set theme(value: 'light' | 'dark') { + const previous = this._current(); this._current.set(value); + this.events.emit('theme_change', { + previous_theme: previous, + current_theme: value, + }); } isDarkTheme() { diff --git a/src/app/tts-filters/filter-item/filter-item.component.scss b/src/app/tts-filters/filter-item/filter-item.component.scss index 171f794..cfebec4 100644 --- a/src/app/tts-filters/filter-item/filter-item.component.scss +++ b/src/app/tts-filters/filter-item/filter-item.component.scss @@ -9,12 +9,16 @@ ul { flex-direction: row; flex-wrap: wrap; justify-content: space-evenly; + padding-left: 0; + align-items: center; + vertical-align: middle; li { list-style-type: none; white-space: pre; text-align: start; text-wrap: wrap; + padding: 0; span { overflow: hidden; diff --git a/src/app/tts-filters/filter-list/filter-list.component.html b/src/app/tts-filters/filter-list/filter-list.component.html index e93a39a..1e48474 100644 --- a/src/app/tts-filters/filter-list/filter-list.component.html +++ b/src/app/tts-filters/filter-list/filter-list.component.html @@ -2,8 +2,8 @@
    • -
    • Search
    • -
    • Replace
    • +
    • Search for...
    • +
    • Replace with...
  • diff --git a/src/app/tts-filters/filter-list/filter-list.component.scss b/src/app/tts-filters/filter-list/filter-list.component.scss index 4b55589..caa6ca6 100644 --- a/src/app/tts-filters/filter-list/filter-list.component.scss +++ b/src/app/tts-filters/filter-list/filter-list.component.scss @@ -6,7 +6,7 @@ ul.data { >li { display: block; list-style-type: none; - padding: 0.75em 1em; + padding: 0.5em 1em; border-bottom: 1px solid #aaaaaa; } diff --git a/src/app/tts-filters/filters/filters.component.scss b/src/app/tts-filters/filters/filters.component.scss index 5e01391..4982458 100644 --- a/src/app/tts-filters/filters/filters.component.scss +++ b/src/app/tts-filters/filters/filters.component.scss @@ -1,7 +1,6 @@ main { display: flex; flex-direction: column; - height: 100vh; } article { @@ -11,6 +10,13 @@ article { } .grow { - flex-grow: 1; + width: 800px; + height: 60vh; + align-items: center; + align-self: center; overflow: auto; + flex-wrap: wrap; + justify-content: space-evenly; + border: 1px solid grey; + border-radius: 15px; } \ No newline at end of file diff --git a/src/index.html b/src/index.html index e70ec3c..45325a2 100644 --- a/src/index.html +++ b/src/index.html @@ -14,9 +14,11 @@ rel="stylesheet"> - - - + + + diff --git a/src/styles.scss b/src/styles.scss index 3b74a50..ae70932 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -12,6 +12,7 @@ html { )); } +:root, html, body, main { @@ -22,7 +23,7 @@ html, body, main, content, -nav { +sidebar { background-color: var(--mat-sys-background); color: var(--mat-sys-on-background); } @@ -99,7 +100,7 @@ body { .confirm { @include mat.button-overrides(( //text-state-layer-color: rgb(52, 255, 62), text-label-text-color: rgb(71, 218, 78), - text-disabled-label-text-color: rgb(71, 218, 78), + text-disabled-label-text-color: rgb(107, 107, 107), )); } @@ -120,10 +121,13 @@ body { .danger { @include mat.button-overrides(( //text-state-layer-color: rgb(255, 48, 48), text-label-text-color: rgb(255, 52, 52), - text-disabled-label-text-color: rgb(255, 52, 52), + text-disabled-label-text-color: rgb(107, 107, 107), filled-label-text-color: rgb(255, 52, 52), + filled-disabled-label-text-color: rgb(107, 107, 107), outlined-label-text-color: rgb(255, 52, 52), + outlined-disabled-label-text-color: rgb(107, 107, 107), protected-label-text-color: rgb(255, 52, 52), + protected-disabled-label-text-color: rgb(107, 107, 107), protected-state-layer-color: rgb(255, 75, 75), protected-ripple-color: rgb(255, 154, 154), ));