diff options
| author | kPherox <admin@mail.kr-kp.com> | 2019-12-11 00:00:10 +0900 |
|---|---|---|
| committer | kPherox <admin@mail.kr-kp.com> | 2019-12-11 00:00:45 +0900 |
| commit | 6af870cd9069a8fc45b7684d264656dad0cf4a70 (patch) | |
| tree | 9641adca5f063e1673c9f96282ea705e4d3338da | |
| parent | 2bc63720a5f9da740fa8082d587b6cfdd0c652ee (diff) | |
Add view for moves notifications
| -rw-r--r-- | src/components/notification/notification.vue | 14 | ||||
| -rw-r--r-- | src/components/notifications/notifications.scss | 7 | ||||
| -rw-r--r-- | src/components/settings/settings.vue | 5 | ||||
| -rw-r--r-- | src/i18n/en.json | 1 | ||||
| -rw-r--r-- | src/modules/config.js | 3 | ||||
| -rw-r--r-- | src/modules/statuses.js | 3 | ||||
| -rw-r--r-- | src/services/notification_utils/notification_utils.js | 3 | ||||
| -rw-r--r-- | src/services/push/push.js | 3 | ||||
| -rwxr-xr-x | static/fontello.json | 6 |
9 files changed, 39 insertions, 6 deletions
diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 1f192c77..cf4d8072 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -74,9 +74,13 @@ <i class="fa icon-user-plus lit" /> <small>{{ $t('notifications.followed_you') }}</small> </span> + <span v-if="notification.type === 'move'"> + <i class="fa icon-arrow-curved lit" /> + <small>{{ $t('notifications.moved_to') }}</small> + </span> </div> <div - v-if="notification.type === 'follow'" + v-if="notification.type === 'follow' || notification.type === 'move'" class="timeago" > <span class="faint"> @@ -115,6 +119,14 @@ @{{ notification.from_profile.screen_name }} </router-link> </div> + <div + v-else-if="notification.type === 'move'" + class="move-text" + > + <router-link :to="userProfileLink"> + @{{ notification.target.screen_name }} + </router-link> + </div> <template v-else> <status class="faint" diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index 71876b14..148ac7f2 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -76,7 +76,7 @@ } } - .follow-text { + .follow-text, .move-text { padding: 0.5em 0; } @@ -151,6 +151,11 @@ color: var(--cOrange, $fallback--cOrange); } + .icon-arrow-curved.lit { + color: $fallback--cBlue; + color: var(--cBlue, $fallback--cBlue); + } + .status-content { margin: 0; max-height: 300px; diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index c4021137..31329e82 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -314,6 +314,11 @@ {{ $t('settings.notification_visibility_mentions') }} </Checkbox> </li> + <li> + <Checkbox v-model="notificationVisibility.moves"> + {{ $t('settings.notification_visibility_moves') }} + </Checkbox> + </li> </ul> </div> <div> diff --git a/src/i18n/en.json b/src/i18n/en.json index f46d5b3d..dcd2f3d7 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -312,6 +312,7 @@ "notification_visibility_likes": "Likes", "notification_visibility_mentions": "Mentions", "notification_visibility_repeats": "Repeats", + "notification_visibility_moves": "Moves", "no_rich_text_description": "Strip rich text formatting from all posts", "no_blocks": "No blocks", "no_mutes": "No mutes", diff --git a/src/modules/config.js b/src/modules/config.js index 329b4091..cc47c848 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -28,7 +28,8 @@ export const defaultState = { follows: true, mentions: true, likes: true, - repeats: true + repeats: true, + moves: true }, webPushNotifications: false, muteWords: [], diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 3cf74a43..420b3183 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -66,7 +66,8 @@ const visibleNotificationTypes = (rootState) => { rootState.config.notificationVisibility.likes && 'like', rootState.config.notificationVisibility.mentions && 'mention', rootState.config.notificationVisibility.repeats && 'repeat', - rootState.config.notificationVisibility.follows && 'follow' + rootState.config.notificationVisibility.follows && 'follow', + rootState.config.notificationVisibility.moves && 'move' ].filter(_ => _) } diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js index 7021adbd..b08514da 100644 --- a/src/services/notification_utils/notification_utils.js +++ b/src/services/notification_utils/notification_utils.js @@ -6,7 +6,8 @@ export const visibleTypes = store => ([ store.state.config.notificationVisibility.likes && 'like', store.state.config.notificationVisibility.mentions && 'mention', store.state.config.notificationVisibility.repeats && 'repeat', - store.state.config.notificationVisibility.follows && 'follow' + store.state.config.notificationVisibility.follows && 'follow', + store.state.config.notificationVisibility.moves && 'move' ].filter(_ => _)) const sortById = (a, b) => { diff --git a/src/services/push/push.js b/src/services/push/push.js index 1b189a29..5836fc26 100644 --- a/src/services/push/push.js +++ b/src/services/push/push.js @@ -65,7 +65,8 @@ function sendSubscriptionToBackEnd (subscription, token, notificationVisibility) follow: notificationVisibility.follows, favourite: notificationVisibility.likes, mention: notificationVisibility.mentions, - reblog: notificationVisibility.repeats + reblog: notificationVisibility.repeats, + move: notificationVisibility.moves } } }) diff --git a/static/fontello.json b/static/fontello.json index c0cf1727..642381a1 100755 --- a/static/fontello.json +++ b/static/fontello.json @@ -303,6 +303,12 @@ "css": "gauge", "code": 61668, "src": "fontawesome" + }, + { + "uid": "f3ebd6751c15a280af5cc5f4a764187d", + "css": "arrow-curved", + "code": 59421, + "src": "iconic" } ] }
\ No newline at end of file |
