From 2a86942f077723a60ea2f713cea46982afc164d3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 8 Dec 2022 16:57:57 +0900 Subject: [PATCH] fix(client): use proxied image for instance icon --- packages/client/src/pages/instance-info.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/client/src/pages/instance-info.vue b/packages/client/src/pages/instance-info.vue index 6e8560ef42..6e13da0d68 100644 --- a/packages/client/src/pages/instance-info.vue +++ b/packages/client/src/pages/instance-info.vue @@ -4,7 +4,7 @@
- + {{ instance.name || `(${i18n.ts.unknown})` }}
@@ -134,6 +134,7 @@ import { definePageMetadata } from '@/scripts/page-metadata'; import { i18n } from '@/i18n'; import MkUserCardMini from '@/components/MkUserCardMini.vue'; import MkPagination from '@/components/MkPagination.vue'; +import { getProxiedImageUrlNullable } from '@/scripts/media-proxy'; const props = defineProps<{ host: string; @@ -145,6 +146,7 @@ let meta = $ref(null); let instance = $ref(null); let suspended = $ref(false); let isBlocked = $ref(false); +let faviconUrl = $ref(null); const usersPagination = { endpoint: iAmModerator ? 'admin/show-users' : 'users' as const, @@ -163,6 +165,7 @@ async function fetch() { }); suspended = instance.isSuspended; isBlocked = instance.isBlocked; + faviconUrl = getProxiedImageUrlNullable(instance.faviconUrl, 'preview') ?? getProxiedImageUrlNullable(instance.iconUrl, 'preview'); } async function toggleBlock(ev) {