Skip to content

Commit 3f60135

Browse files
feat: display
1 parent cf8df8a commit 3f60135

File tree

6 files changed

+101
-34
lines changed

6 files changed

+101
-34
lines changed

ui/src/locales/lang/en-US/views/application-overview.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ export default {
1717
msgConfirm1: 'Are you sure you want to regenerate the public URL?',
1818
msgConfirm2:
1919
'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!',
20-
refreshSuccess: 'Successfully Refreshed'
20+
refreshSuccess: 'Successfully Refreshed',
2121
},
2222
APIKeyDialog: {
2323
saveSettings: 'Save Settings',
2424
msgConfirm1: 'Are you sure you want to delete the API Key',
2525
msgConfirm2:
2626
'This action is irreversible. Once deleted, the API Key cannot be recovered. Do you still want to proceed?',
2727
enabledSuccess: 'Enabled',
28-
disabledSuccess: 'Disabled'
28+
disabledSuccess: 'Disabled',
2929
},
3030
EmbedDialog: {
3131
fullscreenModeTitle: 'Fullscreen Mode',
3232
copyInstructions: 'Copy the code below to embed',
3333
floatingModeTitle: 'Floating Mode',
34-
mobileModeTitle: 'Mobile Mode'
34+
mobileModeTitle: 'Mobile Mode',
3535
},
3636
LimitDialog: {
3737
dialogTitle: 'Access Restrictions',
@@ -42,12 +42,12 @@ export default {
4242
timesDays: 'queries per day',
4343
whitelistLabel: 'Allowed Domains',
4444
whitelistPlaceholder:
45-
'Enter allowed third-party domains, one per line. For example:\nhttp://127.0.0.1:5678\nhttps://dataease.io'
45+
'Enter allowed third-party domains, one per line. For example:\nhttp://127.0.0.1:5678\nhttps://dataease.io',
4646
},
4747
SettingAPIKeyDialog: {
4848
allowCrossDomainLabel: 'Allow Cross-Domain Access',
4949
crossDomainPlaceholder:
50-
'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'
50+
'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',
5151
},
5252
SettingDisplayDialog: {
5353
dialogTitle: 'Display Settings',
@@ -69,14 +69,16 @@ export default {
6969
left: 'Left',
7070
right: 'Right',
7171
bottom: 'Bottom',
72-
top: 'Top'
72+
top: 'Top',
7373
},
7474
draggablePosition: 'Draggable Position',
7575
showHistory: 'Show Chat History',
7676
displayGuide: 'Show Guide Image (Floating Mode)',
7777
disclaimer: 'Disclaimer',
78-
disclaimerValue: 'This content is AI-generated and for reference only.'
79-
}
78+
disclaimerValue: 'This content is AI-generated and for reference only.',
79+
chatBackground: 'Chat Background',
80+
chatBackgroundMessage: 'Supported formats: JPG, PNG, GIF. Max size: 10MB.',
81+
},
8082
},
8183
monitor: {
8284
monitoringStatistics: 'Monitoring Statistics',
@@ -96,7 +98,7 @@ export default {
9698
tokensTotal: 'Total Tokens Used',
9799
userSatisfaction: 'User Feedback Metrics',
98100
approval: 'Like',
99-
disapproval: 'Dislike'
100-
}
101-
}
101+
disapproval: 'Dislike',
102+
},
103+
},
102104
}

