From 00df46341bd82436d341b60e71d66475eaa45792 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Mon, 1 Sep 2025 18:29:39 +0800 Subject: [PATCH] fix(Appearance Configuration): The display settings of the application do not change with the system theme --- frontend/src/views/embedded/index.vue | 8 +++++++- frontend/src/views/system/embedded/SetUi.vue | 16 +++------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/frontend/src/views/embedded/index.vue b/frontend/src/views/embedded/index.vue index 1be397bf..11308d6e 100644 --- a/frontend/src/views/embedded/index.vue +++ b/frontend/src/views/embedded/index.vue @@ -8,7 +8,7 @@ - {{ customSet.name || $t('embedded.intelligent_customer_service') }} + {{ appName || $t('embedded.intelligent_customer_service') }} @@ -61,6 +61,7 @@ const validator = ref({ id_match: false, token: '', }) +const appName = ref('') const loading = ref(true) const eventName = 'sqlbot_assistant_event' const communicationCb = async (event: any) => { @@ -156,6 +157,11 @@ onBeforeMount(async () => { messageId: assistantId, } window.parent.postMessage(readyData, '*') + assistantApi.query(assistantId as any).then((res) => { + if (res.name) { + appName.value = res.name + } + }) request.get(`/system/assistant/${assistantId}`).then((res) => { if (res?.configuration) { diff --git a/frontend/src/views/system/embedded/SetUi.vue b/frontend/src/views/system/embedded/SetUi.vue index c58c8e5b..0be2975a 100644 --- a/frontend/src/views/system/embedded/SetUi.vue +++ b/frontend/src/views/system/embedded/SetUi.vue @@ -12,7 +12,6 @@ const { t } = useI18n() const appearanceStore = useAppearanceStoreWithOut() const currentId = ref() interface SqlBotForm { - name: string theme: string header_font_color: string // logo?: string @@ -65,7 +64,6 @@ const logo = ref('') const floatIcon = ref('') const defaultSqlBotForm = reactive({ - name: t('embedded.intelligent_customer_service'), x_type: 'right', y_type: 'bottom', x_val: 30, @@ -214,10 +212,11 @@ const clearFiles = (array?: string[]) => { } } } - +const appName = ref('') const open = (row: any) => { rawData = JSON.parse(row.configuration) currentId.value = row.id + appName.value = row.name dialogVisible.value = true init() } @@ -238,7 +237,7 @@ defineExpose({ @@ -343,15 +342,6 @@ defineExpose({ label-width="120px" class="page-Form" > - - -