Meikan client v2
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.

Base.vue 775B

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <div>
  3. <md-toolbar class="md-primary" md-elevation="0">
  4. <h3 class="md-title">Meikan</h3>
  5. <div class="md-toolbar-section-end">
  6. <h3 v-if="currentUser" class="md-subheading">
  7. {{ currentUser.name }}
  8. </h3>
  9. </div>
  10. </md-toolbar>
  11. <md-tabs class="md-primary" md-sync-route>
  12. <md-tab id="tab-user" md-label="Users" to="/"></md-tab>
  13. <md-tab v-if="currentUser" id="tab-anime" md-label="Anime" to="/anime"></md-tab>
  14. </md-tabs>
  15. <router-view/>
  16. </div>
  17. </template>
  18. <script lang="ts">
  19. import { Component, Vue } from 'vue-property-decorator'
  20. import { namespace } from 'vuex-class'
  21. const user = namespace('user')
  22. @Component({})
  23. export default class Base extends Vue {
  24. @user.Getter('currentUser') private currentUser!: User | null
  25. }
  26. </script>