-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2709 from Start9Labs/fix-build
fix: fix build after minor merged into major
- Loading branch information
Showing
198 changed files
with
974 additions
and
3,993 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
web/projects/marketplace/src/modals/release-notes.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { CommonModule } from '@angular/common' | ||
import { | ||
ChangeDetectionStrategy, | ||
Component, | ||
inject, | ||
Input, | ||
} from '@angular/core' | ||
import { Exver, MarkdownPipeModule } from '@start9labs/shared' | ||
import { TuiButton, TuiLoader } from '@taiga-ui/core' | ||
import { TuiCardLarge } from '@taiga-ui/layout' | ||
import { PolymorpheusComponent } from '@taiga-ui/polymorpheus' | ||
import { map } from 'rxjs' | ||
import { AbstractMarketplaceService } from '../services/marketplace.service' | ||
import { MarketplacePkg } from '../types' | ||
|
||
@Component({ | ||
standalone: true, | ||
template: ` | ||
@if (notes$ | async; as notes) { | ||
@for (note of notes | keyvalue: asIsOrder; track $index) { | ||
<button tuiButton (click)="setSelected(note.key)"> | ||
{{ note.key }} | ||
</button> | ||
<div | ||
tuiCardLarge | ||
#element | ||
[id]="note.key" | ||
[style.max-height.px]="getDocSize(note.key, element)" | ||
[innerHTML]="note.value | markdown" | ||
></div> | ||
} | ||
} @else { | ||
<tui-loader textContent="Loading Release Notes" /> | ||
} | ||
`, | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
imports: [ | ||
CommonModule, | ||
TuiButton, | ||
TuiLoader, | ||
TuiCardLarge, | ||
MarkdownPipeModule, | ||
], | ||
}) | ||
export class ReleaseNotesComponent { | ||
@Input() pkg!: MarketplacePkg | ||
|
||
private selected: string | null = null | ||
private readonly exver = inject(Exver) | ||
|
||
readonly notes$ = inject(AbstractMarketplaceService) | ||
.getSelectedStore$() | ||
.pipe( | ||
map(s => { | ||
return Object.entries(this.pkg.otherVersions) | ||
.filter( | ||
([v, _]) => | ||
this.exver.getFlavor(v) === this.pkg.flavor && | ||
this.exver.compareExver(this.pkg.version, v) === 1, | ||
) | ||
.reduce( | ||
(obj, [version, info]) => ({ | ||
...obj, | ||
[version]: info.releaseNotes, | ||
}), | ||
{ | ||
[`${this.pkg.version} (current)`]: this.pkg.releaseNotes, | ||
}, | ||
) | ||
}), | ||
) | ||
|
||
isSelected(key: string): boolean { | ||
return this.selected === key | ||
} | ||
|
||
setSelected(selected: string) { | ||
this.selected = this.isSelected(selected) ? null : selected | ||
} | ||
|
||
getDocSize(key: string, { scrollHeight }: HTMLElement) { | ||
return this.isSelected(key) ? scrollHeight : 0 | ||
} | ||
|
||
asIsOrder(a: any, b: any) { | ||
return 0 | ||
} | ||
} | ||
|
||
export const RELEASE_NOTES = new PolymorpheusComponent(ReleaseNotesComponent) |
51 changes: 0 additions & 51 deletions
51
web/projects/marketplace/src/modals/release-notes/release-notes.component.html
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
web/projects/marketplace/src/modals/release-notes/release-notes.component.scss
This file was deleted.
Oops, something went wrong.
70 changes: 0 additions & 70 deletions
70
web/projects/marketplace/src/modals/release-notes/release-notes.component.ts
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
web/projects/marketplace/src/modals/release-notes/release-notes.module.ts
This file was deleted.
Oops, something went wrong.
14 changes: 7 additions & 7 deletions
14
web/projects/marketplace/src/pages/list/categories/categories.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<button | ||
*ngFor="let cat of categories || ['', '', '', '', '', '']" | ||
(click)="switchCategory(cat)" | ||
[class.category_selected]="cat === category" | ||
*ngFor="let cat of categories || fallback | keyvalue" | ||
(click)="switchCategory(cat.key)" | ||
[class.category_selected]="cat.key === category" | ||
> | ||
<div | ||
class="category-wrapper" | ||
[class.tui-skeleton]="!categories" | ||
[class.tui-skeleton_rounded]="!categories" | ||
> | ||
<tui-icon tuiAppearance="icon" icon="{{ determineIcon(cat) }}"></tui-icon> | ||
<tui-icon tuiAppearance="icon" [icon]="determineIcon(cat.key)" /> | ||
</div> | ||
<span | ||
class="category-title" | ||
[class.tui-skeleton]="!categories" | ||
[class.tui-skeleton_rounded]="!categories" | ||
> | ||
{{ | ||
cat === 'ai' | ||
? (cat | uppercase) | ||
: (cat | titlecase) || 'Loading category...' | ||
cat.key === 'ai' | ||
? (cat.key | uppercase) | ||
: (cat.value.name | titlecase) || 'Loading category...' | ||
}} | ||
</span> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.