UsersList.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <div class="sidebar" transition="slide">
  3. <div class="inner-wrapper">
  4. <div class="title">
  5. Users
  6. </div>
  7. <h5 class="center">Total users: {{ userCount }}</h5>
  8. <aside class="menu">
  9. <ul class="menu-list">
  10. <li v-for="(username, index) in users" :key="index">
  11. <router-link
  12. :to="{ name: 'profile', params: { username } }"
  13. target="_blank"
  14. >
  15. {{ username }}
  16. </router-link>
  17. </li>
  18. </ul>
  19. </aside>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. import { mapState } from "vuex";
  25. export default {
  26. computed: mapState({
  27. users: state => state.station.users,
  28. userCount: state => state.station.userCount
  29. })
  30. };
  31. </script>
  32. <style lang="scss" scoped>
  33. @import "styles/global.scss";
  34. .night-mode {
  35. .sidebar {
  36. background-color: $night-mode-secondary;
  37. .title {
  38. color: #fff;
  39. }
  40. * {
  41. color: #ddd;
  42. }
  43. }
  44. }
  45. .title {
  46. background-color: rgb(3, 169, 244);
  47. text-align: center;
  48. padding: 10px;
  49. color: $white;
  50. font-weight: 600;
  51. }
  52. .menu {
  53. padding: 0 20px;
  54. }
  55. .menu-list li a:hover {
  56. color: #000 !important;
  57. }
  58. </style>