164164 <div class =" navigate-head" >
165165 <div class =" header-sql" >
166166 <img height =" 30" width =" 30" v-if =" pageLogin" :src =" pageLogin" alt =" " />
167- <custom _small v-else-if =" themeColor === 'custom '" class =" logo" />
167+ <custom _small v-else-if =" themeColor !== 'default '" class =" logo" />
168168 <logo v-else ></logo >
169169 <span style =" margin-left : 8px " >{{ loginForm.name }}</span >
170170 </div >
179179 </el-icon >
180180 </div >
181181 </div >
182+ <div class =" welcome-content" >
183+ <div class =" greeting" >
184+ <img v-if =" pageLogin" height =" 32" width =" 32" :src =" pageLogin" alt =" " />
185+ <el-icon v-else size =" 32"
186+ ><custom _small v-if =" themeColor !== 'default'" ></custom _small >
187+ <LOGO _fold v-else ></LOGO _fold
188+ ></el-icon >
189+ {{ topForm.pc_welcome }}
190+ </div >
191+ <div class =" sub" >
192+ {{ topForm.pc_welcome_desc }}
193+ </div >
194+ <el-button size =" large" type =" primary" class =" greeting-btn" >
195+ <span class =" inner-icon" >
196+ <el-icon >
197+ <icon _new_chat_outlined />
198+ </el-icon >
199+ </span >
200+ {{ t('qa.start_sqlbot') }}
201+ </el-button >
202+ </div >
182203 </div >
183204 <div class =" tips-page" >
184205 {{
212233 false-value =" 1"
213234 :label =" $t('system.show_about')"
214235 />
236+ <div style =" margin-top : 8px " class =" label" >
237+ {{ $t('system.welcome_message') }}
238+ </div >
239+ <div style =" margin : 8px 0 " >
240+ <el-input
241+ v-model =" topForm.pc_welcome"
242+ :placeholder ="
243+ $t('datasource.please_enter') +
244+ $t('common.empty') +
245+ $t('system.welcome_message')
246+ "
247+ maxlength =" 50"
248+ />
249+ </div >
250+ <div class =" label" >
251+ {{ $t('embedded.welcome_description') }}
252+ </div >
253+ <div style =" margin : 8px 0 " >
254+ <el-input
255+ v-model =" topForm.pc_welcome_desc"
256+ :placeholder ="
257+ $t('datasource.please_enter') +
258+ $t('common.empty') +
259+ $t('embedded.welcome_description')
260+ "
261+ type =" textarea"
262+ show-word-limit
263+ maxlength =" 50"
264+ />
265+ </div >
215266 </div >
216267 </div >
217268 </div >
230281
231282<script lang="ts" setup>
232283import logo from ' @/assets/LOGO-fold.svg'
284+ import LOGO_fold from ' @/assets/LOGO-fold.svg'
233285import custom_small from ' @/assets/svg/logo-custom_small.svg'
234286import { ref , unref , reactive , onMounted , onUnmounted , nextTick , computed } from ' vue'
235287import {
@@ -241,6 +293,7 @@ import {
241293import { useI18n } from ' vue-i18n'
242294import { request } from ' @/utils/request'
243295import icon_side_fold_outlined from ' @/assets/svg/icon_side-fold_outlined.svg'
296+ import icon_new_chat_outlined from ' @/assets/svg/icon_new_chat_outlined.svg'
244297import { useAppearanceStoreWithOut } from ' @/stores/appearance'
245298import LoginPreview from ' ./LoginPreview.vue'
246299import Person from ' ./Person.vue'
@@ -324,12 +377,16 @@ const defaultTopForm = {
324377 help: ' https://dataease.cn/sqlbot/v1/' ,
325378 showDoc: ' 0' ,
326379 showAbout: ' 0' ,
380+ pc_welcome: ' 你好,我是 SQLBot ' ,
381+ pc_welcome_desc: ` 我可以查询数据、生成图表、检测数据异常、预测数据等赶快开启智能问数吧~ ` ,
327382}
328383
329384const topForm = reactive <{
330385 help: string
331386 showDoc: string
332387 showAbout: string
388+ pc_welcome: string
389+ pc_welcome_desc: string
333390}>(cloneDeep (defaultTopForm ))
334391
335392const isBlue = computed (() => {
@@ -816,6 +873,7 @@ onUnmounted(() => {
816873 background-color : #fff ;
817874 border-radius : 6px ;
818875 overflow : hidden ;
876+ position : relative ;
819877
820878 .navigate-head {
821879 width : 240px ;
@@ -847,6 +905,63 @@ onUnmounted(() => {
847905 }
848906 }
849907 }
908+
909+ .welcome-content {
910+ width : calc (100% - 240px );
911+ display : flex ;
912+ gap : 16px ;
913+ align-items : center ;
914+ flex-direction : column ;
915+ position : absolute ;
916+ right : 0 ;
917+ top : 50% ;
918+ transform : translateY (-50% );
919+
920+ .greeting {
921+ display : flex ;
922+ align-items : center ;
923+ gap : 16px ;
924+ line-height : 32px ;
925+ font-size : 24px ;
926+ font-weight : 600 ;
927+ color : rgba (31 , 35 , 41 , 1 );
928+ }
929+
930+ .sub {
931+ color : grey ;
932+ font-size : 16px ;
933+ line-height : 24px ;
934+ }
935+
936+ .greeting-btn {
937+ width : 80% ;
938+ height : 88px ;
939+ border-radius : 16px ;
940+ border-style : dashed ;
941+
942+ .inner-icon {
943+ display : flex ;
944+ flex-direction : row ;
945+ align-items : center ;
946+
947+ margin-right : 6px ;
948+ }
949+
950+ font-size : 16px ;
951+ line-height : 24px ;
952+ font-weight : 500 ;
953+
954+ --ed-button-text-color : var (--ed-color-primary , rgba (28 , 186 , 144 , 1 ));
955+ --ed-button-hover-text-color : var (--ed-color-primary , rgba (28 , 186 , 144 , 1 ));
956+ --ed-button-active-text-color : var (--ed-color-primary , rgba (28 , 186 , 144 , 1 ));
957+ --ed-button-bg-color : rgba (248 , 249 , 250 , 1 );
958+ --ed-button-hover-bg-color : var (--ed-color-primary-1a , #1cba901a );
959+ --ed-button-border-color : rgba (217 , 220 , 223 , 1 );
960+ --ed-button-hover-border-color : var (--ed-color-primary , rgba (28 , 186 , 144 , 1 ));
961+ --ed-button-active-bg-color : var (--ed-color-primary-33 , #1cba9033 );
962+ --ed-button-active-border-color : var (--ed-color-primary , rgba (28 , 186 , 144 , 1 ));
963+ }
964+ }
850965 }
851966 }
852967
@@ -858,6 +973,12 @@ onUnmounted(() => {
858973 margin : 8px 0 ;
859974 }
860975
976+ .label {
977+ font-weight : 400 ;
978+ font-size : 14px ;
979+ line-height : 22px ;
980+ }
981+
861982 .config-item {
862983 min-height : 104px ;
863984 margin-bottom : 8px ;
0 commit comments