mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
* fix Tor logs actually fetching od logs * chore: update to Angular 18 * chore: update to Angular 19 * bump patchDB * chore: update Angular * chore: fix setup-wizard success page * chore: fix * chore: fix * chore: fix * chore: fix --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> Co-authored-by: Aiden McClelland <me@drbonez.dev>
30 lines
614 B
TypeScript
30 lines
614 B
TypeScript
import {
|
|
computed,
|
|
Directive,
|
|
inject,
|
|
InjectionToken,
|
|
input,
|
|
} from '@angular/core'
|
|
|
|
export const VERSION = new InjectionToken<string>('VERSION')
|
|
|
|
@Directive({
|
|
selector: '[docsLink]',
|
|
host: {
|
|
target: '_blank',
|
|
rel: 'noreferrer',
|
|
'[href]': 'url()',
|
|
},
|
|
})
|
|
export class DocsLinkDirective {
|
|
private readonly version = inject(VERSION)
|
|
|
|
readonly href = input.required<string>()
|
|
|
|
protected readonly url = computed(() => {
|
|
const path = this.href()
|
|
const relative = path.startsWith('/') ? path : `/${path}`
|
|
return `https://docs.start9.com${relative}?os=${this.version}`
|
|
})
|
|
}
|