Skip to content

Commit e8c7a1f

Browse files
committed
fix: separate inputs for thread and post creation, hook up proper model for each type post vs thread
1 parent 88e4ba6 commit e8c7a1f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/layout/Editor.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@
157157

158158
<div class="editor-body" @dragenter.prevent="showDropzone = true" @dragover.prevent="showDropzone = true">
159159
<div class="editor-column-input" :class="{ 'hidden': preview }">
160-
<textarea class="editor-input" v-model="posting.post.body" :class="{ 'rtl': rtl }" placeholder="Enter your reply here. (BTW, you can drag and drop images directly into the editor panel)" :maxlength="postMaxLength || 10000"></textarea>
160+
<textarea class="editor-input" v-if="threadEditorMode" v-model="threadCopy.body" :class="{ 'rtl': rtl }" placeholder="Enter your reply here. (BTW, you can drag and drop images directly into the editor panel)" :maxlength="postMaxLength || 10000"></textarea>
161+
<textarea class="editor-input" v-if="postEditorMode" v-model="posting.post.body" :class="{ 'rtl': rtl }" placeholder="Enter your reply here. (BTW, you can drag and drop images directly into the editor panel)" :maxlength="postMaxLength || 10000"></textarea>
161162
<div class="editor-drag-container" :class="{ 'visible': showDropzone}">
162163
<div class="editor-drag">
163164
<div class="editor-drag-text">Drag and Drop Images</div>
@@ -217,7 +218,7 @@
217218
<button class="inverted-button cancel" @click="cancel()">
218219
Cancel
219220
</button>
220-
<button class="send" @click="createAction(posting.post).then(closeEditor);" @disabled="!threadCopy?.title.length || !canCreate() || (threadCopy.addPoll && !threadCopy.pollValid)">
221+
<button class="send" @click="createAction(threadCopy).then(closeEditor);" @disabled="!threadCopy?.title.length || !canCreate() || (threadCopy.addPoll && !threadCopy.pollValid)">
221222
<i class="fa fa-paper-plane" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;Start Thread
222223
</button>
223224

0 commit comments

Comments
 (0)