summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-05-07 16:25:06 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-05-07 16:25:06 +0900
commitde6cbf8a22edf64bf39806b04a0222da841b8375 (patch)
tree379696ec0db817b7390d871189cfb07a8335162a /src
parentoops (diff)
downloadmisskey-de6cbf8a22edf64bf39806b04a0222da841b8375.tar.gz
misskey-de6cbf8a22edf64bf39806b04a0222da841b8375.tar.bz2
misskey-de6cbf8a22edf64bf39806b04a0222da841b8375.zip
リモートアカウントの投稿に対しての返信にはメンションを付けるように
Diffstat (limited to 'src')
-rw-r--r--src/client/app/desktop/views/components/post-form.vue24
-rw-r--r--src/client/app/mobile/views/components/post-form.vue4
2 files changed, 15 insertions, 13 deletions
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue
index ec220cc585..984fc9866c 100644
--- a/src/client/app/desktop/views/components/post-form.vue
+++ b/src/client/app/desktop/views/components/post-form.vue
@@ -105,21 +105,11 @@ export default Vue.extend({
}
},
- watch: {
- text() {
- this.saveDraft();
- },
-
- poll() {
- this.saveDraft();
- },
-
- files() {
- this.saveDraft();
+ mounted() {
+ if (this.reply && this.reply.user.host != null) {
+ this.text = `@${this.reply.user.username}@${this.reply.user.host} `;
}
- },
- mounted() {
this.$nextTick(() => {
// 書きかけの投稿を復元
const draft = JSON.parse(localStorage.getItem('drafts') || '{}')[this.draftId];
@@ -134,10 +124,18 @@ export default Vue.extend({
}
this.$emit('change-attached-media', this.files);
}
+
+ this.$nextTick(() => this.watch());
});
},
methods: {
+ watch() {
+ this.$watch('text', () => this.saveDraft());
+ this.$watch('poll', () => this.saveDraft());
+ this.$watch('files', () => this.saveDraft());
+ },
+
focus() {
(this.$refs.text as any).focus();
},
diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue
index 3f890223a3..e5281fcbc4 100644
--- a/src/client/app/mobile/views/components/post-form.vue
+++ b/src/client/app/mobile/views/components/post-form.vue
@@ -67,6 +67,10 @@ export default Vue.extend({
},
mounted() {
+ if (this.reply && this.reply.user.host != null) {
+ this.text = `@${this.reply.user.username}@${this.reply.user.host} `;
+ }
+
this.$nextTick(() => {
this.focus();
});