Cleanup error page

pull/5806/head
Cagatay Civici 2024-05-21 13:09:16 +03:00
parent a14606e8d0
commit 2fbdf56600
1 changed files with 0 additions and 52 deletions

View File

@ -14,55 +14,3 @@
</NuxtLayout>
</div>
</template>
<script>
import EventBus from '@/layouts/AppEventBus';
export default {
watch: {
$route: {
handler(to) {
if (to.name === 'index') {
this.themeChangeListener({ theme: this.$appState.darkTheme ? 'aura-dark-green' : 'aura-light-green', dark: this.$appState.darkTheme });
}
}
}
},
created() {
useServerHead({
link: [
{
id: 'theme-link',
rel: 'stylesheet',
href: '/themes/aura-light-green/theme.css'
}
]
});
},
mounted() {
EventBus.on('theme-change', this.themeChangeListener);
},
beforeUnmount() {
EventBus.off('theme-change', this.themeChangeListener);
},
methods: {
themeChangeListener(event) {
if (!document.startViewTransition) {
this.applyTheme(event);
return;
}
document.startViewTransition(() => this.applyTheme(event));
},
applyTheme(event) {
// @todo
/*this.$primevue.changeTheme(this.$appState.theme, event.theme, 'theme-link', () => {
this.$appState.theme = event.theme;
this.$appState.darkTheme = event.dark;
EventBus.emit('dark-mode-toggle', { theme: event.theme, dark: event.dark });
});*/
}
}
};
</script>