From 2e5bf4202c14f82a2c43db3877b27c3942f9c39f Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Thu, 29 Jun 2023 18:46:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BA=94=E7=94=A8=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AB=AF=E5=8F=A3=E6=94=BE=E5=BC=80=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=20(#1492)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/modules/en.ts | 2 ++ frontend/src/lang/modules/zh.ts | 1 + .../views/app-store/detail/install/index.vue | 25 +++++++++++-------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 2d494cde9..abf0b57af 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1242,6 +1242,8 @@ const message = { allReadyInstalled: 'Installed', installHelper: 'Configuring image acceleration can solve the problem of image pull failure', upgradeHelper: 'The abnormal application needs to be synchronized to the normal state first', + installWarn: + ' Port external access is not enabled, and cannot be accessed through the external network IP:port. Do you want to continue?', }, website: { website: 'Website', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 43e7e9b16..6ce3a35b1 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1207,6 +1207,7 @@ const message = { allReadyInstalled: '已安装', installHelper: '配置镜像加速可以解决镜像拉取失败的问题', upgradeHelper: '异常应用需要先同步到正常状态', + installWarn: '未开启端口外部访问,无法通过外网IP:端口访问,是否继续?', }, website: { website: '网站', diff --git a/frontend/src/views/app-store/detail/install/index.vue b/frontend/src/views/app-store/detail/install/index.vue index 1c534a11c..69709cc04 100644 --- a/frontend/src/views/app-store/detail/install/index.vue +++ b/frontend/src/views/app-store/detail/install/index.vue @@ -149,7 +149,7 @@ const initData = () => ({ appDetailId: 0, params: form.value, name: '', - advanced: false, + advanced: true, cpuQuota: 0, memoryLimit: 0, memoryUnit: 'MB', @@ -198,15 +198,20 @@ const submit = async (formEl: FormInstance | undefined) => { if (req.memoryLimit < 0) { req.memoryLimit = 0; } - loading.value = true; - InstallApp(req) - .then(() => { - handleClose(); - router.push({ path: '/apps/installed' }); - }) - .finally(() => { - loading.value = false; - }); + ElMessageBox.confirm(i18n.global.t('app.installWarn'), i18n.global.t('app.checkTitle'), { + confirmButtonText: i18n.global.t('commons.button.confirm'), + cancelButtonText: i18n.global.t('commons.button.cancel'), + }).then(async () => { + loading.value = true; + InstallApp(req) + .then(() => { + handleClose(); + router.push({ path: '/apps/installed' }); + }) + .finally(() => { + loading.value = false; + }); + }); }); };