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.

53 lines
1.1 KiB

2 years ago
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 v-model="drawerLeft" app clipped>
  9. <the-side-bar :is-project-admin="isProjectAdmin" :project="currentProject" />
  10. </v-navigation-drawer>
  11. <v-main class="pb-0">
  12. <nuxt />
  13. </v-main>
  14. </v-app>
  15. </template>
  16. <script>
  17. import { mapGetters } from 'vuex'
  18. import TheHeader from '~/components/layout/TheHeader'
  19. import TheSideBar from '~/components/layout/TheSideBar'
  20. export default {
  21. components: {
  22. TheSideBar,
  23. TheHeader
  24. },
  25. middleware: ['check-auth', 'auth', 'set-project'],
  26. data() {
  27. return {
  28. drawerLeft: null,
  29. isProjectAdmin: false
  30. }
  31. },
  32. computed: {
  33. ...mapGetters('projects', ['currentProject'])
  34. },
  35. watch: {
  36. '$route.query'() {
  37. this.$services.option.save(this.$route.params.id, this.$route.query)
  38. }
  39. },
  40. async created() {
  41. const member = await this.$repositories.member.fetchMyRole(this.$route.params.id)
  42. this.isProjectAdmin = member.isProjectAdmin
  43. }
  44. }
  45. </script>