Add platform class to body

This commit is contained in:
2025-10-29 14:20:40 +01:00
parent 29b43d09ba
commit e450bf286c
+8
View File
@@ -2,6 +2,7 @@
import AppLayout from '@/layouts/app/AppSidebarLayout.vue'; import AppLayout from '@/layouts/app/AppSidebarLayout.vue';
// import AppLayout from '@/layouts/app/AppHeaderLayout.vue'; // import AppLayout from '@/layouts/app/AppHeaderLayout.vue';
import type { BreadcrumbItemType } from '@/types'; import type { BreadcrumbItemType } from '@/types';
import { computed, onMounted } from 'vue';
interface Props { interface Props {
breadcrumbs?: BreadcrumbItemType[]; breadcrumbs?: BreadcrumbItemType[];
@@ -10,6 +11,13 @@ interface Props {
withDefaults(defineProps<Props>(), { withDefaults(defineProps<Props>(), {
breadcrumbs: () => [], breadcrumbs: () => [],
}); });
onMounted(() => {
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) {
document.body.classList.add('is-mac')
}
})
</script> </script>
<template> <template>