ThreadNew.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <div class='route_container'>
  3. <div class='h1'>Post new thread</div>
  4. <span class='select_button_text'>Post in category:</span>
  5. <select-button v-model='selectedCategory' :options='categories'></select-button>
  6. <input-editor name='new-thread' :hide-close='true' style='margin-top: 1rem'></input-editor>
  7. <button class='button button--green submit'>Post thread</button>
  8. </div>
  9. </template>
  10. <script>
  11. import InputEditor from '../InputEditor'
  12. import SelectButton from '../SelectButton'
  13. export default {
  14. name: 'ThreadNew',
  15. components: {
  16. InputEditor,
  17. SelectButton
  18. },
  19. data () {
  20. return {
  21. selectedCategory: this.$store.state.category.selectedCategory
  22. }
  23. },
  24. computed: {
  25. categories () {
  26. return this.$store.state.meta.categories
  27. }
  28. },
  29. methods: {}
  30. }
  31. </script>
  32. <style lang='scss' scoped>
  33. @import '../../assets/scss/variables.scss';
  34. .select_button_text {
  35. font-weight: bold;
  36. margin-top: 1rem;
  37. display: inline-block;
  38. margin-right: 0.5rem;
  39. }
  40. .submit {
  41. margin-top: 1rem;
  42. }
  43. </style>