rename frontend to web

This commit is contained in:
Matt Hill
2023-11-13 15:59:16 -07:00
parent 09303ab2fb
commit 862ca375ee
869 changed files with 0 additions and 66 deletions

View File

@@ -0,0 +1,9 @@
<img
*ngIf="icon; else noIcon"
[style.max-width]="size || '100%'"
[src]="icon"
alt="Service Icon"
/>
<ng-template #noIcon>
<ion-icon name="storefront-outline" [style.font-size]="size"></ion-icon>
</ng-template>

View File

@@ -0,0 +1,11 @@
import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { IonicModule } from '@ionic/angular'
import { StoreIconComponent } from './store-icon.component'
@NgModule({
declarations: [StoreIconComponent],
imports: [CommonModule, IonicModule],
exports: [StoreIconComponent],
})
export class StoreIconComponentModule {}

View File

@@ -0,0 +1,28 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
import { MarketplaceConfig, sameUrl } from '@start9labs/shared'
@Component({
selector: 'store-icon',
templateUrl: './store-icon.component.html',
styleUrls: ['./store-icon.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class StoreIconComponent {
@Input()
url = ''
@Input()
size?: string
@Input({ required: true })
marketplace!: MarketplaceConfig
get icon() {
const { start9, community } = this.marketplace
if (sameUrl(this.url, start9)) {
return 'assets/img/icon_transparent.png'
} else if (sameUrl(this.url, community)) {
return 'assets/img/community-store.png'
}
return null
}
}