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
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "Je k dispozici nová verze",
"PleaseUpdate": "Aktualizujte prosím",
"ServerUnderMaintenance": "Příprava pracovního prostoru na novou verzi...",
"MobileNotSupported": "Omlouváme se, podpora mobilních zařízení bude brzy dostupná. Zatím prosím použijte počítač",
"LogInAnyway": "Přihlásit se přesto",
"WorkspaceCreating": "Vytváření probíhá...",
"AccessDenied": "Objekt neexistuje nebo k němu nemáte oprávnění.",
"UpgradeDownloadProgress": "Stahování aktualizace: {percent}%",
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "Neue Version verfügbar",
"PleaseUpdate": "Bitte aktualisieren",
"ServerUnderMaintenance": "Workspace wird für neue Version vorbereitet...",
"MobileNotSupported": "Entschuldigung, Mobile-Unterstützung kommt in Kürze. Bitte nutzen Sie vorerst Desktop",
"LogInAnyway": "Trotzdem einloggen",
"WorkspaceCreating": "Erstellung läuft...",
"AccessDenied": "Objekt existiert nicht oder Sie haben keine Zugriffsberechtigung.",
"UpgradeDownloadProgress": "Download des Updates: {percent}%",
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "New version is available",
"PleaseUpdate": "Please update",
"ServerUnderMaintenance": "Preparing workspace for new version...",
"MobileNotSupported": "Sorry, mobile devices support coming soon. In the meantime, please use Desktop",
"LogInAnyway": "Log in anyway",
"WorkspaceCreating": "Creation in progress...",
"AccessDenied": "Object doesn't exist or you are not permitted to access it.",
"UpgradeDownloadProgress": "Downloading upgrade: {percent}%",
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "Nueva versión disponible",
"PleaseUpdate": "Por favor, actualice",
"ServerUnderMaintenance": "Preparando el espacio de trabajo para la nueva versión...",
"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",
"WorkspaceCreating": "Creation in progress...",
"AccessDenied": "El objeto no existe o no tienes permiso para acceder a él.",
"UpgradeDownloadProgress": "Descargando actualización: {percent}%",
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "Nouvelle version disponible",
"PleaseUpdate": "Veuillez mettre à jour",
"ServerUnderMaintenance": "Préparation de l'espace de travail pour la nouvelle version...",
"MobileNotSupported": "Désolé, le support pour les appareils mobiles arrive bientôt. En attendant, veuillez utiliser un ordinateur de bureau",
"LogInAnyway": "Se connecter quand même",
"WorkspaceCreating": "Création en cours...",
"AccessDenied": "L'objet n'existe pas ou vous n'êtes pas autorisé à y accéder.",
"UpgradeDownloadProgress": "Téléchargement de la mise à jour: {percent}%",
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
"NewVersionAvailable": "Nuova versione disponibile",
"PleaseUpdate": "Si prega di aggiornare",
"ServerUnderMaintenance": "Il server è in manutenzione",
"MobileNotSupported": "Spiacenti, il supporto per i dispositivi mobili arriverà presto. Nel frattempo, si prega di utilizzare un computer desktop",
"LogInAnyway": "Accedi comunque",
"WorkspaceCreating": "Creazione in corso...",
"AccessDenied": "L'oggetto non esiste o non hai autorizzazione per accedervi.",
"WorkspaceIsMigrating": "Il workspace è in fase di aggiornamento. Attendi..."
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "新しいバージョンが利用可能です",
"PleaseUpdate": "アップデートしてください",
"ServerUnderMaintenance": "新しいバージョンのためにワークスペースを準備中...",
"MobileNotSupported": "申し訳ありませんが、モバイルデバイスのサポートは近日公開予定です。それまでの間、パソコンを使用してください",
"LogInAnyway": "無視してログインする",
"WorkspaceCreating": "作成中...",
"AccessDenied": "オブジェクトが存在しないか、アクセス権がありません。",
"UpgradeDownloadProgress": "アップグレードをダウンロード中: {percent}%",
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "Nova versão disponível",
"PleaseUpdate": "Atualize",
"ServerUnderMaintenance": "Preparando o espaço de trabalho para a nova versão...",
"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",
"WorkspaceCreating": "Creation in progress...",
"AccessDenied": "O objeto não existe ou você não tem permissão para acessá-lo.",
"UpgradeDownloadProgress": "Baixando atualização: {percent}%",
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "Nova versão disponível",
"PleaseUpdate": "Atualize",
"ServerUnderMaintenance": "Preparando o espaço de trabalho para a nova versão...",
"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",
"WorkspaceCreating": "Creation in progress...",
"AccessDenied": "O objeto não existe ou você não tem permissão para acessá-lo.",
"UpgradeDownloadProgress": "Baixando atualização: {percent}%",
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "Доступна новая версия",
"PleaseUpdate": "Пожалуйста, обновите приложение",
"ServerUnderMaintenance": "Подготовка рабочего пространства для новой версии...",
"MobileNotSupported": "Простите, поддержка мобильных устройств скоро будет доступна. Пока воспользуйтесь компьютером.",
"LogInAnyway": "Все равно войти",
"WorkspaceCreating": "Пространство создается...",
"AccessDenied": "Объект не существует или у вас нет прав доступа.",
"UpgradeDownloadProgress": "Загрузка обновления: {percent}%",
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "Yeni sürüm mevcut",
"PleaseUpdate": "Lütfen güncelleyin",
"ServerUnderMaintenance": "Çalışma alanı yeni sürüm için hazırlanıyor...",
"MobileNotSupported": "Üzgünüz, mobil cihaz desteği yakında geliyor. Bu arada lütfen Masaüstü kullanın",
"LogInAnyway": "Yine de giriş yap",
"WorkspaceCreating": "Oluşturma devam ediyor...",
"AccessDenied": "Nesne mevcut değil veya erişim izniniz yok.",
"UpgradeDownloadProgress": "Güncelleme indiriliyor: {percent}%",
Expand Down
2 changes: 0 additions & 2 deletions plugins/workbench-assets/lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"NewVersionAvailable": "有新版本可用",
"PleaseUpdate": "请更新",
"ServerUnderMaintenance": "正在为新版本准备工作区...",
"MobileNotSupported": "抱歉,移动设备支持即将推出。在此期间,请使用桌面设备",
"LogInAnyway": "仍然登录",
"WorkspaceCreating": "创建进行中...",
"AccessDenied": "对象不存在或您无权访问",
"UpgradeDownloadProgress": "正在下载更新:{percent}%",
Expand Down
136 changes: 55 additions & 81 deletions plugins/workbench-resources/src/components/WorkbenchApp.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,7 @@
<script lang="ts">
import { getMetadata } from '@hcengineering/platform'
import { upgradeDownloadProgress } from '@hcengineering/presentation'
import {
Button,
Component,
AppLoading,
Label,
Notifications,
deviceOptionsStore,
fetchMetadataLocalStorage,
location,
setMetadataLocalStorage
} from '@hcengineering/ui'
import { Button, Component, AppLoading, Label, Notifications, location } from '@hcengineering/ui'
import { connect, disconnect, error, errorActions } from '../connect'

