Admin.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. <li :class='{ "is-active": currentTab == "reports" }' @click='showTab("reports")'>
  25. <a>
  26. <i class="material-icons">report_problem</i>
  27. <span>&nbsp;Reports</span>
  28. </a>
  29. </li>
  30. </ul>
  31. </div>
  32. <queue-songs v-if='currentTab == "queueSongs"'></queue-songs>
  33. <songs v-if='currentTab == "songs"'></songs>
  34. <stations v-if='currentTab == "stations"'></stations>
  35. <reports v-if='currentTab == "reports"'></reports>
  36. </div>
  37. </template>
  38. <script>
  39. import MainHeader from '../MainHeader.vue';
  40. import MainFooter from '../MainFooter.vue';
  41. import QueueSongs from '../Admin/QueueSongs.vue';
  42. import Songs from '../Admin/Songs.vue';
  43. import Stations from '../Admin/Stations.vue';
  44. import Reports from '../Admin/Reports.vue';
  45. export default {
  46. components: { MainHeader, MainFooter, QueueSongs, Songs, Stations, Reports },
  47. data() {
  48. return {
  49. currentTab: 'queueSongs'
  50. }
  51. },
  52. methods: {
  53. showTab: function (tab) {
  54. this.currentTab = tab;
  55. }
  56. }
  57. }
  58. </script>
  59. <style lang='scss' scoped>
  60. .is-active a {
  61. color: #03a9f4 !important;
  62. border-color: #03a9f4 !important;
  63. }
  64. </style>