Admin.vue 2.3 KB

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