chore: small changes

This commit is contained in:
waterplea
2024-08-16 14:39:54 +04:00
parent 015131f198
commit 0abe08f243
4 changed files with 5 additions and 6 deletions

View File

@@ -47,7 +47,6 @@ import { DataModel } from 'src/app/services/patch-db/data-model'
[type]="context.data.type"
[target]="target"
[serverId]="serverId"
]
/>
<div [style.color]="'var(--tui-text-secondary'">
{{ displayInfo.description }}
@@ -77,7 +76,7 @@ export class BackupsTargetModal {
private readonly dialogs = inject(TuiDialogService)
private readonly errorService = inject(ErrorService)
private readonly api = inject(ApiService)
private readonly patch = inject(PatchDB<DataModel>)
private readonly patch = inject<PatchDB<DataModel>>(PatchDB)
readonly context =
inject<TuiDialogContext<BackupTarget, { type: BackupType }>>(

View File

@@ -25,7 +25,7 @@ export class MetricsService extends Observable<ServerMetrics> {
),
// @TODO Alex how to handle failure and reconnection here? Simple retry() will not work. Seems like we need a general solution for reconnecting websockets: patchDB, logs, metrics, progress, and any future. Reconnection should depend on server state, then we need to get a new guid, then reconnect. Similar to how patchDB websocket currently behaves on disconnect/reconnect.
retry(),
shareReplay(),
shareReplay(1),
)
constructor() {

View File

@@ -38,7 +38,7 @@ export class DepErrorService {
),
),
distinctUntilChanged(deepEqual),
shareReplay({ bufferSize: 1, refCount: true }),
shareReplay(1),
)
constructor(

View File

@@ -76,7 +76,7 @@ export class MarketplaceService implements AbstractMarketplaceService {
map(({ selectedUrl: url, knownHosts: hosts }) =>
toStoreIdentity(url, hosts[url]),
),
shareReplay({ bufferSize: 1, refCount: true }),
shareReplay(1),
)
private readonly marketplace$ = this.knownHosts$.pipe(
@@ -102,7 +102,7 @@ export class MarketplaceService implements AbstractMarketplaceService {
},
{},
),
shareReplay({ bufferSize: 1, refCount: true }),
shareReplay(1),
)
private readonly filteredMarketplace$ = combineLatest([