mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
installWarning ~> installAlert
This commit is contained in:
committed by
Aiden McClelland
parent
49628f07e6
commit
71f2c88b8f
@@ -9,9 +9,9 @@ export class WizardBaker {
|
||||
constructor (private readonly apiService: ApiService, private readonly appModel: AppModel) { }
|
||||
|
||||
install (values: {
|
||||
id: string, title: string, version: string, serviceRequirements: AppDependency[], installWarning?: string
|
||||
id: string, title: string, version: string, serviceRequirements: AppDependency[], installAlert?: string
|
||||
}): InstallWizardComponent['params'] {
|
||||
const { id, title, version, serviceRequirements, installWarning } = values
|
||||
const { id, title, version, serviceRequirements, installAlert } = values
|
||||
|
||||
validate(id, exists, 'missing id')
|
||||
validate(title, exists, 'missing title')
|
||||
@@ -22,8 +22,8 @@ export class WizardBaker {
|
||||
const toolbar: TopbarParams = { action, title, version }
|
||||
|
||||
const slideDefinitions: SlideDefinition[] = [
|
||||
installWarning ? { selector: 'developer-notes', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Next', params: {
|
||||
action, developerNotes: installWarning,
|
||||
installAlert ? { selector: 'developer-notes', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Next', params: {
|
||||
action, developerNotes: installAlert,
|
||||
}} : undefined,
|
||||
{ selector: 'dependencies', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Install', params: {
|
||||
action, title, version, serviceRequirements,
|
||||
@@ -38,9 +38,9 @@ export class WizardBaker {
|
||||
}
|
||||
|
||||
update (values: {
|
||||
id: string, title: string, version: string, serviceRequirements: AppDependency[], installWarning?: string
|
||||
id: string, title: string, version: string, serviceRequirements: AppDependency[], installAlert?: string
|
||||
}): InstallWizardComponent['params'] {
|
||||
const { id, title, version, serviceRequirements, installWarning } = values
|
||||
const { id, title, version, serviceRequirements, installAlert } = values
|
||||
|
||||
validate(id, exists, 'missing id')
|
||||
validate(title, exists, 'missing title')
|
||||
@@ -51,8 +51,8 @@ export class WizardBaker {
|
||||
const toolbar: TopbarParams = { action, title, version }
|
||||
|
||||
const slideDefinitions: SlideDefinition[] = [
|
||||
installWarning ? { selector: 'developer-notes', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Next', params: {
|
||||
action, developerNotes: installWarning,
|
||||
installAlert ? { selector: 'developer-notes', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Next', params: {
|
||||
action, developerNotes: installAlert,
|
||||
}} : undefined,
|
||||
{ selector: 'dependencies', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Update', params: {
|
||||
action, title, version, serviceRequirements,
|
||||
@@ -70,9 +70,9 @@ export class WizardBaker {
|
||||
}
|
||||
|
||||
downgrade (values: {
|
||||
id: string, title: string, version: string, serviceRequirements: AppDependency[], installWarning?: string
|
||||
id: string, title: string, version: string, serviceRequirements: AppDependency[], installAlert?: string
|
||||
}): InstallWizardComponent['params'] {
|
||||
const { id, title, version, serviceRequirements, installWarning } = values
|
||||
const { id, title, version, serviceRequirements, installAlert } = values
|
||||
|
||||
validate(id, exists, 'missing id')
|
||||
validate(title, exists, 'missing title')
|
||||
@@ -83,8 +83,8 @@ export class WizardBaker {
|
||||
const toolbar: TopbarParams = { action, title, version }
|
||||
|
||||
const slideDefinitions: SlideDefinition[] = [
|
||||
installWarning ? { selector: 'developer-notes', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Next', params: {
|
||||
action, developerNotes: installWarning,
|
||||
installAlert ? { selector: 'developer-notes', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Next', params: {
|
||||
action, developerNotes: installAlert,
|
||||
}} : undefined,
|
||||
{ selector: 'dependencies', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Downgrade', params: {
|
||||
action, title, version, serviceRequirements,
|
||||
@@ -102,9 +102,9 @@ export class WizardBaker {
|
||||
}
|
||||
|
||||
uninstall (values: {
|
||||
id: string, title: string, version: string, uninstallWarning?: string
|
||||
id: string, title: string, version: string, uninstallAlert?: string
|
||||
}): InstallWizardComponent['params'] {
|
||||
const { id, title, version, uninstallWarning } = values
|
||||
const { id, title, version, uninstallAlert } = values
|
||||
|
||||
validate(id, exists, 'missing id')
|
||||
validate(title, exists, 'missing title')
|
||||
@@ -115,7 +115,7 @@ export class WizardBaker {
|
||||
|
||||
const slideDefinitions: SlideDefinition[] = [
|
||||
{ selector: 'developer-notes', cancelButton: { afterLoading: { text: 'Cancel' } }, nextButton: 'Continue', params: {
|
||||
action, developerNotes: uninstallWarning || defaultUninstallationWarning(title) },
|
||||
action, developerNotes: uninstallAlert || defaultUninstallationWarning(title) },
|
||||
},
|
||||
{ selector: 'dependents', cancelButton: { whileLoading: { }, afterLoading: { text: 'Cancel' } }, nextButton: 'Uninstall', params: {
|
||||
action, verb: 'uninstalling', title, fetchBreakages: () => this.apiService.uninstallApp(id, true).then( ({ breakages }) => breakages ),
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface AppAvailableVersionSpecificInfo {
|
||||
releaseNotes: string
|
||||
serviceRequirements: AppDependency[]
|
||||
versionViewing: string
|
||||
installWarning?: string
|
||||
installAlert?: string
|
||||
}
|
||||
// installed
|
||||
|
||||
@@ -44,7 +44,7 @@ export interface AppInstalledFull extends AppInstalledPreview {
|
||||
lastBackup: string | null
|
||||
configuredRequirements: AppDependency[] | null // null if not yet configured
|
||||
hasFetchedFull: boolean
|
||||
uninstallWarning?: string
|
||||
uninstallAlert?: string
|
||||
}
|
||||
// dependencies
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ export class AppAvailableShowPage extends Cleanup {
|
||||
title: app.title,
|
||||
version: app.versionViewing,
|
||||
serviceRequirements: app.serviceRequirements,
|
||||
installWarning: app.installWarning,
|
||||
installAlert: app.installAlert,
|
||||
}),
|
||||
)
|
||||
if (cancelled) return
|
||||
@@ -175,7 +175,7 @@ export class AppAvailableShowPage extends Cleanup {
|
||||
title: app.title,
|
||||
version: app.versionViewing,
|
||||
serviceRequirements: app.serviceRequirements,
|
||||
installWarning: app.installWarning,
|
||||
installAlert: app.installAlert,
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
|
||||
@@ -267,7 +267,7 @@ export class AppInstalledShowPage extends Cleanup {
|
||||
id: app.id,
|
||||
title: app.title,
|
||||
version: app.versionInstalled,
|
||||
uninstallWarning: app.uninstallWarning,
|
||||
uninstallAlert: app.uninstallAlert,
|
||||
}),
|
||||
)
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ export const cupsI: AppInstalledFull = {
|
||||
instructions: 'some instructions',
|
||||
lastBackup: new Date().toISOString(),
|
||||
ui: true,
|
||||
uninstallWarning: 'This is A GREAT APP man, I just don\'t know',
|
||||
uninstallAlert: 'This is A GREAT APP man, I just don\'t know',
|
||||
configuredRequirements: [
|
||||
toServiceRequirement(lightningI,
|
||||
{
|
||||
@@ -202,7 +202,7 @@ export const thunderA: AppAvailableFull = {
|
||||
descriptionLong: 'Thunder is an innovative payment network and new kind of money. Thunder utilizes a robust p2p network to garner decentralized consensus.',
|
||||
versions: ['0.8.0', '0.8.1', '1.0.0', '1.0.1'],
|
||||
versionViewing: '1.0.1',
|
||||
installWarning: 'Oooooh you really might want to think twice about installing this...',
|
||||
installAlert: 'Oooooh you really might want to think twice about installing this...',
|
||||
serviceRequirements: [
|
||||
toServiceRequirement(bitcoinA, {
|
||||
optional: null,
|
||||
|
||||
Reference in New Issue
Block a user