mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 08:20:39 +00:00
Qfix desktop upgrade (#6643)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
42c602ee67
commit
14937d13bf
@ -18,7 +18,13 @@ import presentation, {
|
|||||||
setClient,
|
setClient,
|
||||||
setPresentationCookie
|
setPresentationCookie
|
||||||
} from '@hcengineering/presentation'
|
} from '@hcengineering/presentation'
|
||||||
import { fetchMetadataLocalStorage, getCurrentLocation, navigate, setMetadataLocalStorage } from '@hcengineering/ui'
|
import {
|
||||||
|
embeddedPlatform,
|
||||||
|
fetchMetadataLocalStorage,
|
||||||
|
getCurrentLocation,
|
||||||
|
navigate,
|
||||||
|
setMetadataLocalStorage
|
||||||
|
} from '@hcengineering/ui'
|
||||||
import { writable } from 'svelte/store'
|
import { writable } from 'svelte/store'
|
||||||
export const versionError = writable<string | undefined>(undefined)
|
export const versionError = writable<string | undefined>(undefined)
|
||||||
const versionStorageKey = 'last_server_version'
|
const versionStorageKey = 'last_server_version'
|
||||||
@ -84,9 +90,13 @@ export async function connect (title: string): Promise<Client | undefined> {
|
|||||||
} else {
|
} else {
|
||||||
versionError.set(`Front version ${frontVersion} is not in sync with server version ${serverVersion}`)
|
versionError.set(`Front version ${frontVersion} is not in sync with server version ${serverVersion}`)
|
||||||
|
|
||||||
setTimeout(() => {
|
if (!embeddedPlatform) {
|
||||||
location.reload()
|
setTimeout(() => {
|
||||||
}, 5000)
|
location.reload()
|
||||||
|
}, 5000)
|
||||||
|
}
|
||||||
|
// For embedded it should download the upgrade and restart the app
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ import presentation, {
|
|||||||
uiContext
|
uiContext
|
||||||
} from '@hcengineering/presentation'
|
} from '@hcengineering/presentation'
|
||||||
import {
|
import {
|
||||||
|
embeddedPlatform,
|
||||||
fetchMetadataLocalStorage,
|
fetchMetadataLocalStorage,
|
||||||
getCurrentLocation,
|
getCurrentLocation,
|
||||||
locationStorageKeyId,
|
locationStorageKeyId,
|
||||||
@ -170,9 +171,13 @@ export async function connect (title: string): Promise<Client | undefined> {
|
|||||||
} else {
|
} else {
|
||||||
versionError.set(`Front version ${frontVersion} is not in sync with server version ${serverVersion}`)
|
versionError.set(`Front version ${frontVersion} is not in sync with server version ${serverVersion}`)
|
||||||
|
|
||||||
setTimeout(() => {
|
if (!embeddedPlatform) {
|
||||||
location.reload()
|
setTimeout(() => {
|
||||||
}, 5000)
|
location.reload()
|
||||||
|
}, 5000)
|
||||||
|
}
|
||||||
|
// For embedded it should download the upgrade and restart the app
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user