Admin.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. <li :class='{ "is-active": currentTab == "news" }' @click='showTab("news")'>
  31. <a>
  32. <i class="material-icons">chrome_reader_mode</i>
  33. <span>&nbsp;News</span>
  34. </a>
  35. </li>
  36. </ul>
  37. </div>
  38. <queue-songs v-if='currentTab == "queueSongs"'></queue-songs>
  39. <songs v-if='currentTab == "songs"'></songs>
  40. <stations v-if='currentTab == "stations"'></stations>
  41. <reports v-if='currentTab == "reports"'></reports>
  42. <news v-if='currentTab == "news"'></news>
  43. </div>
  44. </template>
  45. <script>
  46. import MainHeader from '../MainHeader.vue';
  47. import MainFooter from '../MainFooter.vue';
  48. import QueueSongs from '../Admin/QueueSongs.vue';
  49. import Songs from '../Admin/Songs.vue';
  50. import Stations from '../Admin/Stations.vue';
  51. import Reports from '../Admin/Reports.vue';
  52. import News from '../Admin/News.vue';
  53. export default {
  54. components: {
  55. MainHeader,
  56. MainFooter,
  57. QueueSongs,
  58. Songs,
  59. Stations,
  60. Reports,
  61. News
  62. },
  63. data() {
  64. return {
  65. currentTab: 'queueSongs'
  66. }
  67. },
  68. methods: {
  69. showTab: function (tab) {
  70. this.currentTab = tab;
  71. }
  72. }
  73. }
  74. </script>
  75. <style lang='scss' scoped>
  76. .is-active a {
  77. color: #03a9f4 !important;
  78. border-color: #03a9f4 !important;
  79. }
  80. </style>