fix(frontend): サーバーアイコンを/proxyから取得するように

This commit is contained in:
MattyaDaihuku 2024-10-19 04:20:51 +00:00 committed by hijiki
parent f7793de61b
commit e121732783

View File

@ -11,13 +11,14 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup> <script lang="ts" setup>
import { computed } from 'vue'; import { computed } from 'vue';
import { instance as Instance } from '@/instance.js';
import { getProxiedImageUrlNullable } from '@/scripts/media-proxy.js'; import { getProxiedImageUrlNullable } from '@/scripts/media-proxy.js';
const props = defineProps<{ const props = defineProps<{
instance?: { instance?: {
faviconUrl?: string | null faviconUrl?: string | null
} }
}>(); }>();
const faviconUrl = computed(() => getProxiedImageUrlNullable(props.instance?.faviconUrl, 'preview') ?? '/favicon.ico'); const faviconUrl = computed(() => props.instance ? getProxiedImageUrlNullable(props.instance.faviconUrl, 'preview') : getProxiedImageUrlNullable(Instance.iconUrl, 'preview') ?? '/favicon.ico');
</script> </script>
<style lang="scss" module> <style lang="scss" module>