This commit is contained in:
syuilo 2023-03-02 18:40:55 +09:00
parent dad915e522
commit ebd7b27075
4 changed files with 1 additions and 4 deletions

View File

@ -96,7 +96,7 @@ function onTabClick(): void {
} }
const calcBg = () => { const calcBg = () => {
const rawBg = metadata?.bg ?? 'var(--bg)'; const rawBg = 'var(--bg)';
const tinyBg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg); const tinyBg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg);
tinyBg.setAlpha(0.85); tinyBg.setAlpha(0.85);
bg.value = tinyBg.toRgbString(); bg.value = tinyBg.toRgbString();

View File

@ -422,7 +422,6 @@ onUnmounted(() => {
definePageMetadata(computed(() => ({ definePageMetadata(computed(() => ({
title: ts.preferencesBackups, title: ts.preferencesBackups,
icon: 'ti ti-device-floppy', icon: 'ti ti-device-floppy',
bg: 'var(--bg)',
}))); })));
</script> </script>

View File

@ -47,6 +47,5 @@ const headerTabs = $computed(() => []);
definePageMetadata({ definePageMetadata({
title: i18n.ts.statusbar, title: i18n.ts.statusbar,
icon: 'ti ti-list', icon: 'ti ti-list',
bg: 'var(--bg)',
}); });
</script> </script>

View File

@ -10,7 +10,6 @@ export type PageMetadata = {
icon?: string | null; icon?: string | null;
avatar?: misskey.entities.User | null; avatar?: misskey.entities.User | null;
userName?: misskey.entities.User | null; userName?: misskey.entities.User | null;
bg?: string;
}; };
export function definePageMetadata(metadata: PageMetadata | null | Ref<PageMetadata | null> | ComputedRef<PageMetadata | null>): void { export function definePageMetadata(metadata: PageMetadata | null | Ref<PageMetadata | null> | ComputedRef<PageMetadata | null>): void {