mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-10 17:13:30 +08:00
fix: 解决关闭高级设置之后没有提示端口放开的问题 (#1887)
This commit is contained in:
parent
fe705a25ea
commit
87e9662af4
3 changed files with 6 additions and 11 deletions
|
@ -1,13 +1,8 @@
|
|||
import router from '@/routers';
|
||||
|
||||
export function canEditPort(app: any): boolean {
|
||||
if (app.key == 'openresty') {
|
||||
return false;
|
||||
}
|
||||
if (app.type == 'php') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
export function canEditPort(appKey: string): boolean {
|
||||
const apps = ['openresty', 'php', 'frpc', 'frps', 'ddns-go', 'home-assistant'];
|
||||
return !apps.includes(appKey);
|
||||
}
|
||||
|
||||
export function toFolder(folder: string) {
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
{{ $t('container.limitHelper', [limits.memory]) }}{{ req.memoryUnit }}B
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-form-item prop="allowPort" v-if="canEditPort(installData.app)">
|
||||
<el-form-item prop="allowPort" v-if="canEditPort(installData.app.key)">
|
||||
<el-checkbox v-model="req.allowPort" :label="$t('app.allowPort')" size="large" />
|
||||
<span class="input-help">{{ $t('app.allowPortHelper') }}</span>
|
||||
</el-form-item>
|
||||
|
@ -224,7 +224,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||
if (req.memoryLimit < 0) {
|
||||
req.memoryLimit = 0;
|
||||
}
|
||||
if (installData.value.app.key != 'openresty' && req.advanced && !req.allowPort) {
|
||||
if (canEditPort(installData.value.app.key) && !req.allowPort) {
|
||||
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'),
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
</el-input>
|
||||
<span class="input-help">{{ $t('container.limitHelper') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item prop="allowPort" v-if="canEditPort(paramData.app)">
|
||||
<el-form-item prop="allowPort" v-if="canEditPort(paramData.app.key)">
|
||||
<el-checkbox v-model="paramModel.allowPort" :label="$t('app.allowPort')" size="large" />
|
||||
<span class="input-help">{{ $t('app.allowPortHelper') }}</span>
|
||||
</el-form-item>
|
||||
|
|
Loading…
Reference in a new issue