From 475b130eefb36ced97e547ede8ad10a9980d55de Mon Sep 17 00:00:00 2001 From: Cleo Date: Fri, 10 Feb 2023 22:46:56 +0000 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 27f08bdb5..59547a3cb 100644 --- a/packages/client/src/pages/instance-info.vue +++ b/packages/client/src/pages/instance-info.vue @@ -13,7 +13,7 @@
- + {{ instance.name || `(${i18n.ts.unknown})` }}
@@ -156,6 +156,7 @@ import MkUserCardMini from '@/components/MkUserCardMini.vue'; import MkPagination from '@/components/MkPagination.vue'; import 'swiper/scss'; import 'swiper/scss/virtual'; +import { getProxiedImageUrlNullable } from '@/scripts/media-proxy'; const props = defineProps<{ host: string; @@ -171,6 +172,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, @@ -189,6 +191,7 @@ async function fetch() { }); suspended = instance.isSuspended; isBlocked = instance.isBlocked; + faviconUrl = getProxiedImageUrlNullable(instance.faviconUrl, 'preview') ?? getProxiedImageUrlNullable(instance.iconUrl, 'preview'); } async function toggleBlock(ev) {