Admin.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <div class='app'>
  3. <main-header></main-header>
  4. <div class='tabs is-centered'>
  5. <ul>
  6. <li :class='{ "is-active": currentTab == "queueSongs" }' @click='showTab("queueSongs")'>
  7. <a>
  8. <i class='material-icons'>queue_music</i>
  9. <span>&nbsp;Queue Songs</span>
  10. </a>
  11. </li>
  12. <li :class='{ "is-active": currentTab == "songs" }' @click='showTab("songs")'>
  13. <a>
  14. <i class='material-icons'>music_note</i>
  15. <span>&nbsp;Songs</span>
  16. </a>
  17. </li>
  18. <li :class='{ "is-active": currentTab == "stations" }' @click='showTab("stations")'>
  19. <a>
  20. <i class='material-icons'>hearing</i>
  21. <span>&nbsp;Stations</span>
  22. </a>
  23. </li>
  24. </ul>
  25. </div>
  26. <queue-songs v-if='currentTab == "queueSongs"'></queue-songs>
  27. <songs v-if='currentTab == "songs"'></songs>
  28. <stations v-if='currentTab == "stations"'></stations>
  29. </div>
  30. </template>
  31. <script>
  32. import MainHeader from '../MainHeader.vue';
  33. import MainFooter from '../MainFooter.vue';
  34. import QueueSongs from '../Admin/QueueSongs.vue';
  35. import Songs from '../Admin/Songs.vue';
  36. import Stations from '../Admin/Stations.vue';
  37. export default {
  38. components: { MainHeader, MainFooter, QueueSongs, Songs, Stations },
  39. data() {
  40. return {
  41. currentTab: 'queueSongs'
  42. }
  43. },
  44. methods: {
  45. showTab: function (tab) {
  46. this.currentTab = tab;
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang='scss' scoped></style>