Add 削除して編集 (#6147)
* Add 削除して編集 * 言語ファイルを更新 * リプライとリノートも復元する * Revert "リプライとリノートも復元する" This reverts commit f23f7f8d784b28f3d365c8f5aecf81001577c672. * リプライとリノートも復元する
This commit is contained in:
parent
67b39b1a98
commit
a5e1ce0e0b
@ -35,6 +35,8 @@ unpin: "ピン留め解除"
|
|||||||
copyContent: "内容をコピー"
|
copyContent: "内容をコピー"
|
||||||
copyLink: "リンクをコピー"
|
copyLink: "リンクをコピー"
|
||||||
delete: "削除"
|
delete: "削除"
|
||||||
|
deleteAndEdit: "削除して編集"
|
||||||
|
deleteAndEditConfirm: "このノートを削除してもう一度編集しますか?このノートへのリアクション、Renote、返信も全て削除されます。"
|
||||||
addToList: "リストに追加"
|
addToList: "リストに追加"
|
||||||
sendMessage: "メッセージを送信"
|
sendMessage: "メッセージを送信"
|
||||||
copyUsername: "ユーザー名をコピー"
|
copyUsername: "ユーザー名をコピー"
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
import { faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { faCopy, faTrashAlt, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
|
import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
|
||||||
import { parse } from '../../mfm/parse';
|
import { parse } from '../../mfm/parse';
|
||||||
import { sum, unique } from '../../prelude/array';
|
import { sum, unique } from '../../prelude/array';
|
||||||
import i18n from '../i18n';
|
import i18n from '../i18n';
|
||||||
@ -142,7 +142,7 @@ export default Vue.extend({
|
|||||||
replies: [],
|
replies: [],
|
||||||
showContent: false,
|
showContent: false,
|
||||||
hideThisNote: false,
|
hideThisNote: false,
|
||||||
faBolt, faTimes, faBullhorn, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan
|
faEdit, faBolt, faTimes, faBullhorn, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -460,6 +460,22 @@ export default Vue.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
delEdit() {
|
||||||
|
this.$root.dialog({
|
||||||
|
type: 'warning',
|
||||||
|
text: this.$t('deleteAndEditConfirm'),
|
||||||
|
showCancelButton: true
|
||||||
|
}).then(({ canceled }) => {
|
||||||
|
if (canceled) return;
|
||||||
|
|
||||||
|
this.$root.api('notes/delete', {
|
||||||
|
noteId: this.appearNote.id
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$root.post({ initialNote: this.appearNote, renote: this.appearNote.renote, reply: this.appearNote.reply });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
toggleFavorite(favorite: boolean) {
|
toggleFavorite(favorite: boolean) {
|
||||||
this.$root.api(favorite ? 'notes/favorites/create' : 'notes/favorites/delete', {
|
this.$root.api(favorite ? 'notes/favorites/create' : 'notes/favorites/delete', {
|
||||||
noteId: this.appearNote.id
|
noteId: this.appearNote.id
|
||||||
@ -547,6 +563,11 @@ export default Vue.extend({
|
|||||||
),
|
),
|
||||||
...(this.appearNote.userId == this.$store.state.i.id ? [
|
...(this.appearNote.userId == this.$store.state.i.id ? [
|
||||||
null,
|
null,
|
||||||
|
{
|
||||||
|
icon: faEdit,
|
||||||
|
text: this.$t('deleteAndEdit'),
|
||||||
|
action: this.delEdit
|
||||||
|
},
|
||||||
{
|
{
|
||||||
icon: faTrashAlt,
|
icon: faTrashAlt,
|
||||||
text: this.$t('delete'),
|
text: this.$t('delete'),
|
||||||
|
@ -300,6 +300,7 @@ export default Vue.extend({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.visibility = init.visibility;
|
this.visibility = init.visibility;
|
||||||
|
this.localOnly = init.localOnly;
|
||||||
this.quoteId = init.renote ? init.renote.id : null;
|
this.quoteId = init.renote ? init.renote.id : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user