You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.2 KiB

3 years ago
2 years ago
  1. <template>
  2. <v-app>
  3. <the-header>
  4. <template #leftDrawerIcon>
  5. <v-app-bar-nav-icon @click="drawerLeft = !drawerLeft" />
  6. </template>
  7. </the-header>
  8. <v-navigation-drawer
  9. v-model="drawerLeft"
  10. app
  11. clipped
  12. >
  13. <the-side-bar
  14. :link="getLink"
  15. :is-project-admin="isProjectAdmin"
  16. :project="currentProject"
  17. />
  18. </v-navigation-drawer>
  19. <v-main class="pb-0">
  20. <nuxt />
  21. </v-main>
  22. </v-app>
  23. </template>
  24. <script>
  25. import { mapGetters } from 'vuex'
  26. import TheHeader from '~/components/layout/TheHeader'
  27. import TheSideBar from '~/components/layout/TheSideBar'
  28. export default {
  29. components: {
  30. TheSideBar,
  31. TheHeader
  32. },
  33. middleware: ['check-auth', 'auth', 'set-project'],
  34. data() {
  35. return {
  36. drawerLeft: null,
  37. isProjectAdmin: false
  38. }
  39. },
  40. computed: {
  41. ...mapGetters('projects', ['getLink', 'currentProject']),
  42. },
  43. watch: {
  44. '$route.query'() {
  45. this.$services.option.save(this.$route.params.id, this.$route.query)
  46. }
  47. },
  48. async created() {
  49. this.isProjectAdmin = await this.$services.member.isProjectAdmin(this.$route.params.id)
  50. }
  51. }
  52. </script>