diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2018-12-27 23:14:30 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2018-12-27 23:14:30 +0900 |
| commit | fdd42fc2d7ee1aa84489e668971f013b6c06c3df (patch) | |
| tree | a8f3949cdf24b2ef3fd2379b1961fa957fddc6f7 /src/client/app/mobile | |
| parent | Set cursor default on hover the own reaction (diff) | |
| download | misskey-fdd42fc2d7ee1aa84489e668971f013b6c06c3df.tar.gz misskey-fdd42fc2d7ee1aa84489e668971f013b6c06c3df.tar.bz2 misskey-fdd42fc2d7ee1aa84489e668971f013b6c06c3df.zip | |
user mention (#3771)
Diffstat (limited to 'src/client/app/mobile')
| -rw-r--r-- | src/client/app/mobile/script.ts | 1 | ||||
| -rw-r--r-- | src/client/app/mobile/views/components/post-form-dialog.vue | 5 | ||||
| -rw-r--r-- | src/client/app/mobile/views/components/post-form.vue | 9 | ||||
| -rw-r--r-- | src/client/app/mobile/views/pages/user.vue | 8 |
4 files changed, 23 insertions, 0 deletions
diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts index e0ccbad792..52b0d9bbb2 100644 --- a/src/client/app/mobile/script.ts +++ b/src/client/app/mobile/script.ts @@ -60,6 +60,7 @@ init((launch) => { const vm = this.$root.new(PostForm, { reply: o.reply, + mention: o.mention, renote: o.renote }); diff --git a/src/client/app/mobile/views/components/post-form-dialog.vue b/src/client/app/mobile/views/components/post-form-dialog.vue index 15b36db945..616623cda7 100644 --- a/src/client/app/mobile/views/components/post-form-dialog.vue +++ b/src/client/app/mobile/views/components/post-form-dialog.vue @@ -5,6 +5,7 @@ <mk-post-form ref="form" :reply="reply" :renote="renote" + :mention="mention" :initial-text="initialText" :instant="instant" @posted="onPosted" @@ -27,6 +28,10 @@ export default Vue.extend({ type: Object, required: false }, + mention: { + type: Object, + required: false + }, initialText: { type: String, required: false diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue index bd3154576b..282ecc387c 100644 --- a/src/client/app/mobile/views/components/post-form.vue +++ b/src/client/app/mobile/views/components/post-form.vue @@ -84,6 +84,10 @@ export default Vue.extend({ type: Object, required: false }, + mention: { + type: Object, + required: false + }, initialText: { type: String, required: false @@ -172,6 +176,11 @@ export default Vue.extend({ this.text = `@${this.reply.user.username}@${toASCII(this.reply.user.host)} `; } + if (this.mention) { + this.text = this.mention.host ? `@${this.mention.username}@${toASCII(this.mention.host)}` : `@${this.mention.username}`; + this.text += ' '; + } + if (this.reply && this.reply.text != null) { const ast = parse(this.reply.text); diff --git a/src/client/app/mobile/views/pages/user.vue b/src/client/app/mobile/views/pages/user.vue index 1a4f9f7cd7..fdfe4ce52f 100644 --- a/src/client/app/mobile/views/pages/user.vue +++ b/src/client/app/mobile/views/pages/user.vue @@ -55,6 +55,7 @@ <b>{{ user.followersCount | number }}</b> <i>{{ $t('followers') }}</i> </a> + <button @click="mention"><fa icon="at"/></button> </div> </div> </header> @@ -126,6 +127,10 @@ export default Vue.extend({ }); }, + mention() { + this.$post({ mention: this.user }); + }, + menu() { let menu = [{ icon: ['fas', 'list'], @@ -365,6 +370,9 @@ main > i font-size 14px + > button + color var(--text) + > nav position -webkit-sticky position sticky |