From 4cb103f636dcede96fc877b268556bb73872c820 Mon Sep 17 00:00:00 2001 From: Maksim Karmatskikh Date: Fri, 18 Aug 2023 07:28:16 +0600 Subject: [PATCH] UBER-726: Ask to update if manual update is required (#3602) --- plugins/workbench-assets/lang/en.json | 5 ++- plugins/workbench-assets/lang/ru.json | 5 ++- .../src/components/WorkbenchApp.svelte | 32 +++++++++++++------ plugins/workbench-resources/src/plugin.ts | 5 ++- 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/plugins/workbench-assets/lang/en.json b/plugins/workbench-assets/lang/en.json index 75e6f8e488..a575a83bba 100644 --- a/plugins/workbench-assets/lang/en.json +++ b/plugins/workbench-assets/lang/en.json @@ -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" } } diff --git a/plugins/workbench-assets/lang/ru.json b/plugins/workbench-assets/lang/ru.json index c544d3c3f8..97e52ba550 100644 --- a/plugins/workbench-assets/lang/ru.json +++ b/plugins/workbench-assets/lang/ru.json @@ -25,6 +25,9 @@ "AccessWorkspaceSettings": "Открыть настройки рабочего пространства", "HowToWorkFaster": "Узнайте как работать эффективнее", "HiddenApplication": "Скрытое приложение", - "OpenInNewTab": "Открыть в новой вкладке" + "OpenInNewTab": "Открыть в новой вкладке", + "NewVersionAvailable": "Доступна новая версия", + "PleaseUpdate": "Пожалуйста, обновите приложение", + "ServerUnderMaintenance": "Обслуживание сервера" } } diff --git a/plugins/workbench-resources/src/components/WorkbenchApp.svelte b/plugins/workbench-resources/src/components/WorkbenchApp.svelte index 77b486b506..0889758929 100644 --- a/plugins/workbench-resources/src/components/WorkbenchApp.svelte +++ b/plugins/workbench-resources/src/components/WorkbenchApp.svelte @@ -14,11 +14,13 @@ --> {#if $location.path[0] === workbenchId || $location.path[0] === workbench.component.WorkbenchApp} @@ -27,9 +29,16 @@ {:then client} {#if !client && versionError} -
-

Server is under maintenance.

- {versionError} +
+
+ {#if isNeedUpgrade} +

+ + {:else} +

+ {/if} + {versionError} +
{:else if client} @@ -43,14 +52,19 @@ {/if} diff --git a/plugins/workbench-resources/src/plugin.ts b/plugins/workbench-resources/src/plugin.ts index be3748502d..bf8ceb71a2 100644 --- a/plugins/workbench-resources/src/plugin.ts +++ b/plugins/workbench-resources/src/plugin.ts @@ -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,