mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
* 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>
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
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'
|
|
}
|
|
}
|
|
}
|