mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +00:00
UBER-726: Ask to update if manual update is required (#3602)
This commit is contained in:
parent
3f0b785ebb
commit
4cb103f636
@ -25,6 +25,9 @@
|
||||
"AccessWorkspaceSettings": "Access your workspace settings",
|
||||
"HowToWorkFaster": "Learn how to work faster",
|
||||
"HiddenApplication": "Hidden application",
|
||||
"OpenInNewTab": "Open in a new tab"
|
||||
"OpenInNewTab": "Open in a new tab",
|
||||
"NewVersionAvailable": "New version is available",
|
||||
"PleaseUpdate": "Please update",
|
||||
"ServerUnderMaintenance": "Server is under maintenance"
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,9 @@
|
||||
"AccessWorkspaceSettings": "Открыть настройки рабочего пространства",
|
||||
"HowToWorkFaster": "Узнайте как работать эффективнее",
|
||||
"HiddenApplication": "Скрытое приложение",
|
||||
"OpenInNewTab": "Открыть в новой вкладке"
|
||||
"OpenInNewTab": "Открыть в новой вкладке",
|
||||
"NewVersionAvailable": "Доступна новая версия",
|
||||
"PleaseUpdate": "Пожалуйста, обновите приложение",
|
||||
"ServerUnderMaintenance": "Обслуживание сервера"
|
||||
}
|
||||
}
|
||||
|
@ -14,11 +14,13 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { getMetadata } from '@hcengineering/platform'
|
||||
import { Component, Loading, Notifications, location } from '@hcengineering/ui'
|
||||
import { Component, Label, Loading, Notifications, location } from '@hcengineering/ui'
|
||||
import { connect, versionError } from '../connect'
|
||||
|
||||
import { workbenchId } from '@hcengineering/workbench'
|
||||
import workbench from '../plugin'
|
||||
|
||||
const isNeedUpgrade = window.location.host === ''
|
||||
</script>
|
||||
|
||||
{#if $location.path[0] === workbenchId || $location.path[0] === workbench.component.WorkbenchApp}
|
||||
@ -27,9 +29,16 @@
|
||||
<Loading />
|
||||
{:then client}
|
||||
{#if !client && versionError}
|
||||
<div class="antiPopup version-popup">
|
||||
<h1>Server is under maintenance.</h1>
|
||||
{versionError}
|
||||
<div class="version-wrapper">
|
||||
<div class="antiPopup version-popup">
|
||||
{#if isNeedUpgrade}
|
||||
<h1><Label label={workbench.string.NewVersionAvailable} /></h1>
|
||||
<span class="please-update"><Label label={workbench.string.PleaseUpdate} /></span>
|
||||
{:else}
|
||||
<h1><Label label={workbench.string.ServerUnderMaintenance} /></h1>
|
||||
{/if}
|
||||
{versionError}
|
||||
</div>
|
||||
</div>
|
||||
{:else if client}
|
||||
<Notifications>
|
||||
@ -43,14 +52,19 @@
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
.version-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.please-update {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.version-popup {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: fixed;
|
||||
left: 25%;
|
||||
right: 25%;
|
||||
top: 25%;
|
||||
bottom: 25%;
|
||||
padding: 2rem;
|
||||
}
|
||||
</style>
|
||||
|
@ -44,7 +44,10 @@ export default mergeIds(workbenchId, workbench, {
|
||||
OpenPlatformGuide: '' as IntlString,
|
||||
AccessWorkspaceSettings: '' as IntlString,
|
||||
HowToWorkFaster: '' as IntlString,
|
||||
OpenInNewTab: '' as IntlString
|
||||
OpenInNewTab: '' as IntlString,
|
||||
NewVersionAvailable: '' as IntlString,
|
||||
PleaseUpdate: '' as IntlString,
|
||||
ServerUnderMaintenance: '' as IntlString
|
||||
},
|
||||
component: {
|
||||
SpacePanel: '' as AnyComponent,
|
||||
|
Loading…
Reference in New Issue
Block a user