mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 16:29:17 +08:00
pref: 优化登录页确认框样式 (#5259)
This commit is contained in:
parent
32fb7feb44
commit
e45f43da9a
@ -178,6 +178,16 @@ func (f *FtpService) Delete(req dto.BatchDeleteReq) error {
|
||||
}
|
||||
|
||||
func (f *FtpService) Update(req dto.FtpUpdate) error {
|
||||
if _, err := os.Stat(req.Path); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
if err := os.MkdirAll(req.Path, os.ModePerm); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
pass, err := encrypt.StringEncrypt(req.Password)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -60,6 +60,8 @@ const message = {
|
||||
update: 'Edit',
|
||||
showAll: 'Show All',
|
||||
hideSome: 'Hide Some',
|
||||
agree: 'Agree',
|
||||
notAgree: 'Not Agree',
|
||||
},
|
||||
search: {
|
||||
timeStart: 'Time start',
|
||||
@ -159,6 +161,9 @@ const message = {
|
||||
'Agree « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank">Community License Agreement</a> »',
|
||||
errorAgree: 'Please click to agree to the Community Software License Agreement',
|
||||
logout: 'Logout',
|
||||
agreeTitle: 'Agreement',
|
||||
agreeContent:
|
||||
'In order to better protect your legitimate rights and interests, please read and agree to the following agreement « <a href = "https://www.fit2cloud.com/legal/licenses.html" target = "_blank" > fly to cloud community software license agreement </a> »',
|
||||
},
|
||||
rule: {
|
||||
username: 'Please enter a username',
|
||||
@ -1262,6 +1267,7 @@ const message = {
|
||||
theme: 'Theme',
|
||||
menuTabs: 'Menu tabs',
|
||||
dark: 'Dark',
|
||||
darkGold: 'Dark Gold',
|
||||
light: 'Light',
|
||||
auto: 'Follow System',
|
||||
language: 'Language',
|
||||
|
@ -60,6 +60,8 @@ const message = {
|
||||
update: '編輯',
|
||||
showAll: '顯示所有',
|
||||
hideSome: '隱藏部分',
|
||||
agree: '同意',
|
||||
notAgree: '不同意',
|
||||
},
|
||||
search: {
|
||||
timeStart: '開始時間',
|
||||
@ -159,6 +161,9 @@ const message = {
|
||||
licenseHelper:
|
||||
'同意 « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank"> 飛致雲社區軟件許可協議</a> »',
|
||||
errorAgree: '請點擊同意社區軟件許可協議',
|
||||
agreeTitle: '服務協議及隱私保護',
|
||||
agreeContent:
|
||||
'為了更好的保障您的合法權益,請您閱讀並同意以下協議 « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank"> 飛致雲社區軟件許可協議 </a> »',
|
||||
logout: '退出登錄',
|
||||
},
|
||||
rule: {
|
||||
@ -1197,6 +1202,7 @@ const message = {
|
||||
menuTabs: '菜單標簽頁',
|
||||
componentSize: '組件大小',
|
||||
dark: '暗色',
|
||||
darkGold: '黑金',
|
||||
light: '亮色',
|
||||
auto: '跟隨系統',
|
||||
language: '系統語言',
|
||||
|
@ -60,6 +60,8 @@ const message = {
|
||||
update: '编辑',
|
||||
showAll: '显示所有',
|
||||
hideSome: '隐藏部分',
|
||||
agree: '同意',
|
||||
notAgree: '不同意',
|
||||
},
|
||||
search: {
|
||||
timeStart: '开始时间',
|
||||
@ -159,6 +161,9 @@ const message = {
|
||||
licenseHelper:
|
||||
'同意 « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank"> 飞致云社区软件许可协议</a> »',
|
||||
errorAgree: '请点击同意社区软件许可协议',
|
||||
agreeTitle: '服务协议及隐私保护',
|
||||
agreeContent:
|
||||
'为了更好的保障您的合法权益,请您阅读并同意以下协议 « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank"> 飞致云社区软件许可协议 </a> »',
|
||||
logout: '退出登录',
|
||||
},
|
||||
rule: {
|
||||
@ -1198,6 +1203,7 @@ const message = {
|
||||
menuTabs: '菜单标签页',
|
||||
componentSize: '组件大小',
|
||||
dark: '暗色',
|
||||
darkGold: '黑金',
|
||||
light: '亮色',
|
||||
auto: '跟随系统',
|
||||
language: '系统语言',
|
||||
|
@ -127,7 +127,7 @@
|
||||
</template>
|
||||
</el-checkbox>
|
||||
<span
|
||||
v-if="errAgree && loginForm.agreeLicense === false"
|
||||
v-if="!loginForm.agreeLicense && !globalStore.isMobile()"
|
||||
class="input-error"
|
||||
style="line-height: 14px"
|
||||
>
|
||||
@ -142,6 +142,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog v-model="agreeVisible" center :destroy-on-close="true" :close-on-click-modal="false" width="80%">
|
||||
<el-row type="flex" justify="center">
|
||||
<span class="text-base mb-4">
|
||||
{{ $t('commons.login.agreeTitle') }}
|
||||
</span>
|
||||
</el-row>
|
||||
<div>
|
||||
<span v-html="$t('commons.login.agreeContent')"></span>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="agreeVisible = false">
|
||||
{{ $t('commons.button.notAgree') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="agreeWithLogin()">
|
||||
{{ $t('commons.button.agree') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -166,7 +186,7 @@ const errAuthInfo = ref(false);
|
||||
const errCaptcha = ref(false);
|
||||
const errMfaInfo = ref(false);
|
||||
const isDemo = ref(false);
|
||||
const errAgree = ref(false);
|
||||
const agreeVisible = ref(false);
|
||||
|
||||
type FormInstance = InstanceType<typeof ElForm>;
|
||||
|
||||
@ -222,10 +242,22 @@ function handleCommand(command: string) {
|
||||
}
|
||||
}
|
||||
|
||||
const agreeWithLogin = () => {
|
||||
agreeVisible.value = false;
|
||||
loginForm.agreeLicense = true;
|
||||
login(loginFormRef.value);
|
||||
};
|
||||
|
||||
const login = (formEl: FormInstance | undefined) => {
|
||||
if (!formEl || isLoggingIn) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
if (!loginForm.agreeLicense) {
|
||||
if (globalStore.isMobile()) {
|
||||
agreeVisible.value = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
let requestLoginForm = {
|
||||
name: loginForm.name,
|
||||
password: loginForm.password,
|
||||
@ -239,10 +271,6 @@ const login = (formEl: FormInstance | undefined) => {
|
||||
errCaptcha.value = true;
|
||||
return;
|
||||
}
|
||||
if (loginForm.agreeLicense == false) {
|
||||
errAgree.value = true;
|
||||
return;
|
||||
}
|
||||
try {
|
||||
isLoggingIn = true;
|
||||
loading.value = true;
|
||||
|
@ -29,7 +29,7 @@
|
||||
<el-form-item :label="$t('setting.theme')" prop="theme">
|
||||
<el-radio-group @change="onSave('Theme', form.theme)" v-model="form.theme">
|
||||
<el-radio-button v-if="isProductPro" value="dark-gold">
|
||||
<span>{{ $t('xpack.setting.darkGold') }}</span>
|
||||
<span>{{ $t('setting.darkGold') }}</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button value="light">
|
||||
<span>{{ $t('setting.light') }}</span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user