mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-16 18:54:43 +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 {
|
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)
|
pass, err := encrypt.StringEncrypt(req.Password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -60,6 +60,8 @@ const message = {
|
|||||||
update: 'Edit',
|
update: 'Edit',
|
||||||
showAll: 'Show All',
|
showAll: 'Show All',
|
||||||
hideSome: 'Hide Some',
|
hideSome: 'Hide Some',
|
||||||
|
agree: 'Agree',
|
||||||
|
notAgree: 'Not Agree',
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
timeStart: 'Time start',
|
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> »',
|
'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',
|
errorAgree: 'Please click to agree to the Community Software License Agreement',
|
||||||
logout: 'Logout',
|
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: {
|
rule: {
|
||||||
username: 'Please enter a username',
|
username: 'Please enter a username',
|
||||||
@ -1262,6 +1267,7 @@ const message = {
|
|||||||
theme: 'Theme',
|
theme: 'Theme',
|
||||||
menuTabs: 'Menu tabs',
|
menuTabs: 'Menu tabs',
|
||||||
dark: 'Dark',
|
dark: 'Dark',
|
||||||
|
darkGold: 'Dark Gold',
|
||||||
light: 'Light',
|
light: 'Light',
|
||||||
auto: 'Follow System',
|
auto: 'Follow System',
|
||||||
language: 'Language',
|
language: 'Language',
|
||||||
|
@ -60,6 +60,8 @@ const message = {
|
|||||||
update: '編輯',
|
update: '編輯',
|
||||||
showAll: '顯示所有',
|
showAll: '顯示所有',
|
||||||
hideSome: '隱藏部分',
|
hideSome: '隱藏部分',
|
||||||
|
agree: '同意',
|
||||||
|
notAgree: '不同意',
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
timeStart: '開始時間',
|
timeStart: '開始時間',
|
||||||
@ -159,6 +161,9 @@ const message = {
|
|||||||
licenseHelper:
|
licenseHelper:
|
||||||
'同意 « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank"> 飛致雲社區軟件許可協議</a> »',
|
'同意 « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank"> 飛致雲社區軟件許可協議</a> »',
|
||||||
errorAgree: '請點擊同意社區軟件許可協議',
|
errorAgree: '請點擊同意社區軟件許可協議',
|
||||||
|
agreeTitle: '服務協議及隱私保護',
|
||||||
|
agreeContent:
|
||||||
|
'為了更好的保障您的合法權益,請您閱讀並同意以下協議 « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank"> 飛致雲社區軟件許可協議 </a> »',
|
||||||
logout: '退出登錄',
|
logout: '退出登錄',
|
||||||
},
|
},
|
||||||
rule: {
|
rule: {
|
||||||
@ -1197,6 +1202,7 @@ const message = {
|
|||||||
menuTabs: '菜單標簽頁',
|
menuTabs: '菜單標簽頁',
|
||||||
componentSize: '組件大小',
|
componentSize: '組件大小',
|
||||||
dark: '暗色',
|
dark: '暗色',
|
||||||
|
darkGold: '黑金',
|
||||||
light: '亮色',
|
light: '亮色',
|
||||||
auto: '跟隨系統',
|
auto: '跟隨系統',
|
||||||
language: '系統語言',
|
language: '系統語言',
|
||||||
|
@ -60,6 +60,8 @@ const message = {
|
|||||||
update: '编辑',
|
update: '编辑',
|
||||||
showAll: '显示所有',
|
showAll: '显示所有',
|
||||||
hideSome: '隐藏部分',
|
hideSome: '隐藏部分',
|
||||||
|
agree: '同意',
|
||||||
|
notAgree: '不同意',
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
timeStart: '开始时间',
|
timeStart: '开始时间',
|
||||||
@ -159,6 +161,9 @@ const message = {
|
|||||||
licenseHelper:
|
licenseHelper:
|
||||||
'同意 « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank"> 飞致云社区软件许可协议</a> »',
|
'同意 « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank"> 飞致云社区软件许可协议</a> »',
|
||||||
errorAgree: '请点击同意社区软件许可协议',
|
errorAgree: '请点击同意社区软件许可协议',
|
||||||
|
agreeTitle: '服务协议及隐私保护',
|
||||||
|
agreeContent:
|
||||||
|
'为了更好的保障您的合法权益,请您阅读并同意以下协议 « <a href="https://www.fit2cloud.com/legal/licenses.html" target="_blank"> 飞致云社区软件许可协议 </a> »',
|
||||||
logout: '退出登录',
|
logout: '退出登录',
|
||||||
},
|
},
|
||||||
rule: {
|
rule: {
|
||||||
@ -1198,6 +1203,7 @@ const message = {
|
|||||||
menuTabs: '菜单标签页',
|
menuTabs: '菜单标签页',
|
||||||
componentSize: '组件大小',
|
componentSize: '组件大小',
|
||||||
dark: '暗色',
|
dark: '暗色',
|
||||||
|
darkGold: '黑金',
|
||||||
light: '亮色',
|
light: '亮色',
|
||||||
auto: '跟随系统',
|
auto: '跟随系统',
|
||||||
language: '系统语言',
|
language: '系统语言',
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
<span
|
<span
|
||||||
v-if="errAgree && loginForm.agreeLicense === false"
|
v-if="!loginForm.agreeLicense && !globalStore.isMobile()"
|
||||||
class="input-error"
|
class="input-error"
|
||||||
style="line-height: 14px"
|
style="line-height: 14px"
|
||||||
>
|
>
|
||||||
@ -142,6 +142,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -166,7 +186,7 @@ const errAuthInfo = ref(false);
|
|||||||
const errCaptcha = ref(false);
|
const errCaptcha = ref(false);
|
||||||
const errMfaInfo = ref(false);
|
const errMfaInfo = ref(false);
|
||||||
const isDemo = ref(false);
|
const isDemo = ref(false);
|
||||||
const errAgree = ref(false);
|
const agreeVisible = ref(false);
|
||||||
|
|
||||||
type FormInstance = InstanceType<typeof ElForm>;
|
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) => {
|
const login = (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl || isLoggingIn) return;
|
if (!formEl || isLoggingIn) return;
|
||||||
formEl.validate(async (valid) => {
|
formEl.validate(async (valid) => {
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
|
if (!loginForm.agreeLicense) {
|
||||||
|
if (globalStore.isMobile()) {
|
||||||
|
agreeVisible.value = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
let requestLoginForm = {
|
let requestLoginForm = {
|
||||||
name: loginForm.name,
|
name: loginForm.name,
|
||||||
password: loginForm.password,
|
password: loginForm.password,
|
||||||
@ -239,10 +271,6 @@ const login = (formEl: FormInstance | undefined) => {
|
|||||||
errCaptcha.value = true;
|
errCaptcha.value = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (loginForm.agreeLicense == false) {
|
|
||||||
errAgree.value = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
isLoggingIn = true;
|
isLoggingIn = true;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<el-form-item :label="$t('setting.theme')" prop="theme">
|
<el-form-item :label="$t('setting.theme')" prop="theme">
|
||||||
<el-radio-group @change="onSave('Theme', form.theme)" v-model="form.theme">
|
<el-radio-group @change="onSave('Theme', form.theme)" v-model="form.theme">
|
||||||
<el-radio-button v-if="isProductPro" value="dark-gold">
|
<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>
|
||||||
<el-radio-button value="light">
|
<el-radio-button value="light">
|
||||||
<span>{{ $t('setting.light') }}</span>
|
<span>{{ $t('setting.light') }}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user