diff options
| author | Henry Jameson <me@hjkos.com> | 2021-08-15 16:27:41 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2021-08-15 16:27:41 +0300 |
| commit | 17d2eed06a7c0c2a38129e36cca1e676c351abce (patch) | |
| tree | 2521a727071db6f7cfe4e76f7e227dfe69b750d6 /src/components/notification | |
| parent | b67db47c888dd45c49a49b82e7922c2bf40ed61c (diff) | |
| parent | f16658adfc897a3b07ed7f79d872acd2c3837cc8 (diff) | |
Merge branch 'better-still-emoji' into proper-attachments
* better-still-emoji:
fix tests
prevent infinite update loops
remove obsolete tests
removed useless code, review change, fixed bug with tall statuses
fixed mentions line again
remove old emoji added, everything emoji-bearing uses RichContent now
richcontent support in polls, user cards and user profiles
support richcontent in polls
fix tests, add performance test (skipped, doesn't assert anything), tweak max mentions count
made the code responsible for showing unwritten mentions actually work
remove new options for style and separate line, now groups all chained mentions on a mentionsline regardless of placement. fixes spacing
fix tests
Diffstat (limited to 'src/components/notification')
| -rw-r--r-- | src/components/notification/notification.js | 4 | ||||
| -rw-r--r-- | src/components/notification/notification.scss | 2 | ||||
| -rw-r--r-- | src/components/notification/notification.vue | 14 |
3 files changed, 13 insertions, 7 deletions
diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index 4aa9affd..398bb7a9 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -4,6 +4,7 @@ import Status from '../status/status.vue' import UserAvatar from '../user_avatar/user_avatar.vue' import UserCard from '../user_card/user_card.vue' import Timeago from '../timeago/timeago.vue' +import RichContent from 'src/components/rich_content/rich_content.jsx' import { isStatusNotification } from '../../services/notification_utils/notification_utils.js' import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' @@ -44,7 +45,8 @@ const Notification = { UserAvatar, UserCard, Timeago, - Status + Status, + RichContent }, methods: { toggleUserExpanded () { diff --git a/src/components/notification/notification.scss b/src/components/notification/notification.scss index f5905560..ec291547 100644 --- a/src/components/notification/notification.scss +++ b/src/components/notification/notification.scss @@ -2,6 +2,8 @@ // TODO Copypaste from Status, should unify it somehow .Notification { + --emoji-size: 14px; + &.-muted { padding: 0.25em 0.6em; height: 1.2em; diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 396ae0e1..eb02bed1 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -51,12 +51,14 @@ <span class="notification-details"> <div class="name-and-action"> <!-- eslint-disable vue/no-v-html --> - <bdi - v-if="!!notification.from_profile.name_html" - class="username" - :title="'@'+notification.from_profile.screen_name_ui" - v-html="notification.from_profile.name_html" - /> + <bdi v-if="!!notification.from_profile.name_html"> + <RichContent + class="username" + :title="'@'+notification.from_profile.screen_name_ui" + :html="notification.from_profile.name_html" + :emoji="notification.from_profile.emoji" + /> + </bdi> <!-- eslint-enable vue/no-v-html --> <span v-else |
