EditorChannel.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template lang="pug">
  2. .channel-container
  3. .channel-sidebar
  4. q-card.rounded-borders.bg-dark
  5. q-list(
  6. padding
  7. dark
  8. )
  9. q-item(
  10. v-for='ch of channels'
  11. :key='ch.id'
  12. active-class='bg-primary text-white'
  13. :active='selectedChannel === ch.id'
  14. @click='selectedChannel = ch.id'
  15. clickable
  16. )
  17. q-item-section(side)
  18. q-icon(name='las la-grip-lines')
  19. q-item-section
  20. q-item-label
  21. span #&nbsp;
  22. strong {{ch.name}}
  23. q-item-label(caption) {{ch.description}}
  24. //- q-item-section(side)
  25. //- q-badge(color='accent', label='0')
  26. q-btn.q-mt-sm.full-width(
  27. color='primary'
  28. icon='las la-plus'
  29. :label='$t(`Add Channel`)'
  30. no-caps
  31. )
  32. .channel-main
  33. </template>
  34. <script>
  35. export default {
  36. data () {
  37. return {
  38. selectedChannel: 'xyz',
  39. channels: [
  40. {
  41. id: 'xyz',
  42. name: 'general',
  43. description: 'General discussions super long stuff'
  44. },
  45. {
  46. id: 'yas',
  47. name: 'random',
  48. description: 'Unrelated / fun stuff'
  49. },
  50. {
  51. id: 'asd',
  52. name: 'devs',
  53. description: 'Developer only'
  54. }
  55. ]
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. .channel {
  62. &-container {
  63. display: flex;
  64. height: 100%;
  65. }
  66. &-sidebar {
  67. width: 300px;
  68. flex: 0 0 300px;
  69. padding: 16px;
  70. }
  71. &-main {
  72. background-color: #FFF;
  73. flex: 1;
  74. }
  75. }
  76. </style>