Delege post confirmation modal
This commit is contained in:
parent
64a99413db
commit
5d29b7c26e
3 changed files with 40 additions and 2 deletions
|
|
@ -55,7 +55,7 @@
|
|||
v-on:addquickreaction="addQuickReaction"
|
||||
v-on:addreply="addReply(selectedEvent)"
|
||||
v-on:edit="edit(selectedEvent)"
|
||||
v-on:redact="redact(selectedEvent)"
|
||||
v-on:redact="showDeletePostPopup = true"
|
||||
v-on:download="download(selectedEvent)"
|
||||
v-on:report="reportEvent(selectedEvent)"
|
||||
v-on:more="
|
||||
|
|
@ -304,6 +304,9 @@
|
|||
<div :class="['heart-wrapper', { 'is-active': heartAnimation }]" :style="hearAnimationPosition">
|
||||
<div :class="['heart', { 'is-active': heartAnimation }]" />
|
||||
</div>
|
||||
|
||||
<!-- Delete post dialog -->
|
||||
<DeletePostDialog v-model="showDeletePostPopup" v-on:deletePost="onDeletePost"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -337,6 +340,7 @@ import MessageErrorHandler from "./MessageErrorHandler";
|
|||
import MessageOperationsChannel from './messages/channel/MessageOperationsChannel.vue';
|
||||
import prettyBytes from "pretty-bytes";
|
||||
import RoomExport from "./RoomExport.vue";
|
||||
import DeletePostDialog from "./DeletePostDialog.vue"
|
||||
import EmojiPicker from 'vue3-emoji-picker';
|
||||
import 'vue3-emoji-picker/css';
|
||||
import emitter from 'tiny-emitter/instance';
|
||||
|
|
@ -398,7 +402,8 @@ export default {
|
|||
RoomExport,
|
||||
EmojiPicker,
|
||||
RoomUpgradePrompt,
|
||||
ReportRoomOrEventDialog
|
||||
ReportRoomOrEventDialog,
|
||||
DeletePostDialog
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
@ -491,6 +496,7 @@ export default {
|
|||
reverseOrder: false,
|
||||
downloadingChat: false,
|
||||
reportingEventId: null,
|
||||
showDeletePostPopup: false,
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -2006,6 +2012,11 @@ export default {
|
|||
.catch((err) => {
|
||||
console.log("Error leaving", err);
|
||||
});
|
||||
},
|
||||
|
||||
onDeletePost() {
|
||||
this.redact(this.selectedEvent);
|
||||
this.showDeletePostPopup = false;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue