Skip to content

Commit a19353d

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

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,31 @@ import icon_more_outlined from '@/assets/svg/icon_more_outlined.svg'
44
import icon_embedded_outlined from '@/assets/embedded/icon_embedded_outlined.svg'
55
import IconOpeEdit from '@/assets/svg/icon_edit_outlined.svg'
66
import Lock from '@/assets/embedded/LOGO-sql.png'
7-
import { ref, unref } from 'vue'
7+
import { useAppearanceStoreWithOut } from '@/stores/appearance'
8+
import LOGO from '@/assets/svg/logo-custom_small.svg'
9+
import { ref, unref, computed } from 'vue'
810
import { ClickOutside as vClickOutside } from 'element-plus-secondary'
911
import icon_style_set_outlined from '@/assets/svg/icon_style-set_outlined.svg'
1012
11-
withDefaults(
13+
const props = withDefaults(
1214
defineProps<{
1315
name: string
1416
isBase: boolean
1517
description: string
1618
id?: string
19+
logo?: string
1720
}>(),
1821
{
1922
name: '-',
2023
isBase: false,
2124
id: '-',
2225
description: '-',
26+
logo: '',
2327
}
2428
)
2529
2630
const emits = defineEmits(['edit', 'del', 'embedded', 'ui'])
31+
const appearanceStore = useAppearanceStoreWithOut()
2732
2833
const handleEdit = () => {
2934
emits('edit')
@@ -46,12 +51,21 @@ const popoverRef = ref()
4651
const onClickOutside = () => {
4752
unref(popoverRef).popperRef?.delayHide?.()
4853
}
54+
const basePath = import.meta.env.VITE_API_BASE_URL
55+
const baseUrl = basePath + '/system/assistant/picture/'
56+
const pageLogo = computed(() => {
57+
return props.logo.startsWith('blob') ? props.logo : baseUrl + props.logo
58+
})
4959
</script>
5060

5161
<template>
5262
<div class="card">
5363
<div class="name-icon">
54-
<img :src="Lock" width="32px" height="32px" />
64+
<img v-if="props.logo" :src="pageLogo" width="32px" height="32px" />
65+
<el-icon v-else-if="appearanceStore.themeColor === 'custom'" size="32">
66+
<LOGO></LOGO>
67+
</el-icon>
68+
<img v-else :src="Lock" width="32px" height="32px" />
5569
<span class="name ellipsis" :title="name">{{ name }}</span>
5670
<span class="default" :class="isBase && 'is-base'">{{
5771
isBase ? $t('embedded.basic_application') : $t('embedded.advanced_application')

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
width="400"
44
height="700"
55
style="position: fixed; left: 16px; bottom: 16px"
6-
src="/embedded.html/#/assistant?id=7355522562870218752"
6+
src="/embedded.html/#/assistant?id=7368458045128445952"
77
frameborder="0"
88
></iframe>
99
</template>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ const saveHandler = () => {
577577
:name="ele.name"
578578
:is-base="ele.type === 0"
579579
:description="ele.description"
580+
:logo="JSON.parse(ele.configuration).logo"
580581
@embedded="handleEmbedded(ele)"
581582
@edit="handleEditRule(ele)"
582583
@del="deleteHandler(ele)"

0 commit comments

Comments
 (0)