mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
Fix/misc frontend (#2273)
* update pwa icon to official latest * fix bug if icon is null in assets * dismiss modal when connecting to a new registry
This commit is contained in:
@@ -6,19 +6,22 @@ import { MarketplacePkg } from '../types'
|
||||
})
|
||||
export class MimeTypePipe implements PipeTransform {
|
||||
transform(pkg: MarketplacePkg): string {
|
||||
switch (pkg.manifest.assets.icon.split('.').pop()) {
|
||||
case 'png':
|
||||
return `data:image/png;base64,${pkg.icon}`
|
||||
case 'jpeg':
|
||||
case 'jpg':
|
||||
return `data:image/jpeg;base64,${pkg.icon}`
|
||||
case 'gif':
|
||||
return `data:image/gif;base64,${pkg.icon}`
|
||||
case 'svg':
|
||||
return `data:image/svg+xml;base64,${pkg.icon}`
|
||||
default:
|
||||
return `data:image/png;base64,${pkg.icon}`
|
||||
if (pkg.manifest.assets.icon) {
|
||||
switch (pkg.manifest.assets.icon.split('.').pop()) {
|
||||
case 'png':
|
||||
return `data:image/png;base64,${pkg.icon}`
|
||||
case 'jpeg':
|
||||
case 'jpg':
|
||||
return `data:image/jpeg;base64,${pkg.icon}`
|
||||
case 'gif':
|
||||
return `data:image/gif;base64,${pkg.icon}`
|
||||
case 'svg':
|
||||
return `data:image/svg+xml;base64,${pkg.icon}`
|
||||
default:
|
||||
return `data:image/png;base64,${pkg.icon}`
|
||||
}
|
||||
}
|
||||
return `data:image/png;base64,${pkg.icon}`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
frontend/projects/shared/assets/img/icon_pwa.png
Normal file
BIN
frontend/projects/shared/assets/img/icon_pwa.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 34 KiB |
@@ -1,4 +1,9 @@
|
||||
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
Inject,
|
||||
ViewChild,
|
||||
} from '@angular/core'
|
||||
import {
|
||||
ActionSheetController,
|
||||
AlertController,
|
||||
@@ -6,12 +11,7 @@ import {
|
||||
ModalController,
|
||||
} from '@ionic/angular'
|
||||
import { ActionSheetButton } from '@ionic/core'
|
||||
import {
|
||||
ErrorToastService,
|
||||
isValidHttpUrl,
|
||||
sameUrl,
|
||||
toUrl,
|
||||
} from '@start9labs/shared'
|
||||
import { ErrorToastService, sameUrl, toUrl } from '@start9labs/shared'
|
||||
import { AbstractMarketplaceService } from '@start9labs/marketplace'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { ValueSpecObject } from 'src/app/pkg-config/config-types'
|
||||
@@ -162,6 +162,7 @@ export class MarketplaceSettingsPage {
|
||||
this.errToast.present(e)
|
||||
} finally {
|
||||
loader.dismiss()
|
||||
this.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,6 +190,7 @@ export class MarketplaceSettingsPage {
|
||||
this.errToast.present(e)
|
||||
} finally {
|
||||
loader.dismiss()
|
||||
this.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"id": "/",
|
||||
"icons": [
|
||||
{
|
||||
"src": "assets/img/logo_solid.png",
|
||||
"src": "assets/img/icon_pwa.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
|
||||
Reference in New Issue
Block a user