mirror of
https://git.notfire.cc/notfire/akkoma-fe.git
synced 2026-01-11 05:23:16 -08:00
add support for post edit notifs
This commit is contained in:
parent
2b6bba0fa1
commit
2e92e6399b
6 changed files with 31 additions and 2 deletions
|
|
@ -32,6 +32,7 @@
|
||||||
- all emojis go by their unicode names instead of the shortened ones, eg :100: is now :hundred_points:
|
- all emojis go by their unicode names instead of the shortened ones, eg :100: is now :hundred_points:
|
||||||
- this wasn't intentional, but keeping the old names would require way more work
|
- this wasn't intentional, but keeping the old names would require way more work
|
||||||
- script to get new emojis is included for future unicode versions
|
- script to get new emojis is included for future unicode versions
|
||||||
|
- add toggle for showing post edit notifications
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,14 @@
|
||||||
{{ ' ' }}
|
{{ ' ' }}
|
||||||
<small>{{ $t('notifications.bit_note') }}</small>
|
<small>{{ $t('notifications.bit_note') }}</small>
|
||||||
</span>
|
</span>
|
||||||
|
<span v-if="notification.type === 'update'">
|
||||||
|
<FAIcon
|
||||||
|
class="type-icon"
|
||||||
|
icon="pen"
|
||||||
|
/>
|
||||||
|
{{ ' ' }}
|
||||||
|
<small>{{ $t('notifications.edited') }}</small>
|
||||||
|
</span>
|
||||||
<span v-if="notification.type === 'move'">
|
<span v-if="notification.type === 'move'">
|
||||||
<FAIcon
|
<FAIcon
|
||||||
class="type-icon"
|
class="type-icon"
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,15 @@
|
||||||
:class="{ 'menu-checkbox-checked': filters.bites }"
|
:class="{ 'menu-checkbox-checked': filters.bites }"
|
||||||
/>{{ $t('settings.notification_visibility_bites') }}
|
/>{{ $t('settings.notification_visibility_bites') }}
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class="button-default dropdown-item"
|
||||||
|
@click="toggleNotificationFilter('edits')"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="menu-checkbox"
|
||||||
|
:class="{ 'menu-checkbox-checked': filters.edits }"
|
||||||
|
/>{{ $t('settings.notification_visibility_edits') }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,11 @@
|
||||||
{{ $t('settings.notification_visibility_bites') }}
|
{{ $t('settings.notification_visibility_bites') }}
|
||||||
</BooleanSetting>
|
</BooleanSetting>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<BooleanSetting path="notificationVisibility.edits">
|
||||||
|
{{ $t('settings.notification_visibility_edits') }}
|
||||||
|
</BooleanSetting>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -329,6 +329,7 @@
|
||||||
"bit": "bit you!",
|
"bit": "bit you!",
|
||||||
"bit_note": "bit your note!",
|
"bit_note": "bit your note!",
|
||||||
"broken_favorite": "Unknown post, searching for it…",
|
"broken_favorite": "Unknown post, searching for it…",
|
||||||
|
"edited": "edited a post",
|
||||||
"error": "Error fetching notifications: {0}",
|
"error": "Error fetching notifications: {0}",
|
||||||
"favorited_you": "favorited your post",
|
"favorited_you": "favorited your post",
|
||||||
"follow_request": "wants to follow you",
|
"follow_request": "wants to follow you",
|
||||||
|
|
@ -692,6 +693,7 @@
|
||||||
"notification_setting_sounds": "Sounds",
|
"notification_setting_sounds": "Sounds",
|
||||||
"notification_visibility": "Types of notifications to show",
|
"notification_visibility": "Types of notifications to show",
|
||||||
"notification_visibility_bites": "Bites",
|
"notification_visibility_bites": "Bites",
|
||||||
|
"notification_visibility_edits": "Post edits",
|
||||||
"notification_visibility_emoji_reactions": "Reactions",
|
"notification_visibility_emoji_reactions": "Reactions",
|
||||||
"notification_visibility_follows": "Follows",
|
"notification_visibility_follows": "Follows",
|
||||||
"notification_visibility_likes": "Favorites",
|
"notification_visibility_likes": "Favorites",
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,12 @@ export const visibleTypes = store => {
|
||||||
rootState.config.notificationVisibility.emojiReactions && 'pleroma:emoji_reaction',
|
rootState.config.notificationVisibility.emojiReactions && 'pleroma:emoji_reaction',
|
||||||
rootState.config.notificationVisibility.polls && 'poll',
|
rootState.config.notificationVisibility.polls && 'poll',
|
||||||
rootState.config.notificationVisibility.bites && 'bite',
|
rootState.config.notificationVisibility.bites && 'bite',
|
||||||
rootState.config.notificationVisibility.bites && 'bite_note'
|
rootState.config.notificationVisibility.bites && 'bite_note',
|
||||||
|
rootState.config.notificationVisibility.edits && 'update'
|
||||||
].filter(_ => _))
|
].filter(_ => _))
|
||||||
}
|
}
|
||||||
|
|
||||||
const statusNotifications = ['like', 'mention', 'repeat', 'pleroma:emoji_reaction', 'poll', 'bite_note']
|
const statusNotifications = ['like', 'mention', 'repeat', 'pleroma:emoji_reaction', 'poll', 'bite_note', 'update']
|
||||||
|
|
||||||
export const isStatusNotification = (type) => includes(statusNotifications, type)
|
export const isStatusNotification = (type) => includes(statusNotifications, type)
|
||||||
|
|
||||||
|
|
@ -110,6 +111,9 @@ export const prepareNotificationObject = (notification, i18n, store) => {
|
||||||
case 'bite_note':
|
case 'bite_note':
|
||||||
i18nString = 'bit_note'
|
i18nString = 'bit_note'
|
||||||
break
|
break
|
||||||
|
case 'update':
|
||||||
|
i18nString = 'edited'
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notification.type === 'pleroma:emoji_reaction') {
|
if (notification.type === 'pleroma:emoji_reaction') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue