feat(Appearance Settings): Empty the welcome message and still display the default welcome message

This commit is contained in:
dataeaseShu
2025-08-29 13:52:44 +08:00
parent 8747fb7c95
commit 0af80c2f1b
5 changed files with 21 additions and 4 deletions
+1 -1
View File
@@ -634,7 +634,7 @@
"larger_than_5mb": "Background image on the left: Recommended size: 576 x 900 for vector images, 1152 x 1800 for bitmap images, supports JPG, PNG, and SVG, and no larger than 5MB",
"website_name": "Website Name",
"on_webpage_tabs": "Platform name displayed on webpage tabs",
"welcome_message": "Welcome Message",
"welcome_message": "Display a welcome message",
"the_product_logo": "Welcome Message below the product logo",
"screen_customization_supported": "Defaults to the SQLBot login screen; customization supported",
"screen_customization_settings": "The default is the SQLBot platform interface, which supports custom settings",
+1 -1
View File
@@ -634,7 +634,7 @@
"larger_than_5mb": "左侧背景图,矢量图建议尺寸 576*900,位图建议尺寸 1152*1800;支持 JPG、PNG、SVG,大小不超过 5M",
"website_name": "网站名称",
"on_webpage_tabs": "显示在网页 Tab 的平台名称",
"welcome_message": "欢迎语",
"welcome_message": "显示欢迎语",
"the_product_logo": "产品 Logo 下的 欢迎语",
"screen_customization_supported": "默认为 SQLBot 登录界面,支持自定义设置",
"screen_customization_settings": "默认为 SQLBot 平台界面,支持自定义设置",
+6
View File
@@ -27,6 +27,7 @@ interface AppearanceState {
web?: string
name?: string
foot?: string
showSlogan?: string
footContent?: string
loaded: boolean
showDemoTips?: boolean
@@ -50,6 +51,7 @@ export const useAppearanceStore = defineStore('appearanceStore', {
mobileLoginBg: '',
help: '',
showDoc: '0',
showSlogan: '0',
showAi: '0',
showCopilot: '0',
showAbout: '0',
@@ -145,6 +147,9 @@ export const useAppearanceStore = defineStore('appearanceStore', {
getShowCopilot(): boolean {
return isBtnShow(this.showCopilot!)
},
getShowSlogan(): boolean {
return isBtnShow(this.showSlogan!)
},
getShowDoc(): boolean {
return isBtnShow(this.showDoc!)
},
@@ -283,6 +288,7 @@ export const useAppearanceStore = defineStore('appearanceStore', {
this.bg = data.bg
this.login = data.login
this.slogan = data.slogan
this.showSlogan = data.showSlogan
this.web = data.web
this.name = data.name
if (this.name) {
+2 -1
View File
@@ -6,9 +6,10 @@
<div class="login-content">
<div class="login-right">
<img width="auto" height="52" :src="loginBg" alt="" />
<div class="welcome">
<div v-if="appearanceStore.getShowSlogan" class="welcome">
{{ appearanceStore.slogan || $t('common.intelligent_questioning_platform') }}
</div>
<div v-else class="welcome" style="height: 0"></div>
<div class="login-form">
<h2 class="title">{{ $t('common.login') }}</h2>
<el-form
+11 -1
View File
@@ -117,7 +117,15 @@
/>
<div class="form-tips">{{ t('system.on_webpage_tabs') }}</div>
</el-form-item>
<el-form-item :label="$t('system.welcome_message')" prop="slogan">
<el-form-item>
<template #label>
<el-checkbox
v-model="loginForm.showSlogan"
true-value="0"
false-value="1"
:label="$t('system.welcome_message')"
/>
</template>
<el-input v-model="loginForm.slogan" maxlength="50" />
</el-form-item>
<!-- <el-form-item :label="t('system.footer')" prop="foot">
@@ -248,6 +256,7 @@ interface LoginForm {
name: string
slogan: string
foot: string
showSlogan: string
footContent?: string
}
interface ConfigItem {
@@ -287,6 +296,7 @@ const defaultLoginForm = reactive<LoginForm>({
name: 'SQLBot',
slogan: t('common.intelligent_questioning_platform'),
foot: 'false',
showSlogan: '0',
footContent: '',
})
const loginForm = reactive<LoginForm>(cloneDeep(defaultLoginForm))