Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dev/prod/src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ export async function configurePlatform() {
if (err.message.includes('Loading chunk') && i != 4) {
continue
}
console.log('reload due to loading error')
location.reload()
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/presentation/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ addTxListener((txes: Tx[]) => {
if (cud.objectClass === core.class.PluginConfiguration) {
if (cud.operations.enabled !== undefined) {
// Plugin enabled/disabled we need to refresh
console.log('reload due to changed plugin configuration')
location.reload()
}
}
Expand Down
1 change: 1 addition & 0 deletions plugins/login-resources/src/components/Auth.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
time={status.params.notBefore * 1000}
showHours={true}
on:timeout={() => {
console.log('reload due to token inactive')
window.location.reload()
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
dangerous: true,
action: async () => {
await doRelease()

console.log('reload due to primary social id release')
location.reload()
}
})
Expand Down
9 changes: 9 additions & 0 deletions plugins/workbench-resources/src/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ export async function connect (title: string): Promise<Client | undefined> {
localStorage.setItem(`versionUpgrade:s${serverVersion}:f${frontVersion}`, 't')
// It might have been refreshed manually and download has started - do not reload
if (!isUpgrading) {
console.log('reload due to version upgrade')
location.reload()
}

Expand All @@ -255,6 +256,7 @@ export async function connect (title: string): Promise<Client | undefined> {
// It might be possible that this callback will fire after the user has spent some time
// in the upgrade !modal! dialog and clicked upgrade - check again and do not reload
if (get(upgradeDownloadProgress) < 0) {
console.log('reload due to upgrade download')
location.reload()
}
}, 10000)
Expand All @@ -268,6 +270,7 @@ export async function connect (title: string): Promise<Client | undefined> {
return true
},
onUpgrade: () => {
console.log('reload due to upgrade')
location.reload()
},
onUnauthorized: () => {
Expand All @@ -292,6 +295,7 @@ export async function connect (title: string): Promise<Client | undefined> {
translateCB(plugin.string.WorkspaceIsMigrating, {}, get(themeStore).language, (r) => {
versionError.set(r)
setTimeout(() => {
console.log('reload due to migration')
location.reload()
}, 5000)
})
Expand Down Expand Up @@ -326,6 +330,7 @@ export async function connect (title: string): Promise<Client | undefined> {
}

if (event === ClientConnectEvent.Upgraded) {
console.log('reload due to upgrade')
window.location.reload()
}

Expand All @@ -344,6 +349,7 @@ export async function connect (title: string): Promise<Client | undefined> {

if (currentVersionStr !== reconnectVersionStr) {
// It seems upgrade happened
console.log('reload due to version mismatch')
location.reload()
versionError.set(`${currentVersionStr} != ${reconnectVersionStr}`)
}
Expand All @@ -357,6 +363,7 @@ export async function connect (title: string): Promise<Client | undefined> {
if (reconnectVersionStr !== '' && currentVersionStr !== reconnectVersionStr) {
if (typeof sessionStorage !== 'undefined') {
if (sessionStorage.getItem(versionStorageKey) !== reconnectVersionStr) {
console.log('reload due to version mismatch')
sessionStorage.setItem(versionStorageKey, reconnectVersionStr)
location.reload()
}
Expand All @@ -370,10 +377,12 @@ export async function connect (title: string): Promise<Client | undefined> {
try {
const frontConfig = await loadServerConfig(concatLink(frontUrl, '/config.json'))
if (frontConfig?.version !== undefined && frontConfig.version !== currentFrontVersion) {
console.log('reload due to config version mismatch')
location.reload()
}
} catch (err: any) {
// Failed to load server config, reload location
console.log('reload due to config loading error')
location.reload()
}
}
Expand Down
Loading