Skip to content

Commit 00df463

Browse files
committed
fix(Appearance Configuration): The display settings of the application do not change with the system theme
1 parent e4674d7 commit 00df463

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

frontend/src/views/embedded/index.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<LOGO></LOGO>
99
</el-icon>
1010
<img v-else :src="logo" class="logo" width="30px" height="30px" alt="" />
11-
<span class="title">{{ customSet.name || $t('embedded.intelligent_customer_service') }}</span>
11+
<span class="title">{{ appName || $t('embedded.intelligent_customer_service') }}</span>
1212

1313
<el-tooltip effect="dark" :content="$t('embedded.new_conversation')" placement="top">
1414
<el-icon class="new-chat" size="20" @click="createChat">
@@ -61,6 +61,7 @@ const validator = ref({
6161
id_match: false,
6262
token: '',
6363
})
64+
const appName = ref('')
6465
const loading = ref(true)
6566
const eventName = 'sqlbot_assistant_event'
6667
const communicationCb = async (event: any) => {
@@ -156,6 +157,11 @@ onBeforeMount(async () => {
156157
messageId: assistantId,
157158
}
158159
window.parent.postMessage(readyData, '*')
160+
assistantApi.query(assistantId as any).then((res) => {
161+
if (res.name) {
162+
appName.value = res.name
163+
}
164+
})
159165
160166
request.get(`/system/assistant/${assistantId}`).then((res) => {
161167
if (res?.configuration) {

frontend/src/views/system/embedded/SetUi.vue

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const { t } = useI18n()
1212
const appearanceStore = useAppearanceStoreWithOut()
1313
const currentId = ref()
1414
interface SqlBotForm {
15-
name: string
1615
theme: string
1716
header_font_color: string
1817
// logo?: string
@@ -65,7 +64,6 @@ const logo = ref('')
6564
const floatIcon = ref('')
6665
6766
const defaultSqlBotForm = reactive<SqlBotForm>({
68-
name: t('embedded.intelligent_customer_service'),
6967
x_type: 'right',
7068
y_type: 'bottom',
7169
x_val: 30,
@@ -214,10 +212,11 @@ const clearFiles = (array?: string[]) => {
214212
}
215213
}
216214
}
217-
215+
const appName = ref('')
218216
const open = (row: any) => {
219217
rawData = JSON.parse(row.configuration)
220218
currentId.value = row.id
219+
appName.value = row.name
221220
dialogVisible.value = true
222221
init()
223222
}
@@ -238,7 +237,7 @@ defineExpose({
238237
<assistant
239238
:welcome-desc="sqlBotForm.welcome_desc"
240239
:welcome="sqlBotForm.welcome"
241-
:name="sqlBotForm.name"
240+
:name="appName"
242241
:logo="logo"
243242
></assistant>
244243
</div>
@@ -343,15 +342,6 @@ defineExpose({
343342
label-width="120px"
344343
class="page-Form"
345344
>
346-
<el-form-item :label="t('embedded.application_name')">
347-
<el-input
348-
v-model="sqlBotForm.name"
349-
:placeholder="
350-
$t('datasource.please_enter') + $t('common.empty') + $t('embedded.application_name')
351-
"
352-
maxlength="20"
353-
/>
354-
</el-form-item>
355345
<el-form-item :label="$t('system.welcome_message')">
356346
<el-input
357347
v-model="sqlBotForm.welcome"

0 commit comments

Comments
 (0)