aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/App.scss9
-rw-r--r--src/components/account_actions/account_actions.js2
-rw-r--r--src/components/chat/chat.js12
-rw-r--r--src/components/interface_language_switcher/interface_language_switcher.vue38
-rw-r--r--src/components/notification/notification.vue8
-rw-r--r--src/components/notifications/notification_filters.vue9
-rw-r--r--src/components/notifications/notifications.vue2
-rw-r--r--src/components/registration/registration.js14
-rw-r--r--src/components/registration/registration.vue12
-rw-r--r--src/components/settings_modal/tabs/general_tab.js6
-rw-r--r--src/components/settings_modal/tabs/general_tab.vue6
-rw-r--r--src/components/settings_modal/tabs/notifications_tab.vue5
-rw-r--r--src/components/settings_modal/tabs/profile_tab.js46
-rw-r--r--src/components/settings_modal/tabs/profile_tab.vue7
-rw-r--r--src/components/status_body/status_body.scss2
-rw-r--r--src/components/timeline/timeline.js5
-rw-r--r--src/components/timeline/timeline_quick_settings.vue1
-rw-r--r--src/components/timeline_menu/timeline_menu.vue4
-rw-r--r--src/i18n/en.json8
-rw-r--r--src/modules/config.js8
-rw-r--r--src/modules/serverSideConfig.js5
-rw-r--r--src/services/api/api.service.js11
-rw-r--r--src/services/locale/locale.service.js27
-rw-r--r--src/services/notification_utils/notification_utils.js8
24 files changed, 195 insertions, 60 deletions
diff --git a/src/App.scss b/src/App.scss
index d62d9ac2..5cd0b96e 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -301,6 +301,15 @@ nav {
margin-bottom: 0;
}
+ .panel-heading,
+ .panel-heading::after,
+ .panel-heading::before,
+ .panel,
+ .panel::after {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ }
+
.underlay,
#sidebar,
#notifs-column {
diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js
index e53c4f77..99762562 100644
--- a/src/components/account_actions/account_actions.js
+++ b/src/components/account_actions/account_actions.js
@@ -40,7 +40,7 @@ const AccountActions = {
openChat () {
this.$router.push({
name: 'chat',
- params: { recipient_id: this.user.id }
+ params: { username: this.$store.state.users.currentUser.screen_name, recipient_id: this.user.id }
})
}
},
diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js
index 02f3a2f2..9f6e64e3 100644
--- a/src/components/chat/chat.js
+++ b/src/components/chat/chat.js
@@ -43,6 +43,7 @@ const Chat = {
},
created () {
this.startFetching()
+ window.addEventListener('resize', this.handleResize)
},
mounted () {
window.addEventListener('scroll', this.handleScroll)
@@ -132,7 +133,7 @@ const Chat = {
}
})
},
- // Preserves the scroll position when OSK appears or the posting form changes its height.
+ // "Sticks" scroll to bottom instead of top, helps with OSK resizing the viewport
handleResize (opts = {}) {
const { expand = false, delayed = false } = opts
@@ -144,15 +145,14 @@ const Chat = {
}
this.$nextTick(() => {
- const { scrollHeight = undefined } = this.lastScrollPosition
- this.lastScrollPosition = getScrollPosition()
-
- const diff = this.lastScrollPosition.scrollHeight - scrollHeight
- if (diff > 0 || (!this.bottomedOut() && expand)) {
+ const { offsetHeight = undefined } = getScrollPosition()
+ const diff = this.lastScrollPosition.offsetHeight - offsetHeight
+ if (diff !== 0 || (!this.bottomedOut() && expand)) {
this.$nextTick(() => {
window.scrollTo({ top: window.scrollY + diff })
})
}
+ this.lastScrollPosition = getScrollPosition()
})
},
scrollDown (options = {}) {
diff --git a/src/components/interface_language_switcher/interface_language_switcher.vue b/src/components/interface_language_switcher/interface_language_switcher.vue
index 6d1f83c4..7ad1fe2e 100644
--- a/src/components/interface_language_switcher/interface_language_switcher.vue
+++ b/src/components/interface_language_switcher/interface_language_switcher.vue
@@ -1,12 +1,12 @@
<template>
<div>
<label for="interface-language-switcher">
- {{ $t('settings.interfaceLanguage') }}
+ {{ promptText }}
</label>
{{ ' ' }}
<Select
id="interface-language-switcher"
- v-model="language"
+ v-model="controlledLanguage"
>
<option
v-for="lang in languages"
@@ -20,39 +20,43 @@
</template>
<script>
-import languagesObject from '../../i18n/messages'
import localeService from '../../services/locale/locale.service.js'
-import ISO6391 from 'iso-639-1'
-import _ from 'lodash'
import Select from '../select/select.vue'
export default {
components: {
Select
},
+ props: {
+ promptText: {
+ type: String,
+ required: true
+ },
+ language: {
+ type: String,
+ required: true
+ },
+ setLanguage: {
+ type: Function,
+ required: true
+ }
+ },
computed: {
languages () {
- return _.map(languagesObject.languages, (code) => ({ code: code, name: this.getLanguageName(code) })).sort((a, b) => a.name.localeCompare(b.name))
+ return localeService.languages
},
- language: {
- get: function () { return this.$store.getters.mergedConfig.interfaceLanguage },
+ controlledLanguage: {
+ get: function () { return this.language },
set: function (val) {
- this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val })
+ this.setLanguage(val)
}
}
},
methods: {
getLanguageName (code) {
- const specialLanguageNames = {
- 'ja_easy': 'やさしいにほんご',
- 'zh': '简体中文',
- 'zh_Hant': '繁體中文'
- }
- const languageName = specialLanguageNames[code] || ISO6391.getNativeName(code)
- const browserLocale = localeService.internalToBrowserLocale(code)
- return languageName.charAt(0).toLocaleUpperCase(browserLocale) + languageName.slice(1)
+ return localeService.getLanguageName(code)
}
}
}
diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index 9ecb034f..7d3d0c69 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -120,6 +120,14 @@
</i18n-t>
</small>
</span>
+ <span v-if="notification.type === 'poll'">
+ <FAIcon
+ class="type-icon"
+ icon="poll-h"
+ />
+ {{ ' ' }}
+ <small>{{ $t('notifications.poll_ended') }}</small>
+ </span>
</div>
<div
v-if="isStatusNotification"
diff --git a/src/components/notifications/notification_filters.vue b/src/components/notifications/notification_filters.vue
index d0b11a13..00a531b3 100644
--- a/src/components/notifications/notification_filters.vue
+++ b/src/components/notifications/notification_filters.vue
@@ -61,6 +61,15 @@
:class="{ 'menu-checkbox-checked': filters.moves }"
/>{{ $t('settings.notification_visibility_moves') }}
</button>
+ <button
+ class="button-default dropdown-item"
+ @click="toggleNotificationFilter('polls')"
+ >
+ <span
+ class="menu-checkbox"
+ :class="{ 'menu-checkbox-checked': filters.polls }"
+ />{{ $t('settings.notification_visibility_polls') }}
+ </button>
</div>
</template>
<template v-slot:trigger>
diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue
index d5b2d1d5..794ef51d 100644
--- a/src/components/notifications/notifications.vue
+++ b/src/components/notifications/notifications.vue
@@ -30,7 +30,7 @@
v-for="notification in notificationsToDisplay"
:key="notification.id"
class="notification"
- :class="{&quot;unseen&quot;: !minimalMode && !notification.seen}"
+ :class="{unseen: !minimalMode && !notification.seen}"
>
<div class="notification-overlay" />
<notification :notification="notification" />
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js
index a3ef0f04..6eb316d0 100644
--- a/src/components/registration/registration.js
+++ b/src/components/registration/registration.js
@@ -1,6 +1,8 @@
import useVuelidate from '@vuelidate/core'
import { required, requiredIf, sameAs } from '@vuelidate/validators'
import { mapActions, mapState } from 'vuex'
+import InterfaceLanguageSwitcher from '../interface_language_switcher/interface_language_switcher.vue'
+import localeService from '../../services/locale/locale.service.js'
const registration = {
setup () { return { v$: useVuelidate() } },
@@ -11,10 +13,14 @@ const registration = {
username: '',
password: '',
confirm: '',
- reason: ''
+ reason: '',
+ language: ''
},
captcha: {}
}),
+ components: {
+ InterfaceLanguageSwitcher
+ },
validations () {
return {
user: {
@@ -26,7 +32,8 @@ const registration = {
required,
sameAs: sameAs(this.user.password)
},
- reason: { required: requiredIf(() => this.accountApprovalRequired) }
+ reason: { required: requiredIf(() => this.accountApprovalRequired) },
+ language: {}
}
}
},
@@ -64,6 +71,9 @@ const registration = {
this.user.captcha_solution = this.captcha.solution
this.user.captcha_token = this.captcha.token
this.user.captcha_answer_data = this.captcha.answer_data
+ if (this.user.language) {
+ this.user.language = localeService.internalToBackendLocale(this.user.language)
+ }
this.v$.$touch()
diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue
index c3fee6f8..cc655c0b 100644
--- a/src/components/registration/registration.vue
+++ b/src/components/registration/registration.vue
@@ -163,6 +163,18 @@
</div>
<div
+ class="form-group"
+ :class="{ 'form-group--error': v$.user.language.$error }"
+ >
+ <interface-language-switcher
+ for="email-language"
+ :prompt-text="$t('registration.email_language')"
+ :language="v$.user.language.$model"
+ :set-language="val => v$.user.language.$model = val"
+ />
+ </div>
+
+ <div
v-if="accountApprovalRequired"
class="form-group"
>
diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js
index c97b3410..1e11b9e0 100644
--- a/src/components/settings_modal/tabs/general_tab.js
+++ b/src/components/settings_modal/tabs/general_tab.js
@@ -77,6 +77,12 @@ const GeneralTab = {
!this.$store.state.users.currentUser.background_image
},
instanceShoutboxPresent () { return this.$store.state.instance.shoutAvailable },
+ language: {
+ get: function () { return this.$store.getters.mergedConfig.interfaceLanguage },
+ set: function (val) {
+ this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val })
+ }
+ },
...SharedComputedObject()
},
methods: {
diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue
index 79c69449..1fe51b6d 100644
--- a/src/components/settings_modal/tabs/general_tab.vue
+++ b/src/components/settings_modal/tabs/general_tab.vue
@@ -4,7 +4,11 @@
<h2>{{ $t('settings.interface') }}</h2>
<ul class="setting-list">
<li>
- <interface-language-switcher />
+ <interface-language-switcher
+ :prompt-text="$t('settings.interfaceLanguage')"
+ :language="language"
+ :set-language="val => language = val"
+ />
</li>
<li v-if="instanceSpecificPanelPresent">
<BooleanSetting path="hideISP">
diff --git a/src/components/settings_modal/tabs/notifications_tab.vue b/src/components/settings_modal/tabs/notifications_tab.vue
index 86be6095..dd3806ed 100644
--- a/src/components/settings_modal/tabs/notifications_tab.vue
+++ b/src/components/settings_modal/tabs/notifications_tab.vue
@@ -41,6 +41,11 @@
{{ $t('settings.notification_visibility_emoji_reactions') }}
</BooleanSetting>
</li>
+ <li>
+ <BooleanSetting path="notificationVisibility.polls">
+ {{ $t('settings.notification_visibility_polls') }}
+ </BooleanSetting>
+ </li>
</ul>
</li>
</ul>
diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js
index bee8a7bb..8781bb91 100644
--- a/src/components/settings_modal/tabs/profile_tab.js
+++ b/src/components/settings_modal/tabs/profile_tab.js
@@ -8,8 +8,10 @@ import EmojiInput from 'src/components/emoji_input/emoji_input.vue'
import suggestor from 'src/components/emoji_input/suggestor.js'
import Autosuggest from 'src/components/autosuggest/autosuggest.vue'
import Checkbox from 'src/components/checkbox/checkbox.vue'
+import InterfaceLanguageSwitcher from 'src/components/interface_language_switcher/interface_language_switcher.vue'
import BooleanSetting from '../helpers/boolean_setting.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
+import localeService from 'src/services/locale/locale.service.js'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
@@ -40,7 +42,8 @@ const ProfileTab = {
banner: null,
bannerPreview: null,
background: null,
- backgroundPreview: null
+ backgroundPreview: null,
+ emailLanguage: this.$store.state.users.currentUser.language || ''
}
},
components: {
@@ -50,7 +53,8 @@ const ProfileTab = {
Autosuggest,
ProgressButton,
Checkbox,
- BooleanSetting
+ BooleanSetting,
+ InterfaceLanguageSwitcher
},
computed: {
user () {
@@ -111,19 +115,25 @@ const ProfileTab = {
},
methods: {
updateProfile () {
+ const params = {
+ note: this.newBio,
+ locked: this.newLocked,
+ // Backend notation.
+ /* eslint-disable camelcase */
+ display_name: this.newName,
+ fields_attributes: this.newFields.filter(el => el != null),
+ bot: this.bot,
+ show_role: this.showRole
+ /* eslint-enable camelcase */
+ }
+
+ if (this.emailLanguage) {
+ params.language = localeService.internalToBackendLocale(this.emailLanguage)
+ }
+
this.$store.state.api.backendInteractor
- .updateProfile({
- params: {
- note: this.newBio,
- locked: this.newLocked,
- // Backend notation.
- /* eslint-disable camelcase */
- display_name: this.newName,
- fields_attributes: this.newFields.filter(el => el != null),
- bot: this.bot,
- show_role: this.showRole
- /* eslint-enable camelcase */
- } }).then((user) => {
+ .updateProfile({ params })
+ .then((user) => {
this.newFields.splice(user.fields.length)
merge(this.newFields, user.fields)
this.$store.commit('addNewUsers', [user])
@@ -193,8 +203,8 @@ const ProfileTab = {
submitAvatar (cropper, file) {
const that = this
return new Promise((resolve, reject) => {
- function updateAvatar (avatar) {
- that.$store.state.api.backendInteractor.updateProfileImages({ avatar })
+ function updateAvatar (avatar, avatarName) {
+ that.$store.state.api.backendInteractor.updateProfileImages({ avatar, avatarName })
.then((user) => {
that.$store.commit('addNewUsers', [user])
that.$store.commit('setCurrentUser', user)
@@ -207,9 +217,9 @@ const ProfileTab = {
}
if (cropper) {
- cropper.getCroppedCanvas().toBlob(updateAvatar, file.type)
+ cropper.getCroppedCanvas().toBlob((data) => updateAvatar(data, file.name), file.type)
} else {
- updateAvatar(file)
+ updateAvatar(file, file.name)
}
})
},
diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue
index 881016fb..4cd93772 100644
--- a/src/components/settings_modal/tabs/profile_tab.vue
+++ b/src/components/settings_modal/tabs/profile_tab.vue
@@ -89,6 +89,13 @@
{{ $t('settings.bot') }}
</Checkbox>
</p>
+ <p>
+ <interface-language-switcher
+ :prompt-text="$t('settings.email_language')"
+ :language="emailLanguage"
+ :set-language="val => emailLanguage = val"
+ />
+ </p>
<button
:disabled="newName && newName.length === 0"
class="btn button-default"
diff --git a/src/components/status_body/status_body.scss b/src/components/status_body/status_body.scss
index 1c1ecea2..039d4c7f 100644
--- a/src/components/status_body/status_body.scss
+++ b/src/components/status_body/status_body.scss
@@ -33,7 +33,7 @@
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
- height: 1.4;
+ height: 1.4em;
}
}
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
index 94f0e916..c575e876 100644
--- a/src/components/timeline/timeline.js
+++ b/src/components/timeline/timeline.js
@@ -77,8 +77,9 @@ const Timeline = {
statusesToDisplay () {
const amount = this.timeline.visibleStatuses.length
const statusesPerSide = Math.ceil(Math.max(3, window.innerHeight / 80))
- const min = Math.max(0, this.virtualScrollIndex - statusesPerSide)
- const max = Math.min(amount, this.virtualScrollIndex + statusesPerSide)
+ const nonPinnedIndex = this.virtualScrollIndex - this.filteredPinnedStatusIds.length
+ const min = Math.max(0, nonPinnedIndex - statusesPerSide)
+ const max = Math.min(amount, nonPinnedIndex + statusesPerSide)
return this.timeline.visibleStatuses.slice(min, max).map(_ => _.id)
},
virtualScrollingEnabled () {
diff --git a/src/components/timeline/timeline_quick_settings.vue b/src/components/timeline/timeline_quick_settings.vue
index 5efc5d7c..98fab926 100644
--- a/src/components/timeline/timeline_quick_settings.vue
+++ b/src/components/timeline/timeline_quick_settings.vue
@@ -93,7 +93,6 @@
<style lang="scss">
.TimelineQuickSettings {
- align-self: stretch;
> button {
line-height: 100%;
diff --git a/src/components/timeline_menu/timeline_menu.vue b/src/components/timeline_menu/timeline_menu.vue
index 8f14093f..61119482 100644
--- a/src/components/timeline_menu/timeline_menu.vue
+++ b/src/components/timeline_menu/timeline_menu.vue
@@ -43,6 +43,10 @@
min-width: 0;
width: 24rem;
+ .popover-trigger-button {
+ vertical-align: bottom;
+ }
+
.timeline-menu-popover-wrap {
overflow: hidden;
// Match panel heading padding to line up menu with bottom of heading
diff --git a/src/i18n/en.json b/src/i18n/en.json
index d04df325..0cfda804 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -160,7 +160,8 @@
"repeated_you": "repeated your status",
"no_more_notifications": "No more notifications",
"migrated_to": "migrated to",
- "reacted_with": "reacted with {0}"
+ "reacted_with": "reacted with {0}",
+ "poll_ended": "poll has ended"
},
"polls": {
"add_poll": "Add poll",
@@ -254,7 +255,8 @@
"password_required": "cannot be left blank",
"password_confirmation_required": "cannot be left blank",
"password_confirmation_match": "should be the same as password"
- }
+ },
+ "email_language": "In which language do you want to receive emails from the server?"
},
"remote_user_resolver": {
"remote_user_resolver": "Remote user resolver",
@@ -303,6 +305,7 @@
"avatarRadius": "Avatars",
"background": "Background",
"bio": "Bio",
+ "email_language": "Language for receiving emails from the server",
"block_export": "Block export",
"block_export_button": "Export your blocks to a csv file",
"block_import": "Block import",
@@ -427,6 +430,7 @@
"notification_visibility_repeats": "Repeats",
"notification_visibility_moves": "User Migrates",
"notification_visibility_emoji_reactions": "Reactions",
+ "notification_visibility_polls": "Ends of polls you voted in",
"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 c0d5c3c2..6ae2e754 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -1,5 +1,9 @@
+import Cookies from 'js-cookie'
import { setPreset, applyTheme } from '../services/style_setter/style_setter.js'
import messages from '../i18n/messages'
+import localeService from '../services/locale/locale.service.js'
+
+const BACKEND_LANGUAGE_COOKIE_NAME = 'userLanguage'
const browserLocale = (window.navigator.language || 'en').split('-')[0]
@@ -55,7 +59,8 @@ export const defaultState = {
moves: true,
emojiReactions: true,
followRequest: true,
- chatMention: true
+ chatMention: true,
+ polls: true
},
webPushNotifications: false,
muteWords: [],
@@ -165,6 +170,7 @@ const config = {
break
case 'interfaceLanguage':
messages.setLanguage(this.getters.i18n, value)
+ Cookies.set(BACKEND_LANGUAGE_COOKIE_NAME, localeService.internalToBackendLocale(value))
break
case 'thirdColumnMode':
dispatch('setLayoutWidth', undefined)
diff --git a/src/modules/serverSideConfig.js b/src/modules/serverSideConfig.js
index 5c1baedb..4b73af26 100644
--- a/src/modules/serverSideConfig.js
+++ b/src/modules/serverSideConfig.js
@@ -55,7 +55,10 @@ export const settingsMap = {
get: 'pleroma.allow_following_move',
set: 'allow_following_move'
},
- 'discoverable': 'source.discoverable',
+ 'discoverable': {
+ get: 'source.pleroma.discoverable',
+ set: 'discoverable'
+ },
'hideFavorites': {
get: 'pleroma.hide_favorites',
set: 'hide_favorites'
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 436b8b0a..ca84ba2c 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -151,9 +151,15 @@ const updateNotificationSettings = ({ credentials, settings }) => {
}).then((data) => data.json())
}
-const updateProfileImages = ({ credentials, avatar = null, banner = null, background = null }) => {
+const updateProfileImages = ({ credentials, avatar = null, avatarName = null, banner = null, background = null }) => {
const form = new FormData()
- if (avatar !== null) form.append('avatar', avatar)
+ if (avatar !== null) {
+ if (avatarName !== null) {
+ form.append('avatar', avatar, avatarName)
+ } else {
+ form.append('avatar', avatar)
+ }
+ }
if (banner !== null) form.append('header', banner)
if (background !== null) form.append('pleroma_background_image', background)
return fetch(MASTODON_PROFILE_UPDATE_URL, {
@@ -191,6 +197,7 @@ const updateProfile = ({ credentials, params }) => {
// homepage
// location
// token
+// language
const register = ({ params, credentials }) => {
const { nickname, ...rest } = params
return fetch(MASTODON_REGISTRATION_URL, {
diff --git a/src/services/locale/locale.service.js b/src/services/locale/locale.service.js
index 5be99d81..8cef2522 100644
--- a/src/services/locale/locale.service.js
+++ b/src/services/locale/locale.service.js
@@ -1,12 +1,35 @@
+import languagesObject from '../../i18n/messages'
+import ISO6391 from 'iso-639-1'
+import _ from 'lodash'
+
const specialLanguageCodes = {
'ja_easy': 'ja',
- 'zh_Hant': 'zh-HANT'
+ 'zh_Hant': 'zh-HANT',
+ 'zh': 'zh-Hans'
}
const internalToBrowserLocale = code => specialLanguageCodes[code] || code
+const internalToBackendLocale = code => internalToBrowserLocale(code).replace('_', '-')
+
+const getLanguageName = (code) => {
+ const specialLanguageNames = {
+ 'ja_easy': 'やさしいにほんご',
+ 'zh': '简体中文',
+ 'zh_Hant': '繁體中文'
+ }
+ const languageName = specialLanguageNames[code] || ISO6391.getNativeName(code)
+ const browserLocale = internalToBrowserLocale(code)
+ return languageName.charAt(0).toLocaleUpperCase(browserLocale) + languageName.slice(1)
+}
+
+const languages = _.map(languagesObject.languages, (code) => ({ code: code, name: getLanguageName(code) })).sort((a, b) => a.name.localeCompare(b.name))
+
const localeService = {
- internalToBrowserLocale
+ internalToBrowserLocale,
+ internalToBackendLocale,
+ languages,
+ getLanguageName
}
export default localeService
diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js
index 6fef1022..a221b022 100644
--- a/src/services/notification_utils/notification_utils.js
+++ b/src/services/notification_utils/notification_utils.js
@@ -14,11 +14,12 @@ export const visibleTypes = store => {
rootState.config.notificationVisibility.follows && 'follow',
rootState.config.notificationVisibility.followRequest && 'follow_request',
rootState.config.notificationVisibility.moves && 'move',
- rootState.config.notificationVisibility.emojiReactions && 'pleroma:emoji_reaction'
+ rootState.config.notificationVisibility.emojiReactions && 'pleroma:emoji_reaction',
+ rootState.config.notificationVisibility.polls && 'poll'
].filter(_ => _))
}
-const statusNotifications = ['like', 'mention', 'repeat', 'pleroma:emoji_reaction']
+const statusNotifications = ['like', 'mention', 'repeat', 'pleroma:emoji_reaction', 'poll']
export const isStatusNotification = (type) => includes(statusNotifications, type)
@@ -98,6 +99,9 @@ export const prepareNotificationObject = (notification, i18n) => {
case 'follow_request':
i18nString = 'follow_request'
break
+ case 'poll':
+ i18nString = 'poll_ended'
+ break
}
if (notification.type === 'pleroma:emoji_reaction') {