* display preference for suto check and better messaging on properties page

* improve logs by a lot

* clean up

* fix searchbar and url in marketplace
This commit is contained in:
Matt Hill
2022-09-23 14:51:28 -06:00
committed by GitHub
parent c85491cc71
commit 061a350cc6
9 changed files with 31 additions and 36 deletions

View File

@@ -21,11 +21,11 @@
<ng-template #loaded>
<!-- not running -->
<ion-item *ngIf="notRunning$ | async" class="ion-margin-bottom">
<ion-item *ngIf="stopped$ | async" class="ion-margin-bottom">
<ion-label>
<p>
<ion-text color="warning"
>Service not running. Information on this page could be
>Service is stopped. Information on this page could be
inaccurate.</ion-text
>
</p>

View File

@@ -40,9 +40,9 @@ export class AppPropertiesPage {
properties: PackageProperties = {}
unmasked: { [key: string]: boolean } = {}
notRunning$ = this.patch
stopped$ = this.patch
.watch$('package-data', this.pkgId, 'installed', 'status', 'main', 'status')
.pipe(map(status => status !== PackageMainStatus.Running))
.pipe(map(status => status === PackageMainStatus.Stopped))
@ViewChild(IonBackButtonDelegate, { static: false })
backButton?: IonBackButtonDelegate

View File

@@ -23,7 +23,6 @@
<ion-row>
<ion-col size="12">
<h1 class="heading montserrat ion-text-center">{{ details.name }}</h1>
<p style="margin-top: 0">{{ details.url }}</p>
<marketplace-search [(query)]="query"></marketplace-search>
</ion-col>
</ion-row>

View File

@@ -17,12 +17,14 @@
<ion-item-divider>Marketplace</ion-item-divider>
<ion-item
*ngIf="autoCheck$ | async as auto"
*ngIf="ui$ | async as ui"
button
(click)="serverConfig.presentAlert('auto-check-updates', auto)"
(click)="serverConfig.presentAlert('auto-check-updates', ui['auto-check-updates'])"
>
<ion-label>Auto Check for Updates</ion-label>
<ion-note slot="end"> {{ auto ? 'Enabled' : 'Disabled' }} </ion-note>
<ion-note slot="end">
{{ ui['auto-check-updates'] ? 'Enabled' : 'Disabled' }}
</ion-note>
</ion-item>
</ion-item-group>
</ion-content>

View File

@@ -27,7 +27,7 @@ import { DataModel } from 'src/app/services/patch-db/data-model'
export class PreferencesPage {
clicks = 0
readonly autoCheck$ = this.patch.watch$('ui', 'auto-check-updates')
readonly ui$ = this.patch.watch$('ui')
readonly server$ = this.patch.watch$('server-info')
readonly name$ = this.serverNameService.name$