From 1f3b1e7074c78a87ee3e7e089f8c1d2eeb2f2a49 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 12 Nov 2022 09:39:11 +0900 Subject: fix(client): インスタンスティッカーのfaviconを読み込む際に偽サイト警告が出ることがあるのを修正 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/components/MkInstanceTicker.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages/client/src/components/MkInstanceTicker.vue') diff --git a/packages/client/src/components/MkInstanceTicker.vue b/packages/client/src/components/MkInstanceTicker.vue index d9f196f887..a5ff656f6d 100644 --- a/packages/client/src/components/MkInstanceTicker.vue +++ b/packages/client/src/components/MkInstanceTicker.vue @@ -9,6 +9,7 @@ import { } from 'vue'; import { instanceName } from '@/config'; import { instance as Instance } from '@/instance'; +import { getProxiedImageUrlNullable } from '@/scripts/media-proxy'; const props = defineProps<{ instance?: { @@ -20,15 +21,15 @@ const props = defineProps<{ // if no instance data is given, this is for the local instance const instance = props.instance ?? { - faviconUrl: Instance.iconUrl || Instance.faviconUrl || '/favicon.ico', + faviconUrl: getProxiedImageUrlNullable(Instance.iconUrl) ?? getProxiedImageUrlNullable(Instance.faviconUrl) ?? '/favicon.ico', name: instanceName, - themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement)?.content + themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement).content, }; const themeColor = instance.themeColor ?? '#777777'; const bg = { - background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)` + background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)`, }; -- cgit v1.2.3-freya