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:
Alex Inkin
2025-03-10 23:09:08 +04:00
committed by GitHub
parent fa3329abf2
commit be0371fb11
60 changed files with 746 additions and 1207 deletions

View File

@@ -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:

View File

@@ -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$,