mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 11:01:54 +03:00
Allow to mobile (#5015)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
6e194d133c
commit
5b1fd6a9b7
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -29,6 +29,7 @@
|
||||
"NewVersionAvailable": "Доступна новая версия",
|
||||
"PleaseUpdate": "Пожалуйста, обновите приложение",
|
||||
"ServerUnderMaintenance": "Обслуживание сервера",
|
||||
"MobileNotSupported": "Простите, поддержка мобильных устройств скоро будет доступна. Пока воспользуйтесь компьютером."
|
||||
"MobileNotSupported": "Простите, поддержка мобильных устройств скоро будет доступна. Пока воспользуйтесь компьютером.",
|
||||
"LogInAnyway": "Все равно войти"
|
||||
}
|
||||
}
|
||||
|
@ -14,20 +14,38 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { getMetadata } from '@hcengineering/platform'
|
||||
import { Component, Label, Loading, Notifications, deviceOptionsStore, location } from '@hcengineering/ui'
|
||||
import {
|
||||
Button,
|
||||
Component,
|
||||
Label,
|
||||
Loading,
|
||||
Notifications,
|
||||
deviceOptionsStore,
|
||||
fetchMetadataLocalStorage,
|
||||
location,
|
||||
setMetadataLocalStorage
|
||||
} from '@hcengineering/ui'
|
||||
import { connect, versionError } from '../connect'
|
||||
|
||||
import { workbenchId } from '@hcengineering/workbench'
|
||||
import workbench from '../plugin'
|
||||
|
||||
const isNeedUpgrade = window.location.host === ''
|
||||
|
||||
let mobileAllowed = fetchMetadataLocalStorage(workbench.metadata.MobileAllowed)
|
||||
|
||||
function allowMobile () {
|
||||
setMetadataLocalStorage(workbench.metadata.MobileAllowed, true)
|
||||
mobileAllowed = true
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if $location.path[0] === workbenchId || $location.path[0] === workbench.component.WorkbenchApp}
|
||||
{#if $deviceOptionsStore.isMobile}
|
||||
{#if $deviceOptionsStore.isMobile && mobileAllowed !== true}
|
||||
<div class="version-wrapper">
|
||||
<div class="antiPopup version-popup">
|
||||
<h1><Label label={workbench.string.MobileNotSupported} /></h1>
|
||||
<Button label={workbench.string.LogInAnyway} on:click={allowMobile} />
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
|
@ -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<boolean>
|
||||
},
|
||||
component: {
|
||||
SpacePanel: '' as AnyComponent,
|
||||
|
Loading…
Reference in New Issue
Block a user