From 5b1fd6a9b746d08d2eb532fe2b33d48f69bd588a Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Tue, 19 Mar 2024 21:34:28 +0600 Subject: [PATCH] Allow to mobile (#5015) Signed-off-by: Denis Bykhov --- plugins/workbench-assets/lang/en.json | 3 ++- plugins/workbench-assets/lang/es.json | 3 ++- plugins/workbench-assets/lang/pt.json | 3 ++- plugins/workbench-assets/lang/ru.json | 3 ++- .../src/components/WorkbenchApp.svelte | 22 +++++++++++++++++-- plugins/workbench-resources/src/plugin.ts | 8 +++++-- 6 files changed, 34 insertions(+), 8 deletions(-) diff --git a/plugins/workbench-assets/lang/en.json b/plugins/workbench-assets/lang/en.json index a0278e98d7..d483a13f81 100644 --- a/plugins/workbench-assets/lang/en.json +++ b/plugins/workbench-assets/lang/en.json @@ -29,6 +29,7 @@ "NewVersionAvailable": "New version is available", "PleaseUpdate": "Please update", "ServerUnderMaintenance": "Server is under maintenance", - "MobileNotSupported": "Sorry, mobile devices support coming soon. In the meantime, please use Desktop" + "MobileNotSupported": "Sorry, mobile devices support coming soon. In the meantime, please use Desktop", + "LogInAnyway": "Log in anyway" } } diff --git a/plugins/workbench-assets/lang/es.json b/plugins/workbench-assets/lang/es.json index 35925522eb..cf9e4d068d 100644 --- a/plugins/workbench-assets/lang/es.json +++ b/plugins/workbench-assets/lang/es.json @@ -29,6 +29,7 @@ "NewVersionAvailable": "Nueva versión disponible", "PleaseUpdate": "Por favor, actualice", "ServerUnderMaintenance": "El servidor está en mantenimiento", - "MobileNotSupported": "Disculpa, el soporte para dispositivos móviles estará disponible próximamente. Mientras tanto, por favor usa el escritorio." + "MobileNotSupported": "Disculpa, el soporte para dispositivos móviles estará disponible próximamente. Mientras tanto, por favor usa el escritorio.", + "LogInAnyway": "Iniciar sesión de todas formas" } } \ No newline at end of file diff --git a/plugins/workbench-assets/lang/pt.json b/plugins/workbench-assets/lang/pt.json index 4b67e5e018..9a4aabc56d 100644 --- a/plugins/workbench-assets/lang/pt.json +++ b/plugins/workbench-assets/lang/pt.json @@ -29,6 +29,7 @@ "NewVersionAvailable": "Nova versão disponível", "PleaseUpdate": "Atualize", "ServerUnderMaintenance": "Servidor em manutenção", - "MobileNotSupported": "Desculpe, o suporte para dispositivos móveis estará disponível em breve. Enquanto isso, por favor, use o Desktop." + "MobileNotSupported": "Desculpe, o suporte para dispositivos móveis estará disponível em breve. Enquanto isso, por favor, use o Desktop.", + "LogInAnyway": "Entrar de qualquer maneira" } } \ No newline at end of file diff --git a/plugins/workbench-assets/lang/ru.json b/plugins/workbench-assets/lang/ru.json index 4cf2a185ce..0d2d57046c 100644 --- a/plugins/workbench-assets/lang/ru.json +++ b/plugins/workbench-assets/lang/ru.json @@ -29,6 +29,7 @@ "NewVersionAvailable": "Доступна новая версия", "PleaseUpdate": "Пожалуйста, обновите приложение", "ServerUnderMaintenance": "Обслуживание сервера", - "MobileNotSupported": "Простите, поддержка мобильных устройств скоро будет доступна. Пока воспользуйтесь компьютером." + "MobileNotSupported": "Простите, поддержка мобильных устройств скоро будет доступна. Пока воспользуйтесь компьютером.", + "LogInAnyway": "Все равно войти" } } diff --git a/plugins/workbench-resources/src/components/WorkbenchApp.svelte b/plugins/workbench-resources/src/components/WorkbenchApp.svelte index af1d2805da..380610f339 100644 --- a/plugins/workbench-resources/src/components/WorkbenchApp.svelte +++ b/plugins/workbench-resources/src/components/WorkbenchApp.svelte @@ -14,20 +14,38 @@ --> {#if $location.path[0] === workbenchId || $location.path[0] === workbench.component.WorkbenchApp} - {#if $deviceOptionsStore.isMobile} + {#if $deviceOptionsStore.isMobile && mobileAllowed !== true}

+
{:else} diff --git a/plugins/workbench-resources/src/plugin.ts b/plugins/workbench-resources/src/plugin.ts index e12300edc9..f709c287eb 100644 --- a/plugins/workbench-resources/src/plugin.ts +++ b/plugins/workbench-resources/src/plugin.ts @@ -14,7 +14,7 @@ // import { mergeIds } from '@hcengineering/platform' -import type { IntlString } from '@hcengineering/platform' +import type { IntlString, Metadata } from '@hcengineering/platform' import workbench, { workbenchId } from '@hcengineering/workbench' import { type AnyComponent } from '@hcengineering/ui' @@ -42,7 +42,11 @@ export default mergeIds(workbenchId, workbench, { OpenInNewTab: '' as IntlString, NewVersionAvailable: '' as IntlString, PleaseUpdate: '' as IntlString, - MobileNotSupported: '' as IntlString + MobileNotSupported: '' as IntlString, + LogInAnyway: '' as IntlString + }, + metadata: { + MobileAllowed: '' as Metadata }, component: { SpacePanel: '' as AnyComponent,