Remove app wiz and dry calls (#1541)

* no more app wiz or dry calls

* change spinner type

* better display for update available

* reintroduce dep breakages for update/downgrade and style alerts everywhere

* only show install alert on first install

Co-authored-by: Matt Hill <matthill@Matt-M1.local>
Co-authored-by: Matt Hill <matthill@Matt-M1.start9.dev>
This commit is contained in:
Matt Hill
2022-06-16 13:30:23 -06:00
committed by Lucy C
parent 37304a9d92
commit 0ac5b34f2d
57 changed files with 669 additions and 521 deletions

View File

@@ -34,14 +34,6 @@ export class WizardDefs {
},
}
: undefined,
{
selector: 'dependents',
params: {
verb: 'updating',
title,
Fn: () => this.embassyApi.dryUpdatePackage({ id, version }),
},
},
{
selector: 'complete',
params: {
@@ -67,54 +59,6 @@ export class WizardDefs {
}
}
updateOS(values: {
version: string
releaseNotes: { [version: string]: string }
headline: string
}): AppWizardComponent['params'] {
const { version, releaseNotes, headline } = values
const versions = Object.keys(releaseNotes)
.sort()
.reverse()
.map(version => {
return {
version,
notes: releaseNotes[version],
}
})
const title = 'EmbassyOS'
const slides: SlideDefinition[] = [
{
selector: 'notes',
params: {
versions,
headline,
},
},
{
selector: 'complete',
params: {
verb: 'beginning update for',
title,
Fn: () =>
this.embassyApi.updateServer({
'marketplace-url': this.config.marketplace.url,
}),
},
},
]
return {
action: 'update',
title,
version,
slides: slides.filter(exists),
submitBtn: 'Begin Update',
}
}
downgrade(values: {
id: string
title: string
@@ -132,14 +76,6 @@ export class WizardDefs {
},
}
: undefined,
{
selector: 'dependents',
params: {
verb: 'downgrading',
title,
Fn: () => this.embassyApi.dryUpdatePackage({ id, version }),
},
},
{
selector: 'complete',
params: {
@@ -180,14 +116,6 @@ export class WizardDefs {
message: uninstallAlert || defaultUninstallWarning(title),
},
},
{
selector: 'dependents',
params: {
verb: 'uninstalling',
title,
Fn: () => this.embassyApi.dryUninstallPackage({ id }),
},
},
{
selector: 'complete',
params: {
@@ -210,14 +138,6 @@ export class WizardDefs {
const { title, id } = values
const slides: SlideDefinition[] = [
{
selector: 'dependents',
params: {
verb: 'stopping',
title,
Fn: () => this.embassyApi.dryStopPackage({ id }),
},
},
{
selector: 'complete',
params: {