PersonalSetting.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import LayoutSidebar from '#desktop/components/layout/LayoutSidebar.vue'
  4. import PersonalSettingSidebar from '#desktop/pages/personal-setting/components/PersonalSettingSidebar.vue'
  5. import { usePersonalSettingStore } from '../stores/personalSetting.ts'
  6. defineOptions({
  7. beforeRouteEnter(to) {
  8. usePersonalSettingStore().setPreviousPersonalSettingScreen(to.fullPath)
  9. return true
  10. },
  11. beforeRouteUpdate(to) {
  12. usePersonalSettingStore().setPreviousPersonalSettingScreen(to.fullPath)
  13. return true
  14. },
  15. })
  16. </script>
  17. <template>
  18. <div class="grid h-full grid-cols-[260px_1fr]">
  19. <LayoutSidebar
  20. id="personal-settings-sidebar"
  21. name="personal-setting"
  22. class="bg-blue-50 dark:bg-gray-800"
  23. >
  24. <PersonalSettingSidebar />
  25. </LayoutSidebar>
  26. <RouterView #default="{ Component }">
  27. <KeepAlive max="1">
  28. <component :is="Component" />
  29. </KeepAlive>
  30. </RouterView>
  31. </div>
  32. </template>