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.

67 lines
1.3 KiB

5 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
  9. v-model="drawerLeft"
  10. app
  11. clipped
  12. color=""
  13. >
  14. <the-side-bar
  15. :link="getLink"
  16. :is-project-admin="isProjectAdmin"
  17. :project="currentProject"
  18. />
  19. </v-navigation-drawer>
  20. <v-main>
  21. <v-container
  22. fluid
  23. fill-height
  24. >
  25. <v-layout
  26. justify-center
  27. >
  28. <v-flex fill-height>
  29. <nuxt />
  30. </v-flex>
  31. </v-layout>
  32. </v-container>
  33. </v-main>
  34. </v-app>
  35. </template>
  36. <script>
  37. import { mapGetters } from 'vuex'
  38. import TheSideBar from '~/components/layout/TheSideBar'
  39. import TheHeader from '~/components/layout/TheHeader'
  40. export default {
  41. components: {
  42. TheSideBar,
  43. TheHeader
  44. },
  45. middleware: ['check-auth', 'auth', 'check-admin'],
  46. data() {
  47. return {
  48. drawerLeft: null,
  49. isProjectAdmin: false,
  50. }
  51. },
  52. computed: {
  53. ...mapGetters('projects', ['getLink', 'currentProject']),
  54. },
  55. async created() {
  56. this.isProjectAdmin = await this.$services.member.isProjectAdmin(this.$route.params.id)
  57. }
  58. }
  59. </script>