fix(frontend-embed): fix instanceticker, remove directives (#14631)

This commit is contained in:
かっこかり 2024-09-25 16:28:32 +09:00 committed by GitHub
parent 8c3be57ab3
commit 0f8b15f0fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 5 deletions

View file

@ -29,12 +29,12 @@ const props = defineProps<{
// if no instance data is given, this is for the local instance
const instance = props.instance ?? {
name: serverMetadata.name,
themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement).content,
themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement)?.content,
};
const faviconUrl = computed(() => props.instance ? mediaProxy.getProxiedImageUrlNullable(props.instance.faviconUrl, 'preview') : mediaProxy.getProxiedImageUrlNullable(serverMetadata.iconUrl, 'preview') ?? '/favicon.ico');
const themeColor = serverMetadata.themeColor ?? '#777777';
const themeColor = props.instance?.themeColor ?? serverMetadata.themeColor ?? '#777777';
const bg = {
background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)`,