refactor: refactor sideload page (#2475)

* refactor: refactor sideload page

* chore: improve ux

* chore: update

* chore: update
This commit is contained in:
Alex Inkin
2023-11-06 21:05:05 +04:00
committed by GitHub
parent b195e3435f
commit 06207145af
58 changed files with 952 additions and 229 deletions

View File

@@ -1,11 +1,9 @@
<div class="header montserrat">
<img class="logo" alt="" [src]="pkg | mimeType | trustUrl" />
<div class="text">
<h1 ticker class="title">{{ pkg.manifest.title }}</h1>
<p class="version">{{ pkg.manifest.version | displayEmver }}</p>
<p *ngIf="pkg['published-at'] as published" class="published">
Released: {{ published | date : 'medium' }}
</p>
<ng-content></ng-content>
</div>
<img class="logo" alt="" [src]="pkg | mimeType | trustUrl" />
<div class="text">
<h1 ticker class="title">{{ pkg.manifest.title }}</h1>
<p class="version">{{ pkg.manifest.version | displayEmver }}</p>
<p *ngIf="pkg['published-at'] as published" class="published">
Released: {{ published | date : 'medium' }}
</p>
<ng-content></ng-content>
</div>

View File

@@ -1,7 +1,8 @@
.header {
:host {
display: flex;
align-items: flex-start;
padding: 16px;
line-height: 2;
}
.text {

View File

@@ -6,6 +6,8 @@ import { MarketplacePkg } from '../types'
})
export class MimeTypePipe implements PipeTransform {
transform(pkg: MarketplacePkg): string {
if (pkg.icon.startsWith('data:')) return pkg.icon
if (pkg.manifest.assets.icon) {
switch (pkg.manifest.assets.icon.split('.').pop()) {
case 'png':