mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
34 lines
890 B
TypeScript
34 lines
890 B
TypeScript
import { DatePipe } from '@angular/common'
|
|
import { Component, input } from '@angular/core'
|
|
import { TuiIcon, TuiTitle, TuiCell } from '@taiga-ui/core'
|
|
import { StartOSDiskInfo } from '../types/api'
|
|
|
|
@Component({
|
|
selector: 'button[server]',
|
|
template: `
|
|
<tui-icon icon="@tui.save" />
|
|
<span tuiTitle>
|
|
<strong>{{ server().hostname.replace('.local', '') }}.local</strong>
|
|
<span tuiSubtitle>
|
|
<b>StartOS Version</b>
|
|
: {{ server().version }}
|
|
</span>
|
|
<span tuiSubtitle>
|
|
<b>Created</b>
|
|
: {{ server().timestamp | date: 'medium' }}
|
|
</span>
|
|
</span>
|
|
`,
|
|
styles: `
|
|
:host {
|
|
border-radius: var(--tui-radius-l);
|
|
}
|
|
`,
|
|
host: { class: 'g-stretch' },
|
|
hostDirectives: [TuiCell],
|
|
imports: [DatePipe, TuiIcon, TuiTitle],
|
|
})
|
|
export class ServerComponent {
|
|
readonly server = input.required<StartOSDiskInfo>()
|
|
}
|