AppLayout.vue 841 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <script setup lang="ts">
  2. import AppSidebar from '@/Components/AppSidebar.vue'
  3. import {SidebarProvider} from '@/Packages/Shadcn/Components/ui/sidebar'
  4. import {Head, usePage} from "@inertiajs/vue3";
  5. import {computed} from "vue";
  6. const page = usePage()
  7. defineOptions({inheritAttrs: false})
  8. defineProps({
  9. pageClass: {
  10. default: () => null,
  11. }
  12. })
  13. const user = computed(() => page?.props?.auth?.user)
  14. const chats = computed(() => page?.props?.auth?.chats ?? [])
  15. </script>
  16. <template>
  17. <Head/>
  18. <SidebarProvider>
  19. <AppSidebar v-bind="{ user, chats }"/>
  20. <main class="w-full px-2 md:px-0 md:pr-2 py-2" :class="pageClass">
  21. <!-- <div class="sticky top-2 bg-background px-3 py-2">Steam Deck QA</div>-->
  22. <slot/>
  23. </main>
  24. </SidebarProvider>
  25. </template>
  26. <style scoped>
  27. </style>