From 97f08b6a84f1a02e767c860884759a134e4187da Mon Sep 17 00:00:00 2001 From: Anthony Kinsey Date: Mon, 8 Nov 2021 14:44:53 -1000 Subject: [PATCH] feat: port create permissions code over for editor, extracted outside of editor --- src/components/layout/Editor.vue | 5 ++--- src/views/Messages.vue | 2 +- src/views/Posts.vue | 2 +- src/views/Threads.vue | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/layout/Editor.vue b/src/components/layout/Editor.vue index 07907dfa..2377e873 100644 --- a/src/components/layout/Editor.vue +++ b/src/components/layout/Editor.vue @@ -239,12 +239,11 @@ import Multiselect from '@vueform/multiselect' import { usersApi } from '@/api' export default { - props: ['editorConvoMode', 'threadEditorMode', 'postEditorMode', 'createAction', 'updateAction', 'showEditor', 'thread', 'currentMessage', 'post', 'quote' ], + props: ['editorConvoMode', 'threadEditorMode', 'postEditorMode', 'createAction', 'updateAction', 'showEditor', 'thread', 'currentMessage', 'post', 'quote', 'canCreate' ], emits: ['close'], components: { ImageUploader, PollCreator, Multiselect }, setup(props, { emit }) { /* Internal Methods */ - const canCreate = () => true const canUpdate = () => true const canLock = () => true const canSticky = () => true @@ -345,7 +344,7 @@ export default { } }) - return { ...toRefs(v), canLock, canCreate, canUpdate, canSticky, canModerate, canCreatePoll, cancel, closeEditor, onPollValidation } + return { ...toRefs(v), canLock, canUpdate, canSticky, canModerate, canCreatePoll, cancel, closeEditor, onPollValidation } } } diff --git a/src/views/Messages.vue b/src/views/Messages.vue index ade448e3..6291cbfb 100644 --- a/src/views/Messages.vue +++ b/src/views/Messages.vue @@ -148,7 +148,7 @@ - +