Drawer.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <v-navigation-drawer
  3. v-model="drawer"
  4. app
  5. clipped
  6. :mini-variant="miniVariant"
  7. >
  8. <!-- drawer items for student -->
  9. <v-list class="pb-7">
  10. <v-list-item to="/learning" color="primary" nuxt>
  11. <v-list-item-action>
  12. <v-icon>mdi-view-dashboard</v-icon>
  13. </v-list-item-action>
  14. <v-list-item-content>
  15. <v-list-item-title> {{ $t('drawer.levels') }}</v-list-item-title>
  16. </v-list-item-content>
  17. </v-list-item>
  18. <v-list-item to="/assignments" color="primary" nuxt>
  19. <v-list-item-action>
  20. <v-icon>mdi-gavel</v-icon>
  21. </v-list-item-action>
  22. <v-list-item-content>
  23. <v-list-item-title> {{ $t('drawer.playground') }}</v-list-item-title>
  24. </v-list-item-content>
  25. </v-list-item>
  26. </v-list>
  27. </v-navigation-drawer>
  28. </template>
  29. <script lang="ts">
  30. import Vue from 'vue'
  31. export default Vue.extend({
  32. name: 'BaseDrawer',
  33. computed: {
  34. userType(): string {
  35. return this.$accessor.userType
  36. },
  37. miniVariant: {
  38. get() {
  39. return this.$accessor.miniDrawer
  40. },
  41. set(value: boolean) {
  42. this.$accessor.setMiniDrawer(value)
  43. }
  44. },
  45. drawer: {
  46. get() {
  47. return this.$accessor.drawer
  48. },
  49. set(value: boolean) {
  50. this.$accessor.setDrawer(value)
  51. }
  52. }
  53. }
  54. })
  55. </script>
  56. <style>
  57. .v-navigation-drawer__border {
  58. width: 0px;
  59. }
  60. </style>