import workbench, { workbenchId } from '@hcengineering/workbench'
Expand All @@ -35,83 +25,67 @@

const isNeedUpgrade = window.location.host === ''

let mobileAllowed = fetchMetadataLocalStorage(workbenchRes.metadata.MobileAllowed)

function allowMobile () {
setMetadataLocalStorage(workbenchRes.metadata.MobileAllowed, true)
mobileAllowed = true
}

onDestroy(disconnect)
</script>

{#if $location.path[0] === workbenchId || $location.path[0] === workbenchRes.component.WorkbenchApp}
{#if $deviceOptionsStore.isMobile && mobileAllowed !== true}
<div class="version-wrapper">
<div class="antiPopup version-popup">
<h1><Label label={workbenchRes.string.MobileNotSupported} /></h1>
<Button label={workbenchRes.string.LogInAnyway} on:click={allowMobile} />
</div>
</div>
{:else}
{#key $location.path[1]}
{#await connect(getMetadata(workbenchRes.metadata.PlatformTitle) ?? 'Platform')}
<AppLoading>
{#if ($workspaceCreating ?? -1) >= 0}
<div class="ml-1">
<Label label={workbenchRes.string.WorkspaceCreating} />
{$workspaceCreating} %
</div>
{/if}
{#if $error}
<div class="ml-2">
{$error}
</div>
{/if}
{#if $upgradeDownloadProgress >= 0}
<div class="ml-1" class:ml-2={$error === undefined}>
<Label label={workbench.string.UpgradeDownloadProgress} params={{ percent: $upgradeDownloadProgress }} />
</div>
{/if}
<svelte:fragment slot="actions">
{#if $error && $errorActions.length > 0}
{#each $errorActions as action}
<Button label={action.label} on:click={action.action} />
{/each}
{/if}
</svelte:fragment>
</AppLoading>
{:then client}
{#key $location.path[1]}
{#await connect(getMetadata(workbenchRes.metadata.PlatformTitle) ?? 'Platform')}
<AppLoading>
{#if ($workspaceCreating ?? -1) >= 0}
<div class="ml-1">
<Label label={workbenchRes.string.WorkspaceCreating} />
{$workspaceCreating} %
</div>
{/if}
{#if $error}
<div class="version-wrapper">
<div class="antiPopup version-popup">
{#if isNeedUpgrade}
<h1><Label label={workbenchRes.string.NewVersionAvailable} /></h1>
<span class="please-update"><Label label={workbenchRes.string.PleaseUpdate} /></span>
{:else}
<h1><Label label={workbenchRes.string.ServerUnderMaintenance} /></h1>
{/if}
{$error}
{#if $upgradeDownloadProgress >= 0}
<div class="mt-1">
<Label
label={workbench.string.UpgradeDownloadProgress}
params={{ percent: $upgradeDownloadProgress }}
/>
</div>
{/if}
</div>
<div class="ml-2">
{$error}
</div>
{/if}
{#if $upgradeDownloadProgress >= 0}
<div class="ml-1" class:ml-2={$error === undefined}>
<Label label={workbench.string.UpgradeDownloadProgress} params={{ percent: $upgradeDownloadProgress }} />
</div>
{:else if client}
<Notifications>
<Component is={workbenchRes.component.Workbench} />
</Notifications>
{/if}
{:catch error}
<div>{error} -- {error.stack}</div>
{/await}
{/key}
{/if}
<svelte:fragment slot="actions">
{#if $error && $errorActions.length > 0}
{#each $errorActions as action}
<Button label={action.label} on:click={action.action} />
{/each}
{/if}
</svelte:fragment>
</AppLoading>
{:then client}
{#if $error}
<div class="version-wrapper">
<div class="antiPopup version-popup">
{#if isNeedUpgrade}
<h1><Label label={workbenchRes.string.NewVersionAvailable} /></h1>
<span class="please-update"><Label label={workbenchRes.string.PleaseUpdate} /></span>
{:else}
<h1><Label label={workbenchRes.string.ServerUnderMaintenance} /></h1>
{/if}
{$error}
{#if $upgradeDownloadProgress >= 0}
<div class="mt-1">
<Label
label={workbench.string.UpgradeDownloadProgress}
params={{ percent: $upgradeDownloadProgress }}
/>
</div>
{/if}
</div>
</div>
{:else if client}
<Notifications>
<Component is={workbenchRes.component.Workbench} />
</Notifications>
{/if}
{:catch error}
<div>{error} -- {error.stack}</div>
{/await}
{/key}
{/if}

<style lang="scss">
Expand Down
7 changes: 1 addition & 6 deletions plugins/workbench-resources/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//

import { mergeIds } from '@hcengineering/platform'
import type { IntlString, Metadata } from '@hcengineering/platform'
import type { IntlString } from '@hcengineering/platform'

import workbench, { workbenchId } from '@hcengineering/workbench'
import { type AnyComponent } from '@hcengineering/ui/src/types'
Expand Down Expand Up @@ -42,17 +42,12 @@ export default mergeIds(workbenchId, workbench, {
OpenInNewTab: '' as IntlString,
NewVersionAvailable: '' as IntlString,
PleaseUpdate: '' as IntlString,
MobileNotSupported: '' as IntlString,
LogInAnyway: '' as IntlString,
WorkspaceCreating: '' as IntlString,
AccessDenied: '' as IntlString,
Widget: '' as IntlString,
WidgetPreference: '' as IntlString,
Tab: '' as IntlString
},
metadata: {
MobileAllowed: '' as Metadata<boolean>
},
component: {
SpacePanel: '' as AnyComponent,
Workbench: '' as AnyComponent,
Expand Down
Loading