diff --git a/src/components/desktop_nav/desktop_nav.js b/src/components/desktop_nav/desktop_nav.js index f4900c38..2fb8a5ac 100644 --- a/src/components/desktop_nav/desktop_nav.js +++ b/src/components/desktop_nav/desktop_nav.js @@ -98,11 +98,15 @@ export default { logoLeft () { return this.$store.state.instance.logoLeft }, currentUser () { return this.$store.state.users.currentUser }, privateMode () { return this.$store.state.instance.private }, + federating () { return this.$store.state.instance.federating }, shouldConfirmLogout () { return this.$store.getters.mergedConfig.modalOnLogout }, showBubbleTimeline () { return this.$store.state.instance.localBubbleInstances.length > 0 + }, + restrictedTimelines () { + return this.$store.state.instance.restrict_unauthenticated.timelines } }, methods: { diff --git a/src/components/desktop_nav/desktop_nav.vue b/src/components/desktop_nav/desktop_nav.vue index 92d3fa5b..a52989a5 100644 --- a/src/components/desktop_nav/desktop_nav.vue +++ b/src/components/desktop_nav/desktop_nav.vue @@ -44,6 +44,7 @@ /> @@ -67,6 +68,7 @@ /> diff --git a/src/components/emoji_picker/emoji_picker.scss b/src/components/emoji_picker/emoji_picker.scss index ac7b8b5d..119da7c4 100644 --- a/src/components/emoji_picker/emoji_picker.scss +++ b/src/components/emoji_picker/emoji_picker.scss @@ -1,5 +1,16 @@ @import '../../_variables.scss'; +// The worst query selector ever +// selects ONLY emojis pickers in replies in notifications +// who thought this was a good idea? +.notification > .Status > .status-container > .post-status-form > form > .form-group > .emoji-input > .emoji-picker { + max-width: 100%; + left: 0; + @media (min-width: 1300px) { + left: -30px; + } +} + .Notification { .emoji-picker { min-width: 160%; @@ -18,6 +29,10 @@ min-width: 50%; max-width: 130%; } + + .Status > .emoji-picker { + z-index: 1000; + } } } .emoji-picker { diff --git a/src/components/timeline_menu/timeline_menu_content.js b/src/components/timeline_menu/timeline_menu_content.js index df15030b..25bd30d9 100644 --- a/src/components/timeline_menu/timeline_menu_content.js +++ b/src/components/timeline_menu/timeline_menu_content.js @@ -24,7 +24,8 @@ const TimelineMenuContent = { currentUser: state => state.users.currentUser, privateMode: state => state.instance.private, federating: state => state.instance.federating, - showBubbleTimeline: state => (state.instance.localBubbleInstances.length > 0) + showBubbleTimeline: state => (state.instance.localBubbleInstances.length > 0), + restrictedTimelines: state => state.instance.restrict_unauthenticated.timelines }) } } diff --git a/src/components/timeline_menu/timeline_menu_content.vue b/src/components/timeline_menu/timeline_menu_content.vue index c9b3f60c..d55f2cfb 100644 --- a/src/components/timeline_menu/timeline_menu_content.vue +++ b/src/components/timeline_menu/timeline_menu_content.vue @@ -32,7 +32,7 @@ >{{ $t("nav.bubble_timeline") }} -
  • +
  • {{ $t("nav.public_tl") }}
  • -
  • +
  • `/api/pleroma/admin/users/${screenName}/permission_group/${right}` -const ACTIVATE_USER_URL = '/api/pleroma/admin/users/activate' -const DEACTIVATE_USER_URL = '/api/pleroma/admin/users/deactivate' -const ADMIN_USERS_URL = '/api/pleroma/admin/users' +const TAG_USER_URL = '/api/v1/pleroma/admin/users/tag' +const PERMISSION_GROUP_URL = (screenName, right) => `/api/v1/pleroma/admin/users/${screenName}/permission_group/${right}` +const ACTIVATE_USER_URL = '/api/v1/pleroma/admin/users/activate' +const DEACTIVATE_USER_URL = '/api/v1/pleroma/admin/users/deactivate' +const ADMIN_USERS_URL = '/api/v1/pleroma/admin/users' const SUGGESTIONS_URL = '/api/v1/suggestions' const NOTIFICATION_SETTINGS_URL = '/api/pleroma/notification_settings' const NOTIFICATION_READ_URL = '/api/v1/pleroma/notifications/read' @@ -251,7 +251,7 @@ const register = ({ params, credentials }) => { }) } -const getCaptcha = () => fetch('/api/pleroma/captcha').then(resp => resp.json()) +const getCaptcha = () => fetch('/api/v1/pleroma/captcha').then(resp => resp.json()) const authHeaders = (accessToken) => { if (accessToken) { @@ -1340,7 +1340,7 @@ const fetchEmojiReactions = ({ id, credentials }) => { const reactWithEmoji = ({ id, emoji, credentials }) => { return promisedRequest({ - url: PLEROMA_EMOJI_REACT_URL(id, emoji), + url: PLEROMA_EMOJI_REACT_URL(id, encodeURIComponent(emoji)), method: 'PUT', credentials }).then(parseStatus) @@ -1348,7 +1348,7 @@ const reactWithEmoji = ({ id, emoji, credentials }) => { const unreactWithEmoji = ({ id, emoji, credentials }) => { return promisedRequest({ - url: PLEROMA_EMOJI_UNREACT_URL(id, emoji), + url: PLEROMA_EMOJI_UNREACT_URL(id, encodeURIComponent(emoji)), method: 'DELETE', credentials }).then(parseStatus) diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index f67a8cfe..e0d7bc61 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -410,8 +410,10 @@ export const parseNotification = (data) => { if (masto) { output.type = mastoDict[data.type] || data.type output.seen = data.pleroma.is_seen - output.status = isStatusNotification(output.type) ? parseStatus(data.status) : null - output.action = output.status // TODO: Refactor, this is unneeded + if (data.status) { + output.status = isStatusNotification(output.type) ? parseStatus(data.status) : null + output.action = output.status // TODO: Refactor, this is unneeded + } output.target = output.type !== 'move' ? null : parseUser(data.target)