@ -4,6 +4,7 @@ import shouldMuteNote from './should-mute-note';
|
||||
import MkNoteMenu from '../views/components/note-menu.vue';
|
||||
import MkReactionPicker from '../views/components/reaction-picker.vue';
|
||||
import pleaseLogin from './please-login';
|
||||
import i18n from '../../i18n';
|
||||
|
||||
function focus(el, fn) {
|
||||
const target = fn(el);
|
||||
@ -21,6 +22,8 @@ type Opts = {
|
||||
};
|
||||
|
||||
export default (opts: Opts = {}) => ({
|
||||
i18n: i18n(),
|
||||
|
||||
data() {
|
||||
return {
|
||||
showContent: false,
|
||||
@ -175,8 +178,16 @@ export default (opts: Opts = {}) => ({
|
||||
},
|
||||
|
||||
del() {
|
||||
this.$root.api('notes/delete', {
|
||||
noteId: this.appearNote.id
|
||||
this.$root.dialog({
|
||||
type: 'warning',
|
||||
text: this.$t('@.delete-confirm'),
|
||||
showCancelButton: true
|
||||
}).then(({ canceled }) => {
|
||||
if (canceled) return;
|
||||
|
||||
this.$root.api('notes/delete', {
|
||||
noteId: this.appearNote.id
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user