diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 638568466..d8f2ed9bf 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -360,6 +360,7 @@ common/views/components/nav.vue: feedback: "フィードバック" common/views/components/note-menu.vue: + mention: "メンション" detail: "詳細" copy-link: "リンクをコピー" favorite: "お気に入り" @@ -1365,6 +1366,7 @@ desktop/views/pages/user/user.header.vue: posts: "投稿" following: "フォロー" followers: "フォロワー" + mention: "メンション" is-bot: "このアカウントはBotです" years-old: "{age}歳" year: "年" @@ -1715,6 +1717,7 @@ deck/deck.user-column.vue: posts: "投稿" following: "フォロー" followers: "フォロワー" + mention: "メンション" images: "画像" activity: "アクティビティ" timeline: "タイムライン" diff --git a/src/client/app/common/views/components/note-menu.vue b/src/client/app/common/views/components/note-menu.vue index b8f34beb0..df52df26c 100644 --- a/src/client/app/common/views/components/note-menu.vue +++ b/src/client/app/common/views/components/note-menu.vue @@ -17,6 +17,13 @@ export default Vue.extend({ computed: { items(): any[] { return concat(intersperse([null], [ + [ + [{ + icon: 'at', + text: this.$t('mention'), + action: this.mention + }] + ], [ [{ icon: 'info-circle', @@ -66,6 +73,10 @@ export default Vue.extend({ }, methods: { + mention() { + this.$post({ mention: this.note.user }); + }, + detail() { this.$router.push(`/notes/${this.note.id}`); }, diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts index 1dd55910c..95bfe6ec1 100644 --- a/src/client/app/desktop/script.ts +++ b/src/client/app/desktop/script.ts @@ -70,6 +70,7 @@ init(async (launch) => { } else { const vm = this.$root.new(PostFormWindow, { reply: o.reply, + mention: o.mention, animation: o.animation == null ? true : o.animation }); if (o.cb) vm.$once('closed', o.cb); diff --git a/src/client/app/desktop/views/components/post-form-window.vue b/src/client/app/desktop/views/components/post-form-window.vue index cebf480bf..1ed88ec1d 100644 --- a/src/client/app/desktop/views/components/post-form-window.vue +++ b/src/client/app/desktop/views/components/post-form-window.vue @@ -12,6 +12,7 @@ { // 書きかけの投稿を復元 - if (!this.instant) { + if (!this.instant && !this.mention) { const draft = JSON.parse(localStorage.getItem('drafts') || '{}')[this.draftId]; if (draft) { this.text = draft.data.text; diff --git a/src/client/app/desktop/views/pages/deck/deck.user-column.vue b/src/client/app/desktop/views/pages/deck/deck.user-column.vue index 9281d63cf..f87b828cf 100644 --- a/src/client/app/desktop/views/pages/deck/deck.user-column.vue +++ b/src/client/app/desktop/views/pages/deck/deck.user-column.vue @@ -49,6 +49,9 @@ {{ user.followersCount | number }} {{ $t('followers') }} +
+ +
@@ -307,6 +310,10 @@ export default Vue.extend({ return promise; }, + mention() { + this.$post({ mention: this.user }); + }, + menu() { let menu = [{ icon: 'list', @@ -454,7 +461,7 @@ export default Vue.extend({ > .counts display grid - grid-template-columns 1fr 1fr 1fr + grid-template-columns 2fr 2fr 2fr 1fr margin-top 8px border-top solid 1px var(--faceDivider) @@ -471,6 +478,9 @@ export default Vue.extend({ font-size 80% opacity 0.7 + > .mention + display flex + > * > p.caption margin 0 diff --git a/src/client/app/desktop/views/pages/user/user.header.vue b/src/client/app/desktop/views/pages/user/user.header.vue index 685eff732..1bc035eea 100644 --- a/src/client/app/desktop/views/pages/user/user.header.vue +++ b/src/client/app/desktop/views/pages/user/user.header.vue @@ -36,6 +36,7 @@ {{ user.notesCount | number }}{{ $t('posts') }} {{ user.followingCount | number }}{{ $t('following') }} {{ user.followersCount | number }}{{ $t('followers') }} +
@@ -77,6 +78,9 @@ export default Vue.extend({ } }, methods: { + mention() { + this.$post({ mention: this.user }); + }, onScroll() { const banner = this.$refs.banner as any; diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts index e0ccbad79..52b0d9bbb 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 15b36db94..616623cda 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 @@ {{ user.followersCount | number }} {{ $t('followers') }} + @@ -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