ui: adds version to path of welcome OS

This commit is contained in:
Aaron Greenspan
2021-01-14 17:28:53 -07:00
committed by Aiden McClelland
parent da922f498e
commit 16a4c41886
4 changed files with 5 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ export abstract class ApiService {
abstract getNotifications (page: number, perPage: number): Promise<S9Notification[]> abstract getNotifications (page: number, perPage: number): Promise<S9Notification[]>
abstract deleteNotification (id: string): Promise<Unit> abstract deleteNotification (id: string): Promise<Unit>
abstract updateAgent (thing: any): Promise<Unit> abstract updateAgent (thing: any): Promise<Unit>
abstract acknowledgeOSWelcome (): Promise<Unit> abstract acknowledgeOSWelcome (version: string): Promise<Unit>
abstract getAvailableApps (): Promise<AppAvailablePreview[]> abstract getAvailableApps (): Promise<AppAvailablePreview[]>
abstract getAvailableApp (appId: string): Promise<AppAvailableFull> abstract getAvailableApp (appId: string): Promise<AppAvailableFull>
abstract getAvailableAppVersionSpecificInfo (appId: string, versionSpec: string): Promise<AppAvailableVersionSpecificInfo> abstract getAvailableAppVersionSpecificInfo (appId: string, versionSpec: string): Promise<AppAvailableVersionSpecificInfo>

View File

@@ -37,8 +37,8 @@ export class LiveApiService extends ApiService {
return this.authRequest<ReqRes.GetServerRes>({ method: Method.GET, url: '/', readTimeout: timeout }) return this.authRequest<ReqRes.GetServerRes>({ method: Method.GET, url: '/', readTimeout: timeout })
} }
async acknowledgeOSWelcome (): Promise<Unit> { async acknowledgeOSWelcome (version: string): Promise<Unit> {
return this.authRequest<Unit>({ method: Method.POST, url: '/welcome' }) return this.authRequest<Unit>({ method: Method.POST, url: `/welcome/${version}` })
} }
async getVersionLatest (): Promise<ReqRes.GetVersionLatestRes> { async getVersionLatest (): Promise<ReqRes.GetVersionLatestRes> {

View File

@@ -117,7 +117,7 @@ export class MockApiService extends ApiService {
return mockUninstallApp() return mockUninstallApp()
} }
async acknowledgeOSWelcome () { async acknowledgeOSWelcome (version: string) {
await pauseFor(2000) await pauseFor(2000)
this.welcomeAck = true this.welcomeAck = true
return { } return { }

View File

@@ -75,7 +75,7 @@ export class SyncNotifier {
modal.onWillDismiss().then(() => { modal.onWillDismiss().then(() => {
this.osWelcomeOpen = false this.osWelcomeOpen = false
return this.apiService.acknowledgeOSWelcome() return this.apiService.acknowledgeOSWelcome(this.config.version)
}) })
await modal.present() await modal.present()
} }