mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
ST port labels and move logout to settings (#3134)
* chore: update packages (#3132) * chore: update packages * start tunnel messaging * chore: standalone * pbpaste instead --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> * port labels and move logout to settings * enable-disable forwards * Fix docs URLs in start-tunnel installer output (#3135) --------- Co-authored-by: Alex Inkin <alexander@inkin.ru> Co-authored-by: gStart9 <106188942+gStart9@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
||||
import { knownRegistries, sameUrl } from '@start9labs/shared'
|
||||
|
||||
@Component({
|
||||
selector: 'store-icon',
|
||||
template: `
|
||||
@if (icon) {
|
||||
<img
|
||||
[style.border-radius.%]="100"
|
||||
[style.max-width]="size || '100%'"
|
||||
[src]="icon"
|
||||
alt="Registry Icon"
|
||||
/>
|
||||
} @else {
|
||||
<img
|
||||
[style.max-width]="size || '100%'"
|
||||
src="assets/img/storefront-outline.png"
|
||||
alt="Registry Icon"
|
||||
/>
|
||||
}
|
||||
`,
|
||||
styles: ':host { overflow: hidden; }',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class StoreIconComponent {
|
||||
@Input()
|
||||
url = ''
|
||||
@Input()
|
||||
size?: string
|
||||
|
||||
get icon() {
|
||||
const { start9Alpha, start9Beta, start9, community } = knownRegistries
|
||||
|
||||
if (sameUrl(this.url, start9Alpha)) {
|
||||
return 'assets/img/icon_alpha.png'
|
||||
} else if (sameUrl(this.url, start9Beta)) {
|
||||
return 'assets/img/icon_beta.png'
|
||||
} else if (sameUrl(this.url, start9)) {
|
||||
return 'assets/img/icon_transparent.png'
|
||||
} else if (sameUrl(this.url, community)) {
|
||||
return 'assets/img/community-icon.png'
|
||||
} else {
|
||||
return 'assets/img/storefront-outline.png'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user