default.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <div>
  3. <!-- Show the loading page -->
  4. <client-only placeholder-tag="client-only-placeholder" placeholder=" " />
  5. <v-app>
  6. <LayoutLoadingScreen />
  7. <LayoutDialogRefreshNeeded />
  8. <LayoutHeader />
  9. <LayoutMainMenu>
  10. <template #prepend="{ isRail }">
  11. <LayoutUpgradePremiumButton
  12. v-if="showUpgradePremiumButton"
  13. :minimized="isRail"
  14. />
  15. </template>
  16. </LayoutMainMenu>
  17. <v-main class="main">
  18. <LayoutSubheader />
  19. <LayoutAlertBar />
  20. <!-- Page will be rendered here-->
  21. <slot />
  22. </v-main>
  23. <LazyLayoutAlertContainer />
  24. </v-app>
  25. </div>
  26. </template>
  27. <script setup lang="ts">
  28. import { computed, type ComputedRef } from 'vue'
  29. import { useLayoutStore } from '~/stores/layout'
  30. import { useAccessProfileStore } from '~/stores/accessProfile'
  31. import { useOrganizationProfileStore } from '~/stores/organizationProfile'
  32. const layoutStore = useLayoutStore()
  33. layoutStore.name = 'default'
  34. const accessProfile = useAccessProfileStore()
  35. const organizationProfile = useOrganizationProfileStore()
  36. const showUpgradePremiumButton: ComputedRef<boolean> = computed(
  37. () =>
  38. ((organizationProfile.isArtistProduct ||
  39. organizationProfile.isTrialActive) &&
  40. (accessProfile.isCaMember || accessProfile.isAdmin)) ??
  41. false,
  42. )
  43. </script>