feat: display

This commit is contained in:
wangdan-fit2cloud 2025-07-03 19:05:08 +08:00
parent cf8df8a1f7
commit 3f60135144
6 changed files with 101 additions and 34 deletions

View File

@ -17,7 +17,7 @@ export default {
msgConfirm1: 'Are you sure you want to regenerate the public URL?', msgConfirm1: 'Are you sure you want to regenerate the public URL?',
msgConfirm2: msgConfirm2:
'Regenerating the Public URL will affect any existing embedded codes on third-party sites. You will need to update the embed code and re-integrate it into those sites. Proceed with caution!', 'Regenerating the Public URL will affect any existing embedded codes on third-party sites. You will need to update the embed code and re-integrate it into those sites. Proceed with caution!',
refreshSuccess: 'Successfully Refreshed' refreshSuccess: 'Successfully Refreshed',
}, },
APIKeyDialog: { APIKeyDialog: {
saveSettings: 'Save Settings', saveSettings: 'Save Settings',
@ -25,13 +25,13 @@ export default {
msgConfirm2: msgConfirm2:
'This action is irreversible. Once deleted, the API Key cannot be recovered. Do you still want to proceed?', 'This action is irreversible. Once deleted, the API Key cannot be recovered. Do you still want to proceed?',
enabledSuccess: 'Enabled', enabledSuccess: 'Enabled',
disabledSuccess: 'Disabled' disabledSuccess: 'Disabled',
}, },
EmbedDialog: { EmbedDialog: {
fullscreenModeTitle: 'Fullscreen Mode', fullscreenModeTitle: 'Fullscreen Mode',
copyInstructions: 'Copy the code below to embed', copyInstructions: 'Copy the code below to embed',
floatingModeTitle: 'Floating Mode', floatingModeTitle: 'Floating Mode',
mobileModeTitle: 'Mobile Mode' mobileModeTitle: 'Mobile Mode',
}, },
LimitDialog: { LimitDialog: {
dialogTitle: 'Access Restrictions', dialogTitle: 'Access Restrictions',
@ -42,12 +42,12 @@ export default {
timesDays: 'queries per day', timesDays: 'queries per day',
whitelistLabel: 'Allowed Domains', whitelistLabel: 'Allowed Domains',
whitelistPlaceholder: whitelistPlaceholder:
'Enter allowed third-party domains, one per line. For example:\nhttp://127.0.0.1:5678\nhttps://dataease.io' 'Enter allowed third-party domains, one per line. For example:\nhttp://127.0.0.1:5678\nhttps://dataease.io',
}, },
SettingAPIKeyDialog: { SettingAPIKeyDialog: {
allowCrossDomainLabel: 'Allow Cross-Domain Access', allowCrossDomainLabel: 'Allow Cross-Domain Access',
crossDomainPlaceholder: crossDomainPlaceholder:
'Enter allowed cross-domain addresses. If enabled but left blank, no restrictions will apply.\nEnter one per line, e.g.:\nhttp://127.0.0.1:5678\nhttps://dataease.io' 'Enter allowed cross-domain addresses. If enabled but left blank, no restrictions will apply.\nEnter one per line, e.g.:\nhttp://127.0.0.1:5678\nhttps://dataease.io',
}, },
SettingDisplayDialog: { SettingDisplayDialog: {
dialogTitle: 'Display Settings', dialogTitle: 'Display Settings',
@ -69,14 +69,16 @@ export default {
left: 'Left', left: 'Left',
right: 'Right', right: 'Right',
bottom: 'Bottom', bottom: 'Bottom',
top: 'Top' top: 'Top',
}, },
draggablePosition: 'Draggable Position', draggablePosition: 'Draggable Position',
showHistory: 'Show Chat History', showHistory: 'Show Chat History',
displayGuide: 'Show Guide Image (Floating Mode)', displayGuide: 'Show Guide Image (Floating Mode)',
disclaimer: 'Disclaimer', disclaimer: 'Disclaimer',
disclaimerValue: 'This content is AI-generated and for reference only.' disclaimerValue: 'This content is AI-generated and for reference only.',
} chatBackground: 'Chat Background',
chatBackgroundMessage: 'Supported formats: JPG, PNG, GIF. Max size: 10MB.',
},
}, },
monitor: { monitor: {
monitoringStatistics: 'Monitoring Statistics', monitoringStatistics: 'Monitoring Statistics',
@ -96,7 +98,7 @@ export default {
tokensTotal: 'Total Tokens Used', tokensTotal: 'Total Tokens Used',
userSatisfaction: 'User Feedback Metrics', userSatisfaction: 'User Feedback Metrics',
approval: 'Like', approval: 'Like',
disapproval: 'Dislike' disapproval: 'Dislike',
} },
} },
} }