ui/src/locales/lang/zh-CN/views/application-overview.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ export default {
7575
showHistory: '显示历史记录',
7676
displayGuide: '显示引导图(浮窗模式)',
7777
disclaimer: '免责声明',
78-
disclaimerValue: '「以上内容均由 AI 生成,仅供参考和借鉴」'
78+
disclaimerValue: '「以上内容均由 AI 生成,仅供参考和借鉴」',
79+
chatBackground: '聊天背景',
80+
chatBackgroundMessage: '支持 JPG、PNG、GIF,大小不超过 10 MB',
7981
}
8082
},
8183
monitor: {

ui/src/locales/lang/zh-Hant/views/application-overview.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ export default {
1717
msgConfirm1: '是否重新產生公開訪問連結?',
1818
msgConfirm2:
1919
'重新產生公開訪問連結會影響嵌入第三方腳本變更,需要將新腳本重新嵌入第三方,請謹慎操作!',
20-
refreshSuccess: '重新整理成功'
20+
refreshSuccess: '重新整理成功',
2121
},
2222
APIKeyDialog: {
2323
saveSettings: '儲存設定',
2424
msgConfirm1: '是否刪除API Key',
2525
msgConfirm2: '刪除API Key後將無法恢復,請確認是否刪除?',
2626
enabledSuccess: '已啟用',
27-
disabledSuccess: '已停用'
27+
disabledSuccess: '已停用',
2828
},
2929
EmbedDialog: {
3030
fullscreenModeTitle: '全螢幕模式',
3131
copyInstructions: '複製以下程式碼進行嵌入',
3232
floatingModeTitle: '浮窗模式',
33-
mobileModeTitle: '移動端模式'
33+
mobileModeTitle: '移動端模式',
3434
},
3535
LimitDialog: {
3636
dialogTitle: '訪問限制',
@@ -41,13 +41,13 @@ export default {
4141
authenticationValue: '密碼驗證',
4242
whitelistLabel: '白名單',
4343
whitelistPlaceholder:
44-
'請輸入允許嵌入第三方的來源位址,一行一個,如:\nhttp://127.0.0.1:5678\nhttps://dataease.io'
44+
'請輸入允許嵌入第三方的來源位址,一行一個,如:\nhttp://127.0.0.1:5678\nhttps://dataease.io',
4545
},
4646
SettingAPIKeyDialog: {
4747
dialogTitle: '設定',
4848
allowCrossDomainLabel: '允許跨域位址',
4949
crossDomainPlaceholder:
50-
'請輸入允許的跨域位址,開啟後不輸入跨域位址則不限制。\n跨域位址一行一個,如:\nhttp://127.0.0.1:5678 \nhttps://dataease.io'
50+
'請輸入允許的跨域位址,開啟後不輸入跨域位址則不限制。\n跨域位址一行一個,如:\nhttp://127.0.0.1:5678 \nhttps://dataease.io',
5151
},
5252
SettingDisplayDialog: {
5353
dialogTitle: '顯示設定',
@@ -68,14 +68,16 @@ export default {
6868
left: '左',
6969
right: '右',
7070
bottom: '下',
71-
top: '上'
71+
top: '上',
7272
},
7373
draggablePosition: '可拖曳位置',
7474
showHistory: '顯示歷史紀錄',
7575
displayGuide: '顯示引導圖(浮窗模式)',
7676
disclaimer: '免責聲明',
77-
disclaimerValue: '「以上內容均由 AI 生成,僅供參考和借鏡」'
78-
}
77+
disclaimerValue: '「以上內容均由 AI 生成,僅供參考和借鏡」',
78+
chatBackground: '聊天背景',
79+
chatBackgroundMessage: '圖片格式:JPG, PNG, GIF。最大大小:10MB。',
80+
},
7981
},
8082
monitor: {
8183
monitoringStatistics: '監控統計',
@@ -87,7 +89,7 @@ export default {
8789
past30Days: '過去30天',
8890
past90Days: '過去90天',
8991
past183Days: '過去半年',
90-
other: '自訂义'
92+
other: '自訂义',
9193
},
9294
charts: {
9395
customerTotal: '用戶總數',
@@ -96,7 +98,7 @@ export default {
9698
tokensTotal: 'Tokens 總數',
9799
userSatisfaction: '用戶滿意度',
98100
approval: '贊同',
99-
disapproval: '反對'
100-
}
101-
}
101+
disapproval: '反對',
102+
},
103+
},
102104
}

ui/src/views/application-overview/xpack-component/XPackDisplaySettingDialog.vue

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,22 @@
2828

