mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
chore: refactor settings (#2846)
* small type changes and clear todos * handle notifications and metrics * wip * fixes * migration * dedup all urls * better handling of clearnet ips * add rfkill dependency * chore: refactor settings --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -26,7 +26,7 @@ export class BadgeService {
|
||||
private readonly notifications = inject(NotificationService)
|
||||
private readonly exver = inject(Exver)
|
||||
private readonly patch = inject<PatchDB<DataModel>>(PatchDB)
|
||||
private readonly settings$ = combineLatest([
|
||||
private readonly system$ = combineLatest([
|
||||
this.patch.watch$('serverInfo', 'ntpSynced'),
|
||||
inject(EOSService).updateAvailable$,
|
||||
]).pipe(map(([synced, update]) => Number(!synced) + Number(update)))
|
||||
@@ -83,8 +83,8 @@ export class BadgeService {
|
||||
switch (id) {
|
||||
// case '/portal/updates':
|
||||
// return this.updates$
|
||||
case '/portal/settings':
|
||||
return this.settings$
|
||||
case '/portal/system':
|
||||
return this.system$
|
||||
case '/portal/notifications':
|
||||
return this.notifications.unreadCount$
|
||||
default:
|
||||
|
||||
@@ -29,11 +29,7 @@ export class EOSService {
|
||||
readonly updatingOrBackingUp$ = combineLatest([
|
||||
this.updating$,
|
||||
this.backingUp$,
|
||||
]).pipe(
|
||||
map(([updating, backingUp]) => {
|
||||
return updating || backingUp
|
||||
}),
|
||||
)
|
||||
]).pipe(map(([updating, backingUp]) => updating || backingUp))
|
||||
|
||||
readonly showUpdate$ = combineLatest([
|
||||
this.updateAvailable$,
|
||||
|
||||
Reference in New Issue
Block a user