diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index bfd07ab80..0ddd80a42 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -182,6 +182,7 @@ const message = { creatingInfo: 'Creating, no need for this operation', installSuccess: 'Install successful', uninstallSuccess: 'Uninstall successful', + offlineTips: 'Offline version does not support this operation', }, login: { username: 'Username', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index 667cf265f..d520a37d8 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -172,6 +172,7 @@ const message = { rootInfoErr: 'すでにルートディレクトリです', resetSuccess: 'リセット成功', creatingInfo: '作成、この操作は必要ありません', + offlineTips: 'オフライン版はこの操作をサポートしていません', }, login: { username: 'ユーザー名', diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index 260eff08e..929fddd35 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -171,6 +171,7 @@ const message = { rootInfoErr: '이미 루트 디렉토리입니다', resetSuccess: '초기화 완료', creatingInfo: '생성 중입니다. 이 작업이 필요하지 않습니다', + offlineTips: '오프라인 버전은 이 작업을 지원하지 않습니다', }, login: { username: '사용자 이름', diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index 774797bae..b0c20ae8b 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -174,6 +174,7 @@ const message = { rootInfoErr: 'Ia sudah menjadi direktori akar', resetSuccess: 'Berjaya ditetapkan semula', creatingInfo: 'Sedang mencipta, operasi ini tidak diperlukan', + offlineTips: 'Versi luar talian tidak menyokong operasi ini', }, login: { username: 'Nama Pengguna', diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index 2fd832d4c..398660764 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -172,6 +172,7 @@ const message = { rootInfoErr: 'Já está no diretório raiz', resetSuccess: 'Redefinido com sucesso', creatingInfo: 'Criando, não é necessário realizar esta operação', + offlineTips: 'A versão offline não suporta esta operação', }, login: { username: 'Usuário', diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index a0762b771..7c4fb17c7 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -172,6 +172,7 @@ const message = { rootInfoErr: 'Это уже корневой каталог', resetSuccess: 'Сброс успешен', creatingInfo: 'Создание, эта операция не нужна', + offlineTips: 'Офлайн версия не поддерживает эту операцию', }, login: { username: 'Имя пользователя', diff --git a/frontend/src/lang/modules/tr.ts b/frontend/src/lang/modules/tr.ts index 653cd3050..40fab5904 100644 --- a/frontend/src/lang/modules/tr.ts +++ b/frontend/src/lang/modules/tr.ts @@ -183,6 +183,7 @@ const message = { creatingInfo: 'Oluşturuluyor, bu işlem gerekli değil', installSuccess: 'Yükleme başarılı', uninstallSuccess: 'Kaldırma başarılı', + offlineTips: 'A versão offline não suporta esta operação', }, login: { username: 'Kullanıcı adı', diff --git a/frontend/src/lang/modules/zh-Hant.ts b/frontend/src/lang/modules/zh-Hant.ts index e4a3d3e17..88c792f04 100644 --- a/frontend/src/lang/modules/zh-Hant.ts +++ b/frontend/src/lang/modules/zh-Hant.ts @@ -180,6 +180,7 @@ const message = { creatingInfo: '正在創建,無需此操作', installSuccess: '安裝成功', uninstallSuccess: '卸載成功', + offlineTips: '離線版本不支援此操作', }, login: { username: '用戶名', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index d646d3221..52d536812 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -180,6 +180,7 @@ const message = { creatingInfo: '正在创建,无需此操作', installSuccess: '安装成功', uninstallSuccess: '卸载成功', + offlineTips: '离线版不支持此操作', }, login: { username: '用户名', diff --git a/frontend/src/views/website/runtime/php/index.vue b/frontend/src/views/website/runtime/php/index.vue index f592a4278..ab9d2068c 100644 --- a/frontend/src/views/website/runtime/php/index.vue +++ b/frontend/src/views/website/runtime/php/index.vue @@ -150,11 +150,13 @@ import Supervisor from '@/views/website/runtime/php/supervisor/index.vue'; import RuntimeStatus from '@/views/website/runtime/components/runtime-status.vue'; import Terminal from '@/views/website/runtime/components/terminal.vue'; import { disabledButton } from '@/utils/runtime'; -import { GlobalStore } from '@/store'; import DockerStatus from '@/views/container/docker-status/index.vue'; import { operateRuntime, updateRuntimeRemark } from '../common/utils'; import { routerToFileWithPath } from '@/utils/router'; -const globalStore = GlobalStore(); +import { MsgWarning } from '@/utils/message'; +import { useGlobalStore } from '@/composables/useGlobalStore'; +const { globalStore, isOffLine } = useGlobalStore(); + const mobile = computed(() => { return globalStore.isMobile(); }); @@ -284,6 +286,10 @@ const search = async () => { }; const openCreate = () => { + if (isOffLine) { + MsgWarning(i18n.global.t('commons.msg.offlineTips')); + return; + } createRef.value.acceptParams({ type: 'php', mode: 'create' }); };