2929
<div class="flex">
3030
<div class="setting-preview border border-r-6 mr-16" style="min-width: 400px">
31-
<div class="setting-preview-container">
31+
<div
32+
class="setting-preview-container"
33+
:style="{ backgroundImage: `url(${imgUrl?.chat_background})` }"
34+
>
3235
<div class="setting-preview-header" :style="customStyle">
3336
<div class="flex-between">
3437
<div class="flex align-center">
38+
<!-- 应用头像 -->
3539
<div class="mr-12 ml-24 flex">
3640
<el-avatar
37-
v-if="isAppIcon(detail?.icon)"
41+
v-if="isAppIcon(imgUrl?.icon)"
3842
shape="square"
3943
:size="32"
4044
style="background: none"
4145
>
42-
<img :src="detail?.icon" alt="" />
46+
<img :src="imgUrl?.icon" alt="" />
4347
</el-avatar>
4448
<LogoIcon v-else height="32px" />
4549
</div>
@@ -146,7 +150,7 @@
146150
</div>
147151
</div>
148152
</div>
149-
153+
<!-- 悬浮头像 -->
150154
<div class="float_icon">
151155
<el-image
152156
v-if="imgUrl.float_icon"
@@ -201,6 +205,59 @@
201205
/>
202206
</el-select>
203207
</el-row>
208+
<!-- 应用 LOGO -->
209+
<el-card shadow="never" class="mb-8">
210+
<div class="flex-between mb-8">
211+
<span class="lighter">{{ $t('views.application.title') + ' LOGO' }}</span>
212+
<span class="flex align-center">
213+
<el-upload
214+
class="ml-8"
215+
ref="uploadRef"
216+
action="#"
217+
:auto-upload="false"
218+
:show-file-list="false"
219+
accept="image/jpeg, image/png, image/gif"
220+
:on-change="(file: any, fileList: any) => onChange(file, fileList, 'icon')"
221+
>
222+
<el-button size="small">
223+
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }}
224+
</el-button>
225+
</el-upload>
226+
</span>
227+
</div>
228+
<el-text type="info" size="small">
229+
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }}
230+
</el-text>
231+
</el-card>
232+
<!-- 聊天背景 -->
233+
<el-card shadow="never" class="mb-8">
234+
<div class="flex-between mb-8">
235+
<span class="lighter">{{
236+
$t('views.applicationOverview.appInfo.SettingDisplayDialog.chatBackground')
237+
}}</span>
238+
<span class="flex align-center">
239+
<el-upload
240+
class="ml-8"
241+
ref="uploadRef"
242+
action="#"
243+
:auto-upload="false"
244+
:show-file-list="false"
245+
accept="image/jpeg, image/png, image/gif"
246+
:on-change="
247+
(file: any, fileList: any) => onChange(file, fileList, 'chat_background')
248+
"
249+
>
250+
<el-button size="small">
251+
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.replace') }}
252+
</el-button>
253+
</el-upload>
254+
</span>
255+
</div>
256+
<el-text type="info" size="small">
257+
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.chatBackgroundMessage') }}
258+
</el-text>
259+
</el-card>
260+
<!-- AI回复头像 -->
204261
<el-card shadow="never" class="mb-8">
205262
<div class="flex-between mb-8">
206263
<span class="lighter">{{
@@ -229,6 +286,7 @@
229286
{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }}
230287
</el-text>
231288
</el-card>
289+
<!-- 提问头像 -->
232290
<el-card shadow="never" class="mb-8">
233291
<div class="flex-between mb-8">
234292
<span class="lighter">{{
@@ -259,6 +317,7 @@
259317
>{{ $t('views.applicationOverview.appInfo.SettingDisplayDialog.imageMessage') }}
260318
</el-text>
261319
</el-card>
320+
<!-- 浮窗图标 -->
262321
<el-card shadow="never" class="mb-8">
263322
<div class="flex-between mb-8">
264323
<span class="lighter">{{
@@ -622,11 +681,13 @@ defineExpose({ open })
622681
border-radius: 8px;
623682
border: 1px solid #ffffff;
624683
background: var(--dialog-bg-gradient-color);
684+
background-repeat: no-repeat;
685+
background-position: center;
686+
background-size: auto 100%;
625687
box-shadow: 0px 4px 8px 0px rgba(31, 35, 41, 0.1);
626688
overflow: hidden;
627689
width: 330px;
628690
height: 520px;
629-
630691
.setting-preview-header {
631692
background: var(--app-header-bg-color);
632693
height: var(--app-header-height);
@@ -639,11 +700,11 @@ defineExpose({ open })
639700
640701
.display-setting-dialog {
641702
.el-dialog__header {
642-
padding-right: 8px;
703+
padding-right: 17px;
643704
}
644705
645706
.el-dialog__headerbtn {
646-
top: 8px;
707+
top: 14px;
647708
}
648709
}
649710
</style>

ui/src/views/login/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:rules="rules"
99
:model="loginForm"
1010
ref="loginFormRef"
11-
@keyup.enter="login"
11+
@keyup.enter="loginHandle"
1212
>
1313
<div class="mb-24">
1414
<el-form-item prop="username">

ui/src/views/system/resource-authorization/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ function getMember(id?: string) {
269269
filterMember.value = res.data
270270
271271
const user = (id && memberList.value.find((p: any) => p.user_id === id)) || null
272-
currentUser.value = user ? user.id : memberList.value[0].id
273-
currentType.value = user ? user.type : memberList.value[0].type
272+
currentUser.value = user ? user.id : memberList.value?.[0].id
273+
currentType.value = user ? user.type : memberList.value?.[0].type
274274
getWholeTree(currentUser.value)
275275
})
276276
}

0 commit comments

Comments
 (0)