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?',
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!',
refreshSuccess: 'Successfully Refreshed'
refreshSuccess: 'Successfully Refreshed',
},
APIKeyDialog: {
saveSettings: 'Save Settings',
@ -25,13 +25,13 @@ export default {
msgConfirm2:
'This action is irreversible. Once deleted, the API Key cannot be recovered. Do you still want to proceed?',
enabledSuccess: 'Enabled',
disabledSuccess: 'Disabled'
disabledSuccess: 'Disabled',
},
EmbedDialog: {
fullscreenModeTitle: 'Fullscreen Mode',
copyInstructions: 'Copy the code below to embed',
floatingModeTitle: 'Floating Mode',
mobileModeTitle: 'Mobile Mode'
mobileModeTitle: 'Mobile Mode',
},
LimitDialog: {
dialogTitle: 'Access Restrictions',
@ -42,12 +42,12 @@ export default {
timesDays: 'queries per day',
whitelistLabel: 'Allowed Domains',
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: {
allowCrossDomainLabel: 'Allow Cross-Domain Access',
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: {
dialogTitle: 'Display Settings',
@ -69,14 +69,16 @@ export default {
left: 'Left',
right: 'Right',
bottom: 'Bottom',
top: 'Top'
top: 'Top',
},
draggablePosition: 'Draggable Position',
showHistory: 'Show Chat History',
displayGuide: 'Show Guide Image (Floating Mode)',
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: {
monitoringStatistics: 'Monitoring Statistics',
@ -96,7 +98,7 @@ export default {
tokensTotal: 'Total Tokens Used',
userSatisfaction: 'User Feedback Metrics',
approval: 'Like',
disapproval: 'Dislike'
}
}
disapproval: 'Dislike',
},
},
}

View File

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

View File

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

View File

@ -28,18 +28,22 @@
<div class="flex">
<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="flex-between">
<div class="flex align-center">
<!-- 应用头像 -->
<div class="mr-12 ml-24 flex">
<el-avatar
v-if="isAppIcon(detail?.icon)"
v-if="isAppIcon(imgUrl?.icon)"
shape="square"
:size="32"
style="background: none"
>
<img :src="detail?.icon" alt="" />
<img :src="imgUrl?.icon" alt="" />
</el-avatar>
<LogoIcon v-else height="32px" />
</div>
@ -146,7 +150,7 @@
</div>
</div>
</div>
<!-- 悬浮头像 -->
<div class="float_icon">
<el-image
v-if="imgUrl.float_icon"
@ -201,6 +205,59 @@
/>
</el-select>
</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">
<div class="flex-between mb-8">
<span class="lighter">{{
@ -229,6 +286,7 @@
{{ $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">{{
@ -259,6 +317,7 @@
>{{ $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">{{
@ -622,11 +681,13 @@ defineExpose({ open })
border-radius: 8px;
border: 1px solid #ffffff;
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);
overflow: hidden;
width: 330px;
height: 520px;
.setting-preview-header {
background: var(--app-header-bg-color);
height: var(--app-header-height);
@ -639,11 +700,11 @@ defineExpose({ open })
.display-setting-dialog {
.el-dialog__header {
padding-right: 8px;
padding-right: 17px;
}
.el-dialog__headerbtn {
top: 8px;
top: 14px;
}
}
</style>

View File

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

View File

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