diff --git a/locales/en-US.yml b/locales/en-US.yml
index 10a6437936f3..49f31d01f7ea 100644
--- a/locales/en-US.yml
+++ b/locales/en-US.yml
@@ -114,6 +114,8 @@ common:
mobile-mode: 'Mobile mode'
empty: 'Empty'
edit: 'Edit'
+ edit2: 'Quick edit'
+ edited: 'Edited'
aboutInstance: "About this instance"
favoriteReactions: "Favorite reactions"
mostReacteds: "Most reacteds"
@@ -660,6 +662,7 @@ common/views/components/note-menu.vue:
deleteDriveYes: "Delete drive files too"
edit: "Edit"
edit-confirm: "Are you sure you want to edit this post? Old post will be deleted."
+ edit2-confirm: "Quick edit leaves a history. if you don't want to keep it, use normal editing. Do you want to quick edit?"
remote: "Show original note"
report: "Report"
report-abuse-detail: "What kind of nuisance did you encounter?"
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 85013c1936d8..4666b5536f8a 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -116,6 +116,8 @@ common:
mobile-mode: 'モバイル版'
empty: 'ありません!'
edit: '編集'
+ edit2: '簡易編集'
+ edited: '編集済み'
aboutInstance: "このインスタンスについて"
favoriteReactions: "よくするリアクション"
mostReacteds: "よくされるリアクション"
@@ -702,6 +704,7 @@ common/views/components/note-menu.vue:
deleteDriveYes: "ドライブのファイルも削除する"
edit: "編集"
edit-confirm: "この投稿を編集しますか?古い投稿は削除されます。"
+ edit2-confirm: "簡易編集は履歴が残ります、残したくない場合は普通の編集を使用してください。簡易編集をしますか?"
remote: "投稿元で見る"
pin-limit-exceeded: "これ以上ピン留めできません。"
report: "通報"
diff --git a/src/client/app/common/scripts/note-subscriber.ts b/src/client/app/common/scripts/note-subscriber.ts
index 1a630afa2b3e..00f5be93e71a 100644
--- a/src/client/app/common/scripts/note-subscriber.ts
+++ b/src/client/app/common/scripts/note-subscriber.ts
@@ -171,6 +171,13 @@ export default prop => ({
this.$_ns_target.cw = null;
break;
}
+
+ case 'updated': {
+ Vue.set(this.$_ns_target, 'updatedAt', body.updatedAt);
+ Vue.set(this.$_ns_target, 'text', body.text);
+ Vue.set(this.$_ns_target, 'cw', body.cw);
+ break;
+ }
}
this.$emit(`update:${prop}`, this.$_ns_note_);
diff --git a/src/client/app/common/scripts/post-form.ts b/src/client/app/common/scripts/post-form.ts
index ef5cc43ff65c..f81fc72878b7 100644
--- a/src/client/app/common/scripts/post-form.ts
+++ b/src/client/app/common/scripts/post-form.ts
@@ -44,7 +44,12 @@ export default (opts) => ({
type: Boolean,
required: false,
default: false
- }
+ },
+ updateMode: {
+ type: Boolean,
+ required: false,
+ default: false
+ },
},
data() {
@@ -482,7 +487,7 @@ export default (opts) => ({
text = `${text.replace(/\s+$/, '')}\n#${this.fixedTag}`;
}
- this.$root.api('notes/create', {
+ this.$root.api(this.updateMode ? 'notes/update' : 'notes/create', {
text,
fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
replyId: this.reply ? this.reply.id : undefined,
@@ -494,6 +499,7 @@ export default (opts) => ({
localOnly,
copyOnce,
viaMobile,
+ noteId: this.updateMode ? this.initialNote?.id : undefined,
geo: null
}).then(data => {
if (this.initialNote && this.initialNote._edit) {
diff --git a/src/client/app/common/views/components/note-header.vue b/src/client/app/common/views/components/note-header.vue
index 66af6862fab7..017c1364ab21 100644
--- a/src/client/app/common/views/components/note-header.vue
+++ b/src/client/app/common/views/components/note-header.vue
@@ -6,9 +6,9 @@