View File

@ -75,7 +75,9 @@ export default {
showHistory: '显示历史记录', showHistory: '显示历史记录',
displayGuide: '显示引导图(浮窗模式)', displayGuide: '显示引导图(浮窗模式)',
disclaimer: '免责声明', disclaimer: '免责声明',
disclaimerValue: '「以上内容均由 AI 生成,仅供参考和借鉴」' disclaimerValue: '「以上内容均由 AI 生成,仅供参考和借鉴」',
chatBackground: '聊天背景',
chatBackgroundMessage: '支持 JPG、PNG、GIF大小不超过 10 MB',
} }
}, },
monitor: { monitor: {

View File

@ -17,20 +17,20 @@ export default {
msgConfirm1: '是否重新產生公開訪問連結?', msgConfirm1: '是否重新產生公開訪問連結?',
msgConfirm2: msgConfirm2:
'重新產生公開訪問連結會影響嵌入第三方腳本變更,需要將新腳本重新嵌入第三方,請謹慎操作!', '重新產生公開訪問連結會影響嵌入第三方腳本變更,需要將新腳本重新嵌入第三方,請謹慎操作!',
refreshSuccess: '重新整理成功' refreshSuccess: '重新整理成功',
}, },
APIKeyDialog: { APIKeyDialog: {
saveSettings: '儲存設定', saveSettings: '儲存設定',
msgConfirm1: '是否刪除API Key', msgConfirm1: '是否刪除API Key',
msgConfirm2: '刪除API Key後將無法恢復請確認是否刪除', msgConfirm2: '刪除API Key後將無法恢復請確認是否刪除',
enabledSuccess: '已啟用', enabledSuccess: '已啟用',
disabledSuccess: '已停用' disabledSuccess: '已停用',
}, },
EmbedDialog: { EmbedDialog: {
fullscreenModeTitle: '全螢幕模式', fullscreenModeTitle: '全螢幕模式',
copyInstructions: '複製以下程式碼進行嵌入', copyInstructions: '複製以下程式碼進行嵌入',
floatingModeTitle: '浮窗模式', floatingModeTitle: '浮窗模式',
mobileModeTitle: '移動端模式' mobileModeTitle: '移動端模式',
}, },
LimitDialog: { LimitDialog: {
dialogTitle: '訪問限制', dialogTitle: '訪問限制',
@ -41,13 +41,13 @@ export default {
authenticationValue: '密碼驗證', authenticationValue: '密碼驗證',
whitelistLabel: '白名單', whitelistLabel: '白名單',
whitelistPlaceholder: whitelistPlaceholder:
'請輸入允許嵌入第三方的來源位址,一行一個,如:\nhttp://127.0.0.1:5678\nhttps://dataease.io' '請輸入允許嵌入第三方的來源位址,一行一個,如:\nhttp://127.0.0.1:5678\nhttps://dataease.io',
}, },
SettingAPIKeyDialog: { SettingAPIKeyDialog: {
dialogTitle: '設定', dialogTitle: '設定',
allowCrossDomainLabel: '允許跨域位址', allowCrossDomainLabel: '允許跨域位址',
crossDomainPlaceholder: crossDomainPlaceholder:
'請輸入允許的跨域位址,開啟後不輸入跨域位址則不限制。\n跨域位址一行一個\nhttp://127.0.0.1:5678 \nhttps://dataease.io' '請輸入允許的跨域位址,開啟後不輸入跨域位址則不限制。\n跨域位址一行一個\nhttp://127.0.0.1:5678 \nhttps://dataease.io',
}, },
SettingDisplayDialog: { SettingDisplayDialog: {
dialogTitle: '顯示設定', dialogTitle: '顯示設定',
@ -68,14 +68,16 @@ export default {
left: '左', left: '左',
right: '右', right: '右',
bottom: '下', bottom: '下',
top: '上' top: '上',
}, },
draggablePosition: '可拖曳位置', draggablePosition: '可拖曳位置',
showHistory: '顯示歷史紀錄', showHistory: '顯示歷史紀錄',
displayGuide: '顯示引導圖(浮窗模式)', displayGuide: '顯示引導圖(浮窗模式)',
disclaimer: '免責聲明', disclaimer: '免責聲明',
disclaimerValue: '「以上內容均由 AI 生成,僅供參考和借鏡」' disclaimerValue: '「以上內容均由 AI 生成,僅供參考和借鏡」',
} chatBackground: '聊天背景',
chatBackgroundMessage: '圖片格式JPG, PNG, GIF。最大大小10MB。',
},
}, },
monitor: { monitor: {
monitoringStatistics: '監控統計', monitoringStatistics: '監控統計',
@ -87,7 +89,7 @@ export default {
past30Days: '過去30天', past30Days: '過去30天',
past90Days: '過去90天', past90Days: '過去90天',
past183Days: '過去半年', past183Days: '過去半年',
other: '自訂义' other: '自訂义',
}, },
charts: { charts: {
customerTotal: '用戶總數', customerTotal: '用戶總數',
@ -96,7 +98,7 @@ export default {
tokensTotal: 'Tokens 總數', tokensTotal: 'Tokens 總數',
userSatisfaction: '用戶滿意度', userSatisfaction: '用戶滿意度',
approval: '贊同', approval: '贊同',
disapproval: '反對' disapproval: '反對',
} },
} },
} }

