mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
show available marketplace updates in menu (#1613)
* show service updates in menu
This commit is contained in:
@@ -24,11 +24,7 @@ export class MarketplaceListPage {
|
||||
startWith({}),
|
||||
)
|
||||
|
||||
readonly categories$ = this.marketplaceService
|
||||
.getCategories()
|
||||
.pipe(
|
||||
map(categories => new Set(['featured', 'updates', ...categories, 'all'])),
|
||||
)
|
||||
readonly categories$ = this.marketplaceService.getCategories()
|
||||
|
||||
readonly pkgs$: Observable<MarketplacePkg[]> = this.patch
|
||||
.watch$('server-info')
|
||||
|
||||
@@ -7,23 +7,25 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content *ngIf="ui$ | async as ui" class="ion-padding-top">
|
||||
<ion-item-group *ngIf="server$ | async as server">
|
||||
<ion-item-divider>General</ion-item-divider>
|
||||
<ion-item button (click)="presentModalName('Embassy-' + server.id)">
|
||||
<ion-label>Device Name</ion-label>
|
||||
<ion-note slot="end">{{ ui.name || 'Embassy-' + server.id }}</ion-note>
|
||||
</ion-item>
|
||||
<ion-content class="ion-padding-top">
|
||||
<ng-container *ngIf="ui$ | async as ui">
|
||||
<ion-item-group *ngIf="server$ | async as server">
|
||||
<ion-item-divider>General</ion-item-divider>
|
||||
<ion-item button (click)="presentModalName('Embassy-' + server.id)">
|
||||
<ion-label>Device Name</ion-label>
|
||||
<ion-note slot="end">{{ ui.name || 'Embassy-' + server.id }}</ion-note>
|
||||
</ion-item>
|
||||
|
||||
<ion-item-divider>Marketplace</ion-item-divider>
|
||||
<ion-item
|
||||
button
|
||||
(click)="serverConfig.presentAlert('auto-check-updates', ui['auto-check-updates'] !== false)"
|
||||
>
|
||||
<ion-label>Auto Check for Updates</ion-label>
|
||||
<ion-note slot="end">
|
||||
{{ ui['auto-check-updates'] !== false ? 'Enabled' : 'Disabled' }}
|
||||
</ion-note>
|
||||
</ion-item>
|
||||
</ion-item-group>
|
||||
<ion-item-divider>Marketplace</ion-item-divider>
|
||||
<ion-item
|
||||
button
|
||||
(click)="serverConfig.presentAlert('auto-check-updates', ui['auto-check-updates'] !== false)"
|
||||
>
|
||||
<ion-label>Auto Check for Updates</ion-label>
|
||||
<ion-note slot="end">
|
||||
{{ ui['auto-check-updates'] !== false ? 'Enabled' : 'Disabled' }}
|
||||
</ion-note>
|
||||
</ion-item>
|
||||
</ion-item-group>
|
||||
</ng-container>
|
||||
</ion-content>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Component, ViewChild } from '@angular/core'
|
||||
import { PatchDbService } from 'src/app/services/patch-db/patch-db.service'
|
||||
import {
|
||||
IonContent,
|
||||
LoadingController,
|
||||
ModalController,
|
||||
ToastController,
|
||||
@@ -20,7 +19,6 @@ import { LocalStorageService } from '../../../services/local-storage.service'
|
||||
styleUrls: ['./preferences.page.scss'],
|
||||
})
|
||||
export class PreferencesPage {
|
||||
@ViewChild(IonContent) content: IonContent
|
||||
clicks = 0
|
||||
|
||||
readonly ui$ = this.patch.watch$('ui')
|
||||
@@ -36,10 +34,6 @@ export class PreferencesPage {
|
||||
readonly serverConfig: ServerConfigService,
|
||||
) {}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.content.scrollToPoint(undefined, 1)
|
||||
}
|
||||
|
||||
async presentModalName(placeholder: string): Promise<void> {
|
||||
const options: GenericInputOptions = {
|
||||
title: 'Edit Device Name',
|
||||
|
||||
Reference in New Issue
Block a user