fix: 面板设置提示信息修改 (#1249)

pull/1251/head
ssongliu 2 years ago committed by GitHub
parent 5e7524e4f8
commit 3a17f4f29f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -121,6 +121,10 @@ func (u *SettingService) Update(key, value string) error {
global.LOG.Errorf("restart system for new time zone failed, err: %v", err)
}
}()
case "BindDomain":
if len(value) != 0 {
_ = global.SESSION.Clean()
}
case "UserName", "Password":
_ = global.SESSION.Clean()
}

@ -996,15 +996,21 @@ const message = {
'The password must contain at least eight characters and contain at least three uppercase letters, lowercase letters, digits, and special characters',
bindDomain: 'Bind domain',
unBindDomain: 'Unbind domain',
unBindDomainHelper:
'The action of unbinding a domain name may cause system insecurity. Do you want to continue?',
bindDomainHelper:
'After the domain binding, only the domain in the setting can be used to access 1Panel service',
bindDomainHelper1: 'If the binding domain is empty, the binding of the domain is cancelled',
bindDomainWarnning:
'If the binding domain is empty, the binding of the domain is cancelled. Do you want to continue?',
bindDomainWarning:
'After domain binding, you will be logged out and can only access 1Panel service through the domain name specified in the settings. Do you want to continue?',
allowIPs: 'Authorized IP',
unAllowIPs: 'Unauthorized IP',
unAllowIPsWarning:
'Authorizing an empty IP will allow all IPs to access the system, which may cause system insecurity. Do you want to continue?',
allowIPsHelper:
'After setting the authorized IP address, only the IP address in the setting can access the 1Panel service',
allowIPsWarnning:
allowIPsWarning:
'After setting the authorized IP address, only the IP address in the setting can access the 1Panel service. Do you want to continue?',
allowIPsHelper1: 'If the authorized IP address is empty, the authorized IP address is canceled',
allowIPEgs:

@ -1015,12 +1015,16 @@ const message = {
complexity: '',
complexityHelper: ' 8 ',
bindDomain: '',
unBindDomain: '',
unBindDomainHelper: '',
bindDomainHelper: '访 1Panel ',
bindDomainHelper1: '',
bindDomainWarnning: '访 1Panel ',
bindDomainWarning: '退访 1Panel ',
allowIPs: ' IP',
unAllowIPs: '',
unAllowIPsWarning: ' IP IP 访',
allowIPsHelper: ' IP IP 访 1Panel ',
allowIPsWarnning: ' IP IP 访 1Panel ',
allowIPsWarning: ' IP IP 访 1Panel ',
allowIPsHelper1: ' IP IP',
allowIPEgs: ' IP \n172.16.10.111 \n172.16.10.112',
mfa: '',

@ -65,7 +65,9 @@ const onSave = async () => {
}
}
}
ElMessageBox.confirm(i18n.global.t('setting.allowIPsHelper'), i18n.global.t('setting.allowIPs'), {
let title = allowIPs.value ? i18n.global.t('setting.allowIPs') : i18n.global.t('setting.unAllowIPs');
let allow = allowIPs.value ? i18n.global.t('setting.allowIPsWarning') : i18n.global.t('setting.unAllowIPsWarning');
ElMessageBox.confirm(allow, title, {
confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'),
type: 'info',

@ -77,7 +77,11 @@ const onSavePort = async (formEl: FormInstance | undefined) => {
if (!formEl) return;
formEl.validate(async (valid) => {
if (!valid) return;
ElMessageBox.confirm(i18n.global.t('setting.bindDomainWarnning'), i18n.global.t('setting.bindDomain'), {
let title = form.bindDomain ? i18n.global.t('setting.bindDomain') : i18n.global.t('setting.unBindDomain');
let helper = form.bindDomain
? i18n.global.t('setting.bindDomainWarning')
: i18n.global.t('setting.unBindDomainHelper');
ElMessageBox.confirm(helper, title, {
confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'),
type: 'info',

Loading…
Cancel
Save