mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Merge branch 'next/minor' of github.com:Start9Labs/start-os into next/major
This commit is contained in:
@@ -10,6 +10,8 @@ import { configBuilderToSpec } from 'src/app/utils/configBuilderToSpec'
|
||||
import { T, ISB, IST } from '@start9labs/start-sdk'
|
||||
import { GetPackagesRes } from '@start9labs/marketplace'
|
||||
|
||||
import markdown from 'raw-loader!../../../../../shared/assets/markdown/md-sample.md'
|
||||
|
||||
const mockMerkleArchiveCommitment: T.MerkleArchiveCommitment = {
|
||||
rootSighash: 'fakehash',
|
||||
rootMaxsize: 0,
|
||||
@@ -811,6 +813,17 @@ export module Mock {
|
||||
data: null,
|
||||
read: false,
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
packageId: null,
|
||||
createdAt: '2019-12-26T14:20:30.872Z',
|
||||
code: 2,
|
||||
level: 'success',
|
||||
title: 'Welcome to StartOS 0.3.6!',
|
||||
message: 'Click "View Details" to learn all about the new version',
|
||||
data: markdown,
|
||||
read: false,
|
||||
},
|
||||
]
|
||||
|
||||
export function getMetrics(): ServerMetrics {
|
||||
|
||||
@@ -602,7 +602,9 @@ export type NotificationData<T> = T extends 0
|
||||
? null
|
||||
: T extends 1
|
||||
? BackupReport
|
||||
: any
|
||||
: T extends 2
|
||||
? string
|
||||
: any
|
||||
|
||||
export type BackupReport = {
|
||||
server: {
|
||||
|
||||
@@ -4,7 +4,6 @@ import { Mock } from './api.fixures'
|
||||
export const mockPatchData: DataModel = {
|
||||
ui: {
|
||||
name: `Matt's Server`,
|
||||
ackWelcome: '1.0.0',
|
||||
theme: 'Dark',
|
||||
desktop: ['lnd'],
|
||||
marketplace: {
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { TuiDialogService } from '@taiga-ui/core'
|
||||
import { filter, share, switchMap, Observable, map } from 'rxjs'
|
||||
import { Observable } from 'rxjs'
|
||||
import { filter, map, share, switchMap } from 'rxjs/operators'
|
||||
import { PatchDB } from 'patch-db-client'
|
||||
import { DataModel } from 'src/app/services/patch-db/data-model'
|
||||
import { EOSService } from 'src/app/services/eos.service'
|
||||
import { WelcomeComponent } from 'src/app/components/welcome.component'
|
||||
import { ConfigService } from 'src/app/services/config.service'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { ConnectionService } from 'src/app/services/connection.service'
|
||||
import { PolymorpheusComponent } from '@taiga-ui/polymorpheus'
|
||||
import { LocalStorageBootstrap } from './patch-db/local-storage-bootstrap'
|
||||
|
||||
// Get data from PatchDb after is starts and act upon it
|
||||
@@ -25,8 +21,6 @@ export class PatchDataService extends Observable<void> {
|
||||
if (index === 0) {
|
||||
// check for updates to StartOS and services
|
||||
this.checkForUpdates()
|
||||
// show eos welcome message
|
||||
this.showEosWelcome(cache.ui.ackWelcome)
|
||||
}
|
||||
}),
|
||||
share(),
|
||||
@@ -35,9 +29,6 @@ export class PatchDataService extends Observable<void> {
|
||||
constructor(
|
||||
private readonly patch: PatchDB<DataModel>,
|
||||
private readonly eosService: EOSService,
|
||||
private readonly config: ConfigService,
|
||||
private readonly dialogs: TuiDialogService,
|
||||
private readonly embassyApi: ApiService,
|
||||
private readonly connection$: ConnectionService,
|
||||
private readonly bootstrapper: LocalStorageBootstrap,
|
||||
) {
|
||||
@@ -48,22 +39,4 @@ export class PatchDataService extends Observable<void> {
|
||||
this.eosService.loadEos()
|
||||
// this.marketplaceService.getMarketplace$().pipe(take(1)).subscribe()
|
||||
}
|
||||
|
||||
private showEosWelcome(ackVersion: string) {
|
||||
if (this.config.skipStartupAlerts || ackVersion === this.config.version) {
|
||||
return
|
||||
}
|
||||
|
||||
this.dialogs
|
||||
.open(new PolymorpheusComponent(WelcomeComponent), {
|
||||
label: 'Release Notes',
|
||||
})
|
||||
.subscribe({
|
||||
complete: () => {
|
||||
this.embassyApi
|
||||
.setDbValue<string>(['ackWelcome'], this.config.version)
|
||||
.catch()
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ export type DataModel = {
|
||||
|
||||
export type UIData = {
|
||||
name: string | null
|
||||
ackWelcome: string // emver
|
||||
marketplace: UIMarketplaceData
|
||||
gaming: {
|
||||
snake: {
|
||||
|
||||
Reference in New Issue
Block a user