primevue-mirror/error.vue

69 lines
2.3 KiB
Vue
Raw Normal View History

2023-03-21 17:25:22 +00:00
<template>
2023-03-21 17:34:11 +00:00
<div>
<NuxtLayout name="default">
2024-05-20 12:12:15 +00:00
<div class="flex card flex-col items-center gap-8 sm:p-20">
<div class="flex flex-col sm:flex-row items-center justify-center gap-4 text-primary">
<span class="font-bold" style="font-size: 144px"> 4 </span>
<div class="flex items-center justify-center bg-primary text-primary-contrast rounded-full w-32 h-32">
<i class="pi pi-prime" style="font-size: 4.5rem"></i>
2023-03-21 17:34:11 +00:00
</div>
2024-05-20 12:12:15 +00:00
<span class="font-bold" style="font-size: 144px"> 4 </span>
2023-03-21 17:25:22 +00:00
</div>
2024-05-20 12:12:15 +00:00
<div class="font-bold text-surface-900 text-center text-6xl border-t border-surface-200 dark:border-surface-700 pt-8">PAGE NOT FOUND</div>
2023-03-21 17:25:22 +00:00
</div>
2023-03-21 17:34:11 +00:00
</NuxtLayout>
</div>
2023-03-21 17:25:22 +00:00
</template>
2024-01-24 11:23:53 +00:00
<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) {
2024-04-02 07:55:18 +00:00
// @todo
/*this.$primevue.changeTheme(this.$appState.theme, event.theme, 'theme-link', () => {
2024-01-24 11:23:53 +00:00
this.$appState.theme = event.theme;
this.$appState.darkTheme = event.dark;
EventBus.emit('dark-mode-toggle', { theme: event.theme, dark: event.dark });
2024-04-02 07:55:18 +00:00
});*/
2024-01-24 11:23:53 +00:00
}
}
};
</script>