diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2018-12-26 05:15:02 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2018-12-26 05:15:02 +0900 |
| commit | c81eb49f9e07d889678f7241c85a5b51dac09a26 (patch) | |
| tree | 87aca25275e2504a6beb094689c7296dcb92afc1 /src | |
| parent | Fix typo (diff) | |
| download | misskey-c81eb49f9e07d889678f7241c85a5b51dac09a26.tar.gz misskey-c81eb49f9e07d889678f7241c85a5b51dac09a26.tar.bz2 misskey-c81eb49f9e07d889678f7241c85a5b51dac09a26.zip | |
Supports emoji in notifications (#3751)
Diffstat (limited to 'src')
3 files changed, 34 insertions, 12 deletions
diff --git a/src/client/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue index 07ebc5586a..ccd82a92ed 100644 --- a/src/client/app/desktop/views/components/notifications.vue +++ b/src/client/app/desktop/views/components/notifications.vue @@ -23,7 +23,9 @@ </router-link> </p> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> - <fa icon="quote-left"/>{{ getNoteSummary(notification.note) }}<fa icon="quote-right"/> + <fa icon="quote-left"/> + <misskey-flavored-markdown :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <fa icon="quote-right"/> </router-link> </div> </template> @@ -37,7 +39,9 @@ </router-link> </p> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note.renote)"> - <fa icon="quote-left"/>{{ getNoteSummary(notification.note.renote) }}<fa icon="quote-right"/> + <fa icon="quote-left"/> + <misskey-flavored-markdown :text="getNoteSummary(notification.note.renote)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.renote.emojis"/> + <fa icon="quote-right"/> </router-link> </div> </template> @@ -50,7 +54,9 @@ <mk-user-name :user="notification.note.user"/> </router-link> </p> - <router-link class="note-preview" :to="notification.note | notePage" :title="getNoteSummary(notification.note)">{{ getNoteSummary(notification.note) }}</router-link> + <router-link class="note-preview" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> + <misskey-flavored-markdown :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + </router-link> </div> </template> @@ -84,7 +90,9 @@ <mk-user-name :user="notification.note.user"/> </router-link> </p> - <router-link class="note-preview" :to="notification.note | notePage" :title="getNoteSummary(notification.note)">{{ getNoteSummary(notification.note) }}</router-link> + <router-link class="note-preview" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> + <misskey-flavored-markdown :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + </router-link> </div> </template> @@ -96,7 +104,9 @@ <mk-user-name :user="notification.note.user"/> </router-link> </p> - <a class="note-preview" :href="notification.note | notePage" :title="getNoteSummary(notification.note)">{{ getNoteSummary(notification.note) }}</a> + <a class="note-preview" :href="notification.note | notePage" :title="getNoteSummary(notification.note)"> + <misskey-flavored-markdown :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + </a> </div> </template> @@ -107,7 +117,9 @@ <mk-user-name :user="notification.user"/> </a></p> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> - <fa icon="quote-left"/>{{ getNoteSummary(notification.note) }}<fa icon="quote-right"/> + <fa icon="quote-left"/> + <misskey-flavored-markdown :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <fa icon="quote-right"/> </router-link> </div> </template> diff --git a/src/client/app/desktop/views/pages/deck/deck.notification.vue b/src/client/app/desktop/views/pages/deck/deck.notification.vue index 60cc490804..70b54eac6c 100644 --- a/src/client/app/desktop/views/pages/deck/deck.notification.vue +++ b/src/client/app/desktop/views/pages/deck/deck.notification.vue @@ -11,7 +11,8 @@ <mk-time :time="notification.createdAt"/> </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> - <fa icon="quote-left"/>{{ getNoteSummary(notification.note) }} + <fa icon="quote-left"/> + <misskey-flavored-markdown :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> <fa icon="quote-right"/> </router-link> </div> @@ -28,7 +29,9 @@ <mk-time :time="notification.createdAt"/> </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note.renote)"> - <fa icon="quote-left"/>{{ getNoteSummary(notification.note.renote) }}<fa icon="quote-right"/> + <fa icon="quote-left"/> + <misskey-flavored-markdown :text="getNoteSummary(notification.note.renote)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.renote.emojis"/> + <fa icon="quote-right"/> </router-link> </div> </div> @@ -70,7 +73,9 @@ <mk-time :time="notification.createdAt"/> </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> - <fa icon="quote-left"/>{{ getNoteSummary(notification.note) }}<fa icon="quote-right"/> + <fa icon="quote-left"/> + <misskey-flavored-markdown :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <fa icon="quote-right"/> </router-link> </div> </div> diff --git a/src/client/app/mobile/views/components/notification.vue b/src/client/app/mobile/views/components/notification.vue index a0310abe8e..3b9c6577d4 100644 --- a/src/client/app/mobile/views/components/notification.vue +++ b/src/client/app/mobile/views/components/notification.vue @@ -9,7 +9,8 @@ <mk-time :time="notification.createdAt"/> </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> - <fa icon="quote-left"/>{{ getNoteSummary(notification.note) }} + <fa icon="quote-left"/> + <misskey-flavored-markdown :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> <fa icon="quote-right"/> </router-link> </div> @@ -24,7 +25,9 @@ <mk-time :time="notification.createdAt"/> </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note.renote)"> - <fa icon="quote-left"/>{{ getNoteSummary(notification.note.renote) }}<fa icon="quote-right"/> + <fa icon="quote-left"/> + <misskey-flavored-markdown :text="getNoteSummary(notification.note.renote)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.renote.emojis"/> + <fa icon="quote-right"/> </router-link> </div> </div> @@ -60,7 +63,9 @@ <mk-time :time="notification.createdAt"/> </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> - <fa icon="quote-left"/>{{ getNoteSummary(notification.note) }}<fa icon="quote-right"/> + <fa icon="quote-left"/> + <misskey-flavored-markdown :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <fa icon="quote-right"/> </router-link> </div> </div> |