diff --git a/src/assets/images/logos/dingtalk.jpg b/src/assets/images/logos/dingtalk.jpg new file mode 100644 index 00000000..e4402c2d Binary files /dev/null and b/src/assets/images/logos/dingtalk.jpg differ diff --git a/src/components/cards/NotificationChannelCard.vue b/src/components/cards/NotificationChannelCard.vue index 43c3bde5..87f24a9a 100644 --- a/src/components/cards/NotificationChannelCard.vue +++ b/src/components/cards/NotificationChannelCard.vue @@ -83,7 +83,7 @@ const getIcon = computed(() => { case 'discord': return getLogoUrl('discord') case 'dingtalk': - return getLogoUrl('notification') + return getLogoUrl('dingtalk') case 'webpush': return getLogoUrl('chrome') default: diff --git a/src/utils/__tests__/imageUtils.spec.ts b/src/utils/__tests__/imageUtils.spec.ts index 55b655f8..9124192f 100644 --- a/src/utils/__tests__/imageUtils.spec.ts +++ b/src/utils/__tests__/imageUtils.spec.ts @@ -1,4 +1,4 @@ -import { getDisplayImageUrl, getProxyImageUrl } from '@/utils/imageUtils' +import { getDisplayImageUrl, getLogoUrl, getProxyImageUrl, hasLogo } from '@/utils/imageUtils' import { describe, expect, it } from 'vitest' describe('image URL helpers', () => { @@ -23,4 +23,9 @@ describe('image URL helpers', () => { expect(getProxyImageUrl('data:image/png;base64,abc', { useCache: true })).toBe('data:image/png;base64,abc') expect(getProxyImageUrl('', { useCache: true })).toBe('') }) + + it('exposes the official DingTalk logo for notification channels', () => { + expect(hasLogo('dingtalk')).toBe(true) + expect(getLogoUrl('dingtalk')).toContain('dingtalk') + }) }) diff --git a/src/utils/imageUtils.ts b/src/utils/imageUtils.ts index ba6d45c9..1021afd4 100644 --- a/src/utils/imageUtils.ts +++ b/src/utils/imageUtils.ts @@ -19,6 +19,7 @@ import clawbotLogo from '@/assets/images/logos/clawbot.png' import telegramLogo from '@/assets/images/logos/telegram.webp' import slackLogo from '@/assets/images/logos/slack.webp' import discordLogo from '@/assets/images/logos/discord.png' +import dingtalkLogo from '@/assets/images/logos/dingtalk.jpg' import synologychatLogo from '@/assets/images/logos/synologychat.png' import vocechatLogo from '@/assets/images/logos/vocechat.png' import downloaderLogo from '@/assets/images/logos/downloader.png' @@ -53,6 +54,7 @@ const logoMap: Record = { telegram: telegramLogo, slack: slackLogo, discord: discordLogo, + dingtalk: dingtalkLogo, synologychat: synologychatLogo, vocechat: vocechatLogo, downloader: downloaderLogo,