View File

@ -28,18 +28,22 @@
<div class="flex"> <div class="flex">
<div class="setting-preview border border-r-6 mr-16" style="min-width: 400px"> <div class="setting-preview border border-r-6 mr-16" style="min-width: 400px">
<div class="setting-preview-container"> <div
class="setting-preview-container"
:style="{ backgroundImage: `url(${imgUrl?.chat_background})` }"
>
<div class="setting-preview-header" :style="customStyle"> <div class="setting-preview-header" :style="customStyle">
<div class="flex-between"> <div class="flex-between">
<div class="flex align-center"> <div class="flex align-center">
<!-- 应用头像 -->
<div class="mr-12 ml-24 flex"> <div class="mr-12 ml-24 flex">
<el-avatar <el-avatar
v-if="isAppIcon(detail?.icon)" v-if="isAppIcon(imgUrl?.icon)"
shape="square" shape="square"
:size="32" :size="32"
style="background: none" style="background: none"
> >
<img :src="detail?.icon" alt="" /> <img :src="imgUrl?.icon" alt="" />
</el-avatar> </el-avatar>
<LogoIcon v-else height="32px" /> <LogoIcon v-else height="32px" />
</div> </div>
@ -146,7 +150,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 悬浮头像 -->
<div class="float_icon"> <div class="float_icon">
<el-image <el-image
v-if="imgUrl.float_icon" v-if="imgUrl.float_icon"
@ -201,6 +205,59 @@
/> />
</el-select> </el-select>
</el-row> </el-row>
<!-- 应用 LOGO -->
<el-card shadow="never" class="mb-8">
<div class="flex-between mb-8">
<span class="lighter">{{ $t('views.application.title') + ' LOGO' }}</span>
<span class="flex align-center">
<el-upload
class="ml-8"
ref="uploadRef"
action="#"
:auto-upload="false"
:show-file-list="false"
accept="image/jpeg, image/png, image/gif"
:on-change="(file: any, fileList: any) => onChange(file, fileList, 'icon')"
>
<el-button size="small">
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }}
</el-button>
</el-upload>
</span>
</div>
<el-text type="info" size="small">
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }}
</el-text>
</el-card>
<!-- 聊天背景 -->
<el-card shadow="never" class="mb-8">
<div class="flex-between mb-8">
<span class="lighter">{{
$t('views.applicationOverview.appInfo.SettingDisplayDialog.chatBackground')
}}</span>
<span class="flex align-center">
<el-upload
class="ml-8"
ref="uploadRef"
action="#"
:auto-upload="false"
:show-file-list="false"
accept="image/jpeg, image/png, image/gif"
:on-change="
(file: any, fileList: any) => onChange(file, fileList, 'chat_background')
"
>
<el-button size="small">
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }}
</el-button>
</el-upload>
</span>
</div>
<el-text type="info" size="small">
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.chatBackgroundMessage') }}
</el-text>
</el-card>
<!-- AI回复头像 -->
<el-card shadow="never" class="mb-8"> <el-card shadow="never" class="mb-8">
<div class="flex-between mb-8"> <div class="flex-between mb-8">
<span class="lighter">{{ <span class="lighter">{{
@ -229,6 +286,7 @@
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }} {{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }}
</el-text> </el-text>
</el-card> </el-card>
<!-- 提问头像 -->
<el-card shadow="never" class="mb-8"> <el-card shadow="never" class="mb-8">
<div class="flex-between mb-8"> <div class="flex-between mb-8">
<span class="lighter">{{ <span class="lighter">{{
@ -259,6 +317,7 @@
>{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }} >{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }}
</el-text> </el-text>
</el-card> </el-card>
<!-- 浮窗图标 -->
<el-card shadow="never" class="mb-8"> <el-card shadow="never" class="mb-8">
<div class="flex-between mb-8"> <div class="flex-between mb-8">
<span class="lighter">{{ <span class="lighter">{{
@ -622,11 +681,13 @@ defineExpose({ open })
border-radius: 8px; border-radius: 8px;
border: 1px solid #ffffff; border: 1px solid #ffffff;
background: var(--dialog-bg-gradient-color); background: var(--dialog-bg-gradient-color);
background-repeat: no-repeat;
background-position: center;
background-size: auto 100%;
box-shadow: 0px 4px 8px 0px rgba(31, 35, 41, 0.1); box-shadow: 0px 4px 8px 0px rgba(31, 35, 41, 0.1);
overflow: hidden; overflow: hidden;
width: 330px; width: 330px;
height: 520px; height: 520px;
.setting-preview-header { .setting-preview-header {
background: var(--app-header-bg-color); background: var(--app-header-bg-color);
height: var(--app-header-height); height: var(--app-header-height);
@ -639,11 +700,11 @@ defineExpose({ open })
.display-setting-dialog { .display-setting-dialog {
.el-dialog__header { .el-dialog__header {
padding-right: 8px; padding-right: 17px;
} }
.el-dialog__headerbtn { .el-dialog__headerbtn {
top: 8px; top: 14px;
} }
} }
</style> </style>

View File

@ -8,7 +8,7 @@
:rules="rules" :rules="rules"
:model="loginForm" :model="loginForm"
ref="loginFormRef" ref="loginFormRef"
@keyup.enter="login" @keyup.enter="loginHandle"
> >
<div class="mb-24"> <div class="mb-24">
<el-form-item prop="username"> <el-form-item prop="username">

View File

@ -269,8 +269,8 @@ function getMember(id?: string) {
filterMember.value = res.data filterMember.value = res.data
const user = (id && memberList.value.find((p: any) => p.user_id === id)) || null const user = (id && memberList.value.find((p: any) => p.user_id === id)) || null
currentUser.value = user ? user.id : memberList.value[0].id currentUser.value = user ? user.id : memberList.value?.[0].id
currentType.value = user ? user.type : memberList.value[0].type currentType.value = user ? user.type : memberList.value?.[0].type
getWholeTree(currentUser.value) getWholeTree(currentUser.value)
}) })
} }