mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Progress bar (#377)
* looking for unnecessary watches * on init data initialization * prog pipe * install progress everywhere * titlecase status * include updateing state in app show for install progress Co-authored-by: Drew Ansbacher <drew.ansbacher@spiredigital.com> Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
This commit is contained in:
committed by
Aiden McClelland
parent
dc923ea6fb
commit
4c294566d7
@@ -485,12 +485,11 @@ export class MockApiService extends ApiService {
|
||||
]
|
||||
for (let phase of phases) {
|
||||
let i = initialProgress[phase.progress]
|
||||
console.log('PHASE', phase)
|
||||
console.log('Initial i', i)
|
||||
while (i < initialProgress.size) {
|
||||
console.log(i)
|
||||
await pauseFor(1000)
|
||||
i = Math.min(i + 40, initialProgress.size)
|
||||
i = Math.min(i + 5, initialProgress.size)
|
||||
initialProgress[phase.progress] = i
|
||||
if (i === initialProgress.size) {
|
||||
initialProgress[phase.completion] = true
|
||||
|
||||
@@ -85,7 +85,7 @@ export class MarketplaceMockApiService extends MarketplaceApiService {
|
||||
if (this.useLocal(url)) {
|
||||
await pauseFor(2000)
|
||||
return params.ids.reduce((obj, id) => {
|
||||
obj[id] = this.patch.data['package-data']?.[id]?.manifest.version.replace('0', '1')
|
||||
obj[id] = this.patch.getData()['package-data']?.[id]?.manifest.version.replace('0', '1')
|
||||
return obj
|
||||
}, { })
|
||||
}
|
||||
|
||||
@@ -22,8 +22,9 @@ export class PatchDbService {
|
||||
connectionStatus$ = new BehaviorSubject(ConnectionStatus.Initializing)
|
||||
private patchDb: PatchDB<DataModel>
|
||||
private patchSub: Subscription
|
||||
data: DataModel
|
||||
|
||||
get data () { return this.patchDb.store.cache.data }
|
||||
getData () { return this.patchDb.store.cache.data }
|
||||
|
||||
constructor (
|
||||
@Inject(PATCH_SOURCE) private readonly source: Source<DataModel>,
|
||||
@@ -34,6 +35,7 @@ export class PatchDbService {
|
||||
async init (): Promise<void> {
|
||||
const cache = await this.bootstrapper.init()
|
||||
this.patchDb = new PatchDB([this.source, this.http], this.http, cache)
|
||||
this.data = this.patchDb.store.cache.data
|
||||
}
|
||||
|
||||
start (): void {
|
||||
|
||||
Reference in New Issue
Block a user