diff --git a/patch-db b/patch-db index 3dc11afd4..7aa53249f 160000 --- a/patch-db +++ b/patch-db @@ -1 +1 @@ -Subproject commit 3dc11afd46d93094ac52ae1fef311a91c4561e8c +Subproject commit 7aa53249f9353162475ea347abac92abcfba5493 diff --git a/web/projects/ui/src/app/routes/portal/routes/system/backups/components/upcoming.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/backups/components/upcoming.component.ts index cfe2b0630..4a56e25af 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/backups/components/upcoming.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/backups/components/upcoming.component.ts @@ -28,7 +28,7 @@ import { GetBackupIconPipe } from '../pipes/get-backup-icon.pipe' @if (current.id === job.id) { Running } @else { - {{ job.next | date: 'MMM d, y, h:mm a' }} + {{ job.next | date: 'medium' }} } {{ job.name }} @@ -59,7 +59,11 @@ import { GetBackupIconPipe } from '../pipes/get-backup-icon.pipe' grid-template-columns: 1fr 1fr; } - .date, + .date { + order: 1; + grid-column: span 2; + } + .name { grid-column: span 2; } diff --git a/web/projects/ui/src/app/routes/portal/routes/system/backups/modals/history.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/backups/modals/history.component.ts index d12f19eb8..3a51b32ca 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/backups/modals/history.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/backups/modals/history.component.ts @@ -9,10 +9,12 @@ import { FormsModule } from '@angular/forms' import { ErrorService, LoadingService } from '@start9labs/shared' import { ALWAYS_FALSE_HANDLER, ALWAYS_TRUE_HANDLER } from '@taiga-ui/cdk' import { TuiDialogService, TuiLinkModule } from '@taiga-ui/core' -import { TuiButtonModule, TuiIconModule } from '@taiga-ui/experimental' -import { TuiCheckboxModule } from '@taiga-ui/kit' +import { + TuiButtonModule, + TuiCheckboxModule, + TuiIconModule, +} from '@taiga-ui/experimental' import { PolymorpheusComponent } from '@tinkoff/ng-polymorpheus' -import { BehaviorSubject } from 'rxjs' import { REPORT } from 'src/app/components/report.component' import { BackupRun } from 'src/app/services/api/api.types' import { ApiService } from 'src/app/services/api/embassy-api.service' @@ -37,7 +39,10 @@ import { HasErrorPipe } from '../pipes/has-error.pipe' - @for (run of runs(); track $index) { - - - {{ run.startedAt | date: 'medium' }} + + + + + {{ run.startedAt | date: 'medium' }} {{ run.startedAt | duration: run.completedAt }} minutes @@ -67,7 +79,7 @@ import { HasErrorPipe } from '../pipes/has-error.pipe' } - + {{ run.job.target.name }} @@ -87,27 +99,50 @@ import { HasErrorPipe } from '../pipes/has-error.pipe' `, styles: ` + @import '@taiga-ui/core/styles/taiga-ui-local'; + tui-icon { font-size: 1rem; vertical-align: sub; margin-inline-end: 0.25rem; } + button { + position: relative; + } + + [tuiCheckbox] { + display: block; + } + :host-context(tui-root._mobile) { tr { - grid-template-columns: 1.75rem 1fr 7rem; + grid-template-columns: 1fr 7rem; } td:only-child { - grid-column: span 3; + grid-column: span 2; + } + + .checkbox { + @include fullsize(); + + [tuiCheckbox] { + @include fullsize(); + opacity: 0; + } } .title { - grid-column: span 2; font-weight: bold; text-transform: uppercase; } + .date, + .duration { + color: var(--tui-text-02); + } + .duration, .result { text-align: right; @@ -120,12 +155,12 @@ import { HasErrorPipe } from '../pipes/has-error.pipe' CommonModule, FormsModule, TuiButtonModule, - TuiCheckboxModule, TuiIconModule, TuiLinkModule, DurationPipe, HasErrorPipe, GetBackupIconPipe, + TuiCheckboxModule, ], }) export class BackupsHistoryModal { diff --git a/web/projects/ui/src/app/routes/portal/routes/system/notifications/item.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/notifications/item.component.ts index f5e7e01c9..3d03b0e57 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/notifications/item.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/notifications/item.component.ts @@ -23,7 +23,7 @@ import { toRouterLink } from 'src/app/utils/to-router-link' template: ` - {{ notificationItem.createdAt | date: 'MMM d, y, h:mm a' }} + {{ notificationItem.createdAt | date: 'medium' }} @@ -64,28 +64,36 @@ import { toRouterLink } from 'src/app/utils/to-router-link' '[class._new]': '!notificationItem.read', }, styles: ` + @import '@taiga-ui/core/styles/taiga-ui-local'; + :host { - grid-template-columns: 1.75rem 1fr; + grid-template-columns: 1fr; &._new { background: var(--tui-clear) !important; } } + button { + position: relative; + } + td { - grid-column: span 2; padding: 0.25rem; vertical-align: top; } .checkbox { - grid-column: span 1; padding-top: 0.4rem; } :host-context(tui-root._mobile) { + .checkbox { + @include fullsize(); + } + .date { - grid-column: span 1; + order: 1; color: var(--tui-text-02); } diff --git a/web/projects/ui/src/app/routes/portal/routes/system/notifications/table.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/notifications/table.component.ts index e4c298f4e..c6b56b197 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/notifications/table.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/notifications/table.component.ts @@ -66,6 +66,14 @@ import { NotificationItemComponent } from './item.component' } `, + styles: ` + @import '@taiga-ui/core/styles/taiga-ui-local'; + + :host-context(tui-root._mobile) input { + @include fullsize(); + opacity: 0; + } + `, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ 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 eee8258b9..c7be3c518 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 @@ -28,7 +28,7 @@ import { Domain } from 'src/app/services/patch-db/data-model' @for (domain of domains; track $index) { {{ domain.value }} - {{ domain.createdAt | date: 'short' }} + {{ domain.createdAt | date: 'medium' }} {{ domain.provider }} {{ getStrategy(domain) }} 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 2c03a27a7..8f5166e38 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 @@ -44,7 +44,7 @@ import { Proxy } from 'src/app/services/patch-db/data-model' @for (proxy of proxies; track $index) { {{ proxy.name }} - {{ proxy.createdAt | date: 'short' }} + {{ proxy.createdAt | date: 'medium' }} {{ proxy.type }} @if (getLength(proxy); as length) { @@ -110,17 +110,17 @@ import { Proxy } from 'src/app/services/patch-db/data-model' } .date { - order: 3; + order: 5; grid-column: span 2; color: var(--tui-text-02); } .type { - order: 4; + order: 3; } .used { - order: 5; + order: 4; text-align: right; &:not(:has(button)) { diff --git a/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/sessions/table.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/sessions/table.component.ts index fd97af5af..e6b085877 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/sessions/table.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/sessions/table.component.ts @@ -77,6 +77,8 @@ import { PlatformInfoPipe } from './platform-info.pipe' `, styles: [ ` + @import '@taiga-ui/core/styles/taiga-ui-local'; + input { position: absolute; top: 50%; @@ -85,6 +87,17 @@ import { PlatformInfoPipe } from './platform-info.pipe' } :host-context(tui-root._mobile) { + input { + @include fullsize(); + z-index: 1; + opacity: 0; + transform: none; + } + + td:first-child { + padding: 0 0.25rem !important; + } + .agent { white-space: nowrap; display: block; diff --git a/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/ssh/table.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/ssh/table.component.ts index db0c30072..ef131258f 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/ssh/table.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/settings/routes/ssh/table.component.ts @@ -81,18 +81,19 @@ import { ApiService } from 'src/app/services/api/embassy-api.service' text-align: right; } - .date { + .fingerprint { order: 3; + grid-column: span 2; + } + + .date { + order: 4; + color: var(--tui-text-02); } .algorithm { - order: 4; - text-align: right; - } - - .fingerprint { order: 5; - grid-column: span 2; + text-align: right; color: var(--tui-text-02); } } diff --git a/web/projects/ui/src/styles.scss b/web/projects/ui/src/styles.scss index d9c237e05..cff302e26 100644 --- a/web/projects/ui/src/styles.scss +++ b/web/projects/ui/src/styles.scss @@ -103,6 +103,7 @@ tui-root._mobile .g-table { } tr { + position: relative; display: grid; border-radius: var(--tui-radius-l); padding: 0.75rem 1rem; @@ -110,8 +111,13 @@ tui-root._mobile .g-table { background: rgba(0, 0, 0, 0.2); } + tr:has(:checked) { + box-shadow: inset 0 0 0 0.125rem var(--tui-primary); + } + td, th { + position: static; height: auto; min-height: 2rem; align-content: center;