mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 22:39:46 +00:00
interface row clickable again, bu now with a chevron!
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import { ChangeDetectionStrategy, Component, input } from '@angular/core'
|
import { ChangeDetectionStrategy, Component, input } from '@angular/core'
|
||||||
import { RouterLink } from '@angular/router'
|
|
||||||
import { T } from '@start9labs/start-sdk'
|
import { T } from '@start9labs/start-sdk'
|
||||||
import { TuiButton } from '@taiga-ui/core'
|
import { TuiIcon } from '@taiga-ui/core'
|
||||||
import { TuiBadge } from '@taiga-ui/kit'
|
import { TuiBadge } from '@taiga-ui/kit'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -16,19 +15,19 @@ import { TuiBadge } from '@taiga-ui/kit'
|
|||||||
<td class="g-secondary" [style.grid-area]="'2 / 1 / 2 / 3'">
|
<td class="g-secondary" [style.grid-area]="'2 / 1 / 2 / 3'">
|
||||||
{{ info().description }}
|
{{ info().description }}
|
||||||
</td>
|
</td>
|
||||||
<td class="actions">
|
<td class="chevron">
|
||||||
<a
|
<tui-icon icon="@tui.chevron-right" />
|
||||||
tuiIconButton
|
|
||||||
appearance="flat-grayscale"
|
|
||||||
iconStart="@tui.settings"
|
|
||||||
size="s"
|
|
||||||
[routerLink]="link()"
|
|
||||||
>
|
|
||||||
Settings
|
|
||||||
</a>
|
|
||||||
</td>
|
</td>
|
||||||
`,
|
`,
|
||||||
styles: `
|
styles: `
|
||||||
|
:host {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: var(--tui-background-neutral-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
td:first-child {
|
td:first-child {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -38,12 +37,13 @@ import { TuiBadge } from '@taiga-ui/kit'
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
tui-icon {
|
.chevron {
|
||||||
font-size: 1rem;
|
text-align: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions {
|
.chevron tui-icon {
|
||||||
text-align: end;
|
font-size: 1rem;
|
||||||
|
color: var(--tui-text-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
:host-context(tui-root._mobile) {
|
:host-context(tui-root._mobile) {
|
||||||
@@ -57,13 +57,13 @@ import { TuiBadge } from '@taiga-ui/kit'
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions {
|
.chevron {
|
||||||
grid-area: 1 / 2 / 3 / 3;
|
grid-area: 1 / 2 / 3 / 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
imports: [TuiBadge, TuiButton, RouterLink],
|
imports: [TuiBadge, TuiIcon],
|
||||||
})
|
})
|
||||||
export class ServiceInterfaceItemComponent {
|
export class ServiceInterfaceItemComponent {
|
||||||
readonly info = input.required<T.ServiceInterface>()
|
readonly info = input.required<T.ServiceInterface>()
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {
|
|||||||
computed,
|
computed,
|
||||||
input,
|
input,
|
||||||
} from '@angular/core'
|
} from '@angular/core'
|
||||||
|
import { RouterLink } from '@angular/router'
|
||||||
import { TuiTable } from '@taiga-ui/addon-table'
|
import { TuiTable } from '@taiga-ui/addon-table'
|
||||||
import { tuiDefaultSort } from '@taiga-ui/cdk'
|
import { tuiDefaultSort } from '@taiga-ui/cdk'
|
||||||
import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
|
import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
|
||||||
@@ -26,8 +27,16 @@ import { PlaceholderComponent } from '../../../components/placeholder.component'
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@for (info of interfaces(); track $index) {
|
@for (info of interfaces(); track $index) {
|
||||||
<tr serviceInterface [info]="info" [link]="info.routerLink">
|
<tr
|
||||||
<strong>{{ info.name }}</strong>
|
tabindex="-1"
|
||||||
|
serviceInterface
|
||||||
|
[info]="info"
|
||||||
|
[link]="info.routerLink"
|
||||||
|
[routerLink]="info.routerLink"
|
||||||
|
>
|
||||||
|
<a [routerLink]="info.routerLink">
|
||||||
|
<strong>{{ info.name }}</strong>
|
||||||
|
</a>
|
||||||
</tr>
|
</tr>
|
||||||
} @empty {
|
} @empty {
|
||||||
<app-placeholder icon="@tui.monitor-x">
|
<app-placeholder icon="@tui.monitor-x">
|
||||||
@@ -46,6 +55,7 @@ import { PlaceholderComponent } from '../../../components/placeholder.component'
|
|||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
imports: [
|
imports: [
|
||||||
ServiceInterfaceItemComponent,
|
ServiceInterfaceItemComponent,
|
||||||
|
RouterLink,
|
||||||
TuiTable,
|
TuiTable,
|
||||||
i18nPipe,
|
i18nPipe,
|
||||||
PlaceholderComponent,
|
PlaceholderComponent,
|
||||||
|
|||||||
Reference in New Issue
Block a user