From 956c8a8e03d565659dcd93d771fdada36026a374 Mon Sep 17 00:00:00 2001 From: waterplea Date: Wed, 10 Jul 2024 10:35:21 +0500 Subject: [PATCH] chore: more comments --- index.html | 2 +- web/projects/shared/styles/shared.scss | 4 +-- web/projects/shared/styles/taiga.scss | 4 +-- .../form/form-array/form-array.component.scss | 2 +- .../portal/routes/dashboard/ui.component.ts | 2 +- .../backups/components/targets.component.ts | 32 ++++++++++-------- .../routes/system/metrics/cpu.component.ts | 4 +-- .../system/metrics/metrics.component.ts | 2 +- .../routes/domains/table.component.ts | 33 ++++++++++--------- .../routes/proxies/table.component.ts | 10 +----- web/projects/ui/src/styles.scss | 1 + 11 files changed, 48 insertions(+), 48 deletions(-) diff --git a/index.html b/index.html index aa68e3a04..2163e5527 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ .header-title span { position: relative; } - .header-title span:before { + .header-title span::before { content: ""; position: absolute; top: 100%; diff --git a/web/projects/shared/styles/shared.scss b/web/projects/shared/styles/shared.scss index 4d66c1dff..1d38a6f02 100644 --- a/web/projects/shared/styles/shared.scss +++ b/web/projects/shared/styles/shared.scss @@ -214,7 +214,7 @@ body { user-select: text; } -.loading-dots:after { +.loading-dots::after { content: '...'; overflow: hidden; display: inline-block; @@ -303,4 +303,4 @@ h5, h6, hr { margin: 0; -} \ No newline at end of file +} diff --git a/web/projects/shared/styles/taiga.scss b/web/projects/shared/styles/taiga.scss index cb7087b33..ed33a88ac 100644 --- a/web/projects/shared/styles/taiga.scss +++ b/web/projects/shared/styles/taiga.scss @@ -140,7 +140,7 @@ background: transparent !important; } - tui-root._mobile &:after { + tui-root._mobile &::after { display: none; } } @@ -149,7 +149,7 @@ tui-dialog { transform: translate3d(0, 0, 0); } -tui-opt-group[data-label^='⚠️']:before { +tui-opt-group[data-label^='⚠️']::before { color: var(--tui-warning-fill); } diff --git a/web/projects/ui/src/app/routes/portal/components/form/form-array/form-array.component.scss b/web/projects/ui/src/app/routes/portal/components/form/form-array/form-array.component.scss index 9b6415ff7..95b5185cc 100644 --- a/web/projects/ui/src/app/routes/portal/components/form/form-array/form-array.component.scss +++ b/web/projects/ui/src/app/routes/portal/components/form/form-array/form-array.component.scss @@ -26,7 +26,7 @@ opacity: 0; } - &:after { + &::after { @include transition(opacity); content: ''; diff --git a/web/projects/ui/src/app/routes/portal/routes/dashboard/ui.component.ts b/web/projects/ui/src/app/routes/portal/routes/dashboard/ui.component.ts index 0bdd31da2..490856eba 100644 --- a/web/projects/ui/src/app/routes/portal/routes/dashboard/ui.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/dashboard/ui.component.ts @@ -52,7 +52,7 @@ import { PackageDataEntry } from 'src/app/services/patch-db/data-model' } `, styles: ` - :host-context(tui-root._mobile) *:before { + :host-context(tui-root._mobile) *::before { font-size: 1.5rem !important; } `, diff --git a/web/projects/ui/src/app/routes/portal/routes/system/backups/components/targets.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/backups/components/targets.component.ts index 4b34588f6..1c51e0cf5 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/backups/components/targets.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/backups/components/targets.component.ts @@ -90,36 +90,40 @@ import { GetBackupIconPipe } from '../pipes/get-backup-icon.pipe' grid-column: span 3; } - .title { + .type { + order: 1; + text-transform: capitalize; + color: var(--tui-text-02); + grid-column: span 3; + + tui-icon { + display: none; + } + } + + .available { order: 2; + } + + .title { + order: 3; font-weight: bold; text-transform: uppercase; } - .available { - order: 1; - } - .actions { - order: 3; + order: 4; padding: 0; text-align: right; } .path { - order: 4; + order: 5; color: var(--tui-text-03); grid-column: span 2; overflow: hidden; text-overflow: ellipsis; } - - .type { - order: 5; - text-align: right; - text-transform: capitalize; - color: var(--tui-text-02); - } } `, changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/web/projects/ui/src/app/routes/portal/routes/system/metrics/cpu.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/metrics/cpu.component.ts index 0b3ef27ae..6ed092ace 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/metrics/cpu.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/metrics/cpu.component.ts @@ -45,7 +45,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core' top: 50%; left: 50%; - &:before { + &::before { content: ''; position: absolute; inset: -0.5rem; @@ -53,7 +53,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core' border-radius: 100%; } - &:after { + &::after { content: ''; position: absolute; width: 0.25rem; diff --git a/web/projects/ui/src/app/routes/portal/routes/system/metrics/metrics.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/metrics/metrics.component.ts index 95c4d8de0..7fd01f420 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/metrics/metrics.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/metrics/metrics.component.ts @@ -131,7 +131,7 @@ import { TimeService } from 'src/app/services/time.service' color: var(--tui-text-01); padding-top: 0.4rem; - &:after { + &::after { content: attr(data-unit); font-size: 0.5rem; font-weight: normal; diff --git a/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/domains/table.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/domains/table.component.ts index c7be3c518..c3ad80b6a 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/domains/table.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/domains/table.component.ts @@ -17,7 +17,6 @@ import { Domain } from 'src/app/services/patch-db/data-model' Domain - Added DDNS Provider Network Strategy Used By @@ -28,13 +27,12 @@ import { Domain } from 'src/app/services/patch-db/data-model' @for (domain of domains; track $index) { {{ domain.value }} - {{ domain.createdAt | date: 'medium' }} {{ domain.provider }} {{ getStrategy(domain) }} - @if (domain.usedBy.length; as qty) { + @if (domain.usedBy.length + 1; as qty) { } @else { N/A @@ -60,7 +58,7 @@ import { Domain } from 'src/app/services/patch-db/data-model' styles: ` :host-context(tui-root._mobile) { tr { - grid-template-columns: 1fr 1fr; + grid-template-columns: 2fr 1fr; } td:only-child { @@ -78,22 +76,27 @@ import { Domain } from 'src/app/services/patch-db/data-model' text-align: right; } - .provider { - order: 3; - } - .strategy { - order: 4; - text-align: right; + order: 3; + grid-column: span 2; + + &::before { + content: 'Strategy: '; + color: var(--tui-text-02); + } } - .date { - order: 5; - color: var(--tui-text-03); + .provider { + order: 4; + + &::before { + content: 'DDNS: '; + color: var(--tui-text-02); + } } .used { - order: 6; + order: 5; text-align: right; &:not(:has(button)) { diff --git a/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/proxies/table.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/proxies/table.component.ts index 8f5166e38..9d67be0fc 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/proxies/table.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/proxies/table.component.ts @@ -34,7 +34,6 @@ import { Proxy } from 'src/app/services/patch-db/data-model' Name - Created Type Used By @@ -44,12 +43,11 @@ import { Proxy } from 'src/app/services/patch-db/data-model' @for (proxy of proxies; track $index) { {{ proxy.name }} - {{ proxy.createdAt | date: 'medium' }} {{ proxy.type }} @if (getLength(proxy); as length) { } @else { N/A @@ -109,12 +107,6 @@ import { Proxy } from 'src/app/services/patch-db/data-model' text-align: right; } - .date { - order: 5; - grid-column: span 2; - color: var(--tui-text-02); - } - .type { order: 3; } diff --git a/web/projects/ui/src/styles.scss b/web/projects/ui/src/styles.scss index 61c06c070..a121c8d45 100644 --- a/web/projects/ui/src/styles.scss +++ b/web/projects/ui/src/styles.scss @@ -78,6 +78,7 @@ hr { height: 2rem; padding: 0 0.25rem; box-shadow: inset 0 -1px var(--tui-clear); + text-overflow: ellipsis; } th {