From 830e8fdb453c01f091b63dddbc634deb3cdd5d43 Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Sat, 10 Dec 2022 21:03:12 +0200 Subject: [PATCH 1/8] Fix user moderation dropdown clipping --- src/components/user_card/user_card.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/user_card/user_card.scss b/src/components/user_card/user_card.scss index 07ab7bec..2cae1c35 100644 --- a/src/components/user_card/user_card.scss +++ b/src/components/user_card/user_card.scss @@ -2,7 +2,7 @@ .user-card { position: relative; - z-index: 1; + z-index: 10; &:hover { --_still-image-img-visibility: visible; From 6e1ba218df450f2a7e900e794bd6275002f0650e Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Sat, 10 Dec 2022 21:17:41 +0200 Subject: [PATCH 2/8] Don't show timeline links if disabled and logged out --- src/components/desktop_nav/desktop_nav.js | 4 ++++ src/components/desktop_nav/desktop_nav.vue | 2 ++ src/components/timeline_menu/timeline_menu_content.js | 3 ++- src/components/timeline_menu/timeline_menu_content.vue | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) 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/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 27aece22..220b0278 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") }}
  • -
  • +
  • Date: Mon, 12 Dec 2022 18:59:57 +0100 Subject: [PATCH 3/8] fix 404 when reacting with Keycap Number Sign The Unicode sequence for the Keycap Number Sign emoji starts with an ASCII "#" character, which the browser's URL parser will interpret as a URI fragment and truncate it before sending the request to the backend. --- src/services/api/api.service.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 9e6f39f2..3edda6e1 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -1335,7 +1335,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) @@ -1343,7 +1343,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) From 909271c764f07861b0e77a7909d2d9b7e524e6ad Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 14 Dec 2022 09:38:07 +0000 Subject: [PATCH 4/8] use v1 urls --- src/modules/instance.js | 2 +- src/services/api/api.service.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/instance.js b/src/modules/instance.js index c8c718d0..02cbe1f8 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -178,7 +178,7 @@ const instance = { async getCustomEmoji ({ commit, state }) { try { - const res = await window.fetch('/api/pleroma/emoji.json') + const res = await window.fetch('/api/v1/pleroma/emoji') if (res.ok) { const result = await res.json() const values = Array.isArray(result) ? Object.assign({}, ...result) : result diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 9e6f39f2..afa443f5 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -11,11 +11,11 @@ const CHANGE_EMAIL_URL = '/api/pleroma/change_email' const CHANGE_PASSWORD_URL = '/api/pleroma/change_password' const MOVE_ACCOUNT_URL = '/api/pleroma/move_account' const ALIASES_URL = '/api/pleroma/aliases' -const TAG_USER_URL = '/api/pleroma/admin/users/tag' -const PERMISSION_GROUP_URL = (screenName, right) => `/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' @@ -246,7 +246,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) { From 8c6cf86de3b4314bbed4b7ad9147cbf96584cb76 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 14 Dec 2022 09:38:46 +0000 Subject: [PATCH 5/8] Revert "use v1 urls" This reverts commit 909271c764f07861b0e77a7909d2d9b7e524e6ad. --- src/modules/instance.js | 2 +- src/services/api/api.service.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/instance.js b/src/modules/instance.js index 02cbe1f8..c8c718d0 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -178,7 +178,7 @@ const instance = { async getCustomEmoji ({ commit, state }) { try { - const res = await window.fetch('/api/v1/pleroma/emoji') + const res = await window.fetch('/api/pleroma/emoji.json') if (res.ok) { const result = await res.json() const values = Array.isArray(result) ? Object.assign({}, ...result) : result diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index afa443f5..9e6f39f2 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -11,11 +11,11 @@ const CHANGE_EMAIL_URL = '/api/pleroma/change_email' const CHANGE_PASSWORD_URL = '/api/pleroma/change_password' const MOVE_ACCOUNT_URL = '/api/pleroma/move_account' const ALIASES_URL = '/api/pleroma/aliases' -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 TAG_USER_URL = '/api/pleroma/admin/users/tag' +const PERMISSION_GROUP_URL = (screenName, right) => `/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 SUGGESTIONS_URL = '/api/v1/suggestions' const NOTIFICATION_SETTINGS_URL = '/api/pleroma/notification_settings' const NOTIFICATION_READ_URL = '/api/v1/pleroma/notifications/read' @@ -246,7 +246,7 @@ const register = ({ params, credentials }) => { }) } -const getCaptcha = () => fetch('/api/v1/pleroma/captcha').then(resp => resp.json()) +const getCaptcha = () => fetch('/api/pleroma/captcha').then(resp => resp.json()) const authHeaders = (accessToken) => { if (accessToken) { From c39332c1bfb410a5f20907d75e739dc5cda15ce8 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 14 Dec 2022 09:39:01 +0000 Subject: [PATCH 6/8] Revert "Revert "use v1 urls"" This reverts commit 8c6cf86de3b4314bbed4b7ad9147cbf96584cb76. --- src/modules/instance.js | 2 +- src/services/api/api.service.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/instance.js b/src/modules/instance.js index c8c718d0..02cbe1f8 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -178,7 +178,7 @@ const instance = { async getCustomEmoji ({ commit, state }) { try { - const res = await window.fetch('/api/pleroma/emoji.json') + const res = await window.fetch('/api/v1/pleroma/emoji') if (res.ok) { const result = await res.json() const values = Array.isArray(result) ? Object.assign({}, ...result) : result diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 9e6f39f2..afa443f5 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -11,11 +11,11 @@ const CHANGE_EMAIL_URL = '/api/pleroma/change_email' const CHANGE_PASSWORD_URL = '/api/pleroma/change_password' const MOVE_ACCOUNT_URL = '/api/pleroma/move_account' const ALIASES_URL = '/api/pleroma/aliases' -const TAG_USER_URL = '/api/pleroma/admin/users/tag' -const PERMISSION_GROUP_URL = (screenName, right) => `/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' @@ -246,7 +246,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) { From 7ff17ab72238ed66a45c512e7cd77ac46adc0b7d Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Tue, 20 Dec 2022 13:20:13 +0000 Subject: [PATCH 7/8] don't crash out if notification status is null --- src/services/entity_normalizer/entity_normalizer.service.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 465d6fad..df6c03b5 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -408,8 +408,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) From d00e28d5e9b8a51d2f36c7d0238f8cd5a7ef4934 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 22 Dec 2022 05:43:01 +0000 Subject: [PATCH 8/8] fix emoji picker in replies in notifications --- src/components/emoji_picker/emoji_picker.scss | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 {