diff --git a/CHANGELOG.md b/CHANGELOG.md index d3b899d25..06971d72f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## 2.11 +## 2.11.1 +### Fixed +- User note not working + +## 2.11.0 ### Added - Initial MFM rendering support - Button to remove all drafts diff --git a/changelog.d/2-11-2.fix b/changelog.d/2-11-2.fix new file mode 100644 index 000000000..2bb1e9869 --- /dev/null +++ b/changelog.d/2-11-2.fix @@ -0,0 +1,4 @@ +Fixed crashing on Firefox 153 +Fixed serif-fonts being used by default in some cases +Fixed font select component showing and using objects instead of strings +Fixed generic ('sans-serif', 'monospace' etc) fonts not working diff --git a/changelog.d/extra-notifications-style.fix b/changelog.d/extra-notifications-style.fix new file mode 100644 index 000000000..dc9466358 --- /dev/null +++ b/changelog.d/extra-notifications-style.fix @@ -0,0 +1 @@ +Fix style of extra notifications diff --git a/changelog.d/mfa-fixes.fix b/changelog.d/mfa-fixes.fix new file mode 100644 index 000000000..52575990b --- /dev/null +++ b/changelog.d/mfa-fixes.fix @@ -0,0 +1 @@ +Fix MFA login and recovery code authentication. diff --git a/changelog.d/no-crash-on-bad-style.fix b/changelog.d/no-crash-on-bad-style.fix new file mode 100644 index 000000000..828e94d74 --- /dev/null +++ b/changelog.d/no-crash-on-bad-style.fix @@ -0,0 +1 @@ +Do not crash even on css rule insertion failure diff --git a/package.json b/package.json index 1d94ac22f..ed9a8ab33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pleroma_fe", - "version": "2.11.0", + "version": "2.11.1", "description": "Pleroma frontend, the default frontend of Pleroma social network server", "author": "Pleroma contributors ", "private": false, diff --git a/src/boot/routes.js b/src/boot/routes.js index beaa144e8..5897fad92 100644 --- a/src/boot/routes.js +++ b/src/boot/routes.js @@ -1,5 +1,3 @@ -import { defineAsyncComponent } from 'vue' - import AuthForm from 'src/components/auth_form/auth_form.js' import BookmarkTimeline from 'src/components/bookmark_timeline/bookmark_timeline.vue' import BubbleTimeline from 'src/components/bubble_timeline/bubble_timeline.vue' @@ -68,9 +66,7 @@ export default (store) => { { name: 'conversation2', path: '/conversation/:statusId', - component: defineAsyncComponent( - () => import('src/components/chat_view/chat_view.vue'), - ), + component: () => import('src/components/chat_view/chat_view.vue'), props: true, meta: { dontScroll: true }, beforeEnter: validateAuthenticatedRoute, @@ -91,23 +87,18 @@ export default (store) => { { name: 'external-user-profile', path: '/users/$:id', - component: defineAsyncComponent( - () => import('src/components/user_profile/user_profile.vue'), - ), + component: () => import('src/components/user_profile/user_profile.vue'), }, { name: 'user-profile-admin-view', path: '/users/$:id/admin_view', - component: defineAsyncComponent( - () => import('src/components/user_profile/user_profile_admin_view.vue'), - ), + component: () => + import('src/components/user_profile/user_profile_admin_view.vue'), }, { name: 'interactions', path: '/users/:username/interactions', - component: defineAsyncComponent( - () => import('src/components/interactions/interactions.vue'), - ), + component: () => import('src/components/interactions/interactions.vue'), beforeEnter: validateAuthenticatedRoute, }, { @@ -119,39 +110,31 @@ export default (store) => { { name: 'registration', path: '/registration', - component: defineAsyncComponent( - () => import('src/components/registration/registration.vue'), - ), + component: () => import('src/components/registration/registration.vue'), }, { name: 'password-reset', path: '/password-reset', - component: defineAsyncComponent( - () => import('src/components/password_reset/password_reset.vue'), - ), + component: () => + import('src/components/password_reset/password_reset.vue'), props: true, }, { name: 'registration-token', path: '/registration/:token', - component: defineAsyncComponent( - () => import('src/components/registration/registration.vue'), - ), + component: () => import('src/components/registration/registration.vue'), }, { name: 'friend-requests', path: '/friend-requests', - component: defineAsyncComponent( - () => import('src/components/follow_requests/follow_requests.vue'), - ), + component: () => + import('src/components/follow_requests/follow_requests.vue'), beforeEnter: validateAuthenticatedRoute, }, { name: 'notifications', path: '/:username/notifications', - component: defineAsyncComponent( - () => import('src/components/notifications/notifications.vue'), - ), + component: () => import('src/components/notifications/notifications.vue'), props: () => ({ disableTeleport: true }), beforeEnter: validateAuthenticatedRoute, }, @@ -163,98 +146,74 @@ export default (store) => { { name: 'shout-panel', path: '/shout-panel', - component: defineAsyncComponent( - () => import('src/components/shout_panel/shout_panel.vue'), - ), + component: () => import('src/components/shout_panel/shout_panel.vue'), props: () => ({ floating: false }), }, { name: 'oauth-callback', path: '/oauth-callback', - component: defineAsyncComponent( - () => import('src/components/oauth_callback/oauth_callback.vue'), - ), + component: () => + import('src/components/oauth_callback/oauth_callback.vue'), props: (route) => ({ code: route.query.code }), }, { name: 'search', path: '/search', - component: defineAsyncComponent( - () => import('src/components/search/search.vue'), - ), + component: () => import('src/components/search/search.vue'), props: (route) => ({ query: route.query.query }), }, { name: 'who-to-follow', path: '/who-to-follow', - component: defineAsyncComponent( - () => import('src/components/who_to_follow/who_to_follow.vue'), - ), + component: () => import('src/components/who_to_follow/who_to_follow.vue'), beforeEnter: validateAuthenticatedRoute, }, { name: 'about', path: '/about', - component: defineAsyncComponent( - () => import('src/components/about/about.vue'), - ), + component: () => import('src/components/about/about.vue'), }, { name: 'announcements', path: '/announcements', - component: defineAsyncComponent( - () => - import('src/components/announcements_page/announcements_page.vue'), - ), + component: () => + import('src/components/announcements_page/announcements_page.vue'), }, { name: 'drafts', path: '/drafts', - component: defineAsyncComponent( - () => import('src/components/drafts/drafts.vue'), - ), + component: () => import('src/components/drafts/drafts.vue'), }, { name: 'user-profile', path: '/users/:name', - component: defineAsyncComponent( - () => import('src/components/user_profile/user_profile.vue'), - ), + component: () => import('src/components/user_profile/user_profile.vue'), }, { name: 'legacy-user-profile', path: '/:name', - component: defineAsyncComponent( - () => import('src/components/user_profile/user_profile.vue'), - ), + component: () => import('src/components/user_profile/user_profile.vue'), }, { name: 'lists', path: '/lists', - component: defineAsyncComponent( - () => import('src/components/lists/lists.vue'), - ), + component: () => import('src/components/lists/lists.vue'), }, { name: 'lists-timeline', path: '/lists/:id', - component: defineAsyncComponent( - () => import('src/components/lists_timeline/lists_timeline.vue'), - ), + component: () => + import('src/components/lists_timeline/lists_timeline.vue'), }, { name: 'lists-edit', path: '/lists/:id/edit', - component: defineAsyncComponent( - () => import('src/components/lists_edit/lists_edit.vue'), - ), + component: () => import('src/components/lists_edit/lists_edit.vue'), }, { name: 'lists-new', path: '/lists/new', - component: defineAsyncComponent( - () => import('src/components/lists_edit/lists_edit.vue'), - ), + component: () => import('src/components/lists_edit/lists_edit.vue'), }, { name: 'edit-navigation', @@ -266,19 +225,14 @@ export default (store) => { { name: 'bookmark-folders', path: '/bookmark_folders', - component: defineAsyncComponent( - () => import('src/components/bookmark_folders/bookmark_folders.vue'), - ), + component: () => + import('src/components/bookmark_folders/bookmark_folders.vue'), }, { name: 'bookmark-folder-new', path: '/bookmarks/new-folder', - component: defineAsyncComponent( - () => - import( - 'src/components/bookmark_folder_edit/bookmark_folder_edit.vue' - ), - ), + component: () => + import('src/components/bookmark_folder_edit/bookmark_folder_edit.vue'), }, { name: 'bookmark-folder', @@ -288,12 +242,8 @@ export default (store) => { { name: 'bookmark-folder-edit', path: '/bookmarks/:id/edit', - component: defineAsyncComponent( - () => - import( - 'src/components/bookmark_folder_edit/bookmark_folder_edit.vue' - ), - ), + component: () => + import('src/components/bookmark_folder_edit/bookmark_folder_edit.vue'), }, ] @@ -301,19 +251,16 @@ export default (store) => { routes = routes.concat([ { name: 'chat', - path: '/users/:username/chats/:recipient_id', - component: defineAsyncComponent( - () => import('src/components/chat_view/chat_view.vue'), - ), + path: '/users/:username/chats/:chatUserId', + component: () => import('src/components/chat_view/chat_view.vue'), meta: { dontScroll: false }, + props: true, beforeEnter: validateAuthenticatedRoute, }, { name: 'chats', path: '/users/:username/chats', - component: defineAsyncComponent( - () => import('src/components/chat_list/chat_list.vue'), - ), + component: () => import('src/components/chat_list/chat_list.vue'), meta: { dontScroll: false }, beforeEnter: validateAuthenticatedRoute, }, diff --git a/src/components/chat_message/chat_message.js b/src/components/chat_message/chat_message.js index 516741a33..8e5df8b1e 100644 --- a/src/components/chat_message/chat_message.js +++ b/src/components/chat_message/chat_message.js @@ -76,9 +76,7 @@ const ChatMessage = { return !!this.message.user }, authorId() { - return this.isStatus - ? this.message.user.id - : this.message.account_id + return this.isStatus ? this.message.user.id : this.message.account_id }, author() { return this.$store.getters.findUser(this.authorId) diff --git a/src/components/chat_view/chat_view.js b/src/components/chat_view/chat_view.js index 8d45707f3..07866ad2e 100644 --- a/src/components/chat_view/chat_view.js +++ b/src/components/chat_view/chat_view.js @@ -27,8 +27,8 @@ import { readChat, sendChatMessage, } from 'src/api/chats.js' -import { WSConnectionStatus } from 'src/api/websocket.js' import { fetchConversation, fetchStatus } from 'src/api/public.js' +import { WSConnectionStatus } from 'src/api/websocket.js' import { library } from '@fortawesome/fontawesome-svg-core' import { faChevronDown, faChevronLeft } from '@fortawesome/free-solid-svg-icons' @@ -53,7 +53,14 @@ const Chat = { PostStatusForm, }, props: { - statusId: String, + statusId: { + type: String, + default: null, + }, + chatUserId: { + type: String, + default: null, + }, testMode: Boolean, }, data() { @@ -180,11 +187,20 @@ const Chat = { }, $route: async function (newVal) { if (this.messagesIndex[newVal.params.statusId]) { - const focused = document.getElementById(`chatmessage-${this.$route.params.statusId}`) + const focused = document.getElementById( + `chatmessage-${this.$route.params.statusId}`, + ) if (focused?.getBoundingClientRect == null) return - const bottomBoundary = window.innerHeight - this.$refs.footer.clientHeight - const topBoundary = this.$refs.header.clientHeight + document.getElementById('nav').clientHeight - const margin = Number(window.getComputedStyle(this.$refs.messageList.$el).gap.replace('px','')) + const bottomBoundary = + window.innerHeight - this.$refs.footer.clientHeight + const topBoundary = + this.$refs.header.clientHeight + + document.getElementById('nav').clientHeight + const margin = Number( + window + .getComputedStyle(this.$refs.messageList.$el) + .gap.replace('px', ''), + ) const rect = focused.getBoundingClientRect() const scrollAmount = (() => { @@ -293,7 +309,9 @@ const Chat = { if (this.isConversation) { const [ { data: status }, - { data: { ancestors, descendants } } + { + data: { ancestors, descendants }, + }, ] = await Promise.all([ fetchStatus({ id: this.statusId, @@ -302,7 +320,7 @@ const Chat = { fetchConversation({ id: this.statusId, credentials: useOAuthStore().token, - }) + }), ]) messages = [...ancestors, status, ...descendants] } else { @@ -337,17 +355,21 @@ const Chat = { // full height of the scrollable container. // If this is the case, we want to fetch the messages until the scrollable container // is fully populated so that the user has the ability to scroll up and load the history. - if (!isScrollable() && messages.length > 0) { + // + // Conversation fetching doesn't support pagination and spews out everything at once + // so we both can't and don't need to fetch previous posts + if (!this.isConversation && !isScrollable() && messages.length > 0) { this.fetchChat({ maxId: this.minId, }) } }, async startFetching() { + console.log(this.statusId, this.chatUserId) if (!this.isConversation) { try { const { data } = await getOrCreateChat({ - accountId: this.recipientId, + accountId: this.chatUserId, credentials: useOAuthStore().token, }) this.$store.commit('addNewUsers', [data.account]) @@ -378,7 +400,7 @@ const Chat = { const message = newMessages[i] // Sanity check - if (!this.isConversation && (message.chat_id !== this.chat.id)) { + if (!this.isConversation && message.chat_id !== this.chat.id) { console.warn( `Chat message doesn't belong to current chat (id: ${this.chat.id})!!`, message, @@ -516,7 +538,10 @@ const Chat = { // Event handlers onPosted(data) { this.explicitReplyStatus = null - this.$router.push({ name: 'conversation2', params: { statusId: data.id } }) + this.$router.push({ + name: 'conversation2', + params: { statusId: data.id }, + }) }, handleVisibilityChange() { this.$nextTick(() => { diff --git a/src/components/chat_view/chat_view.vue b/src/components/chat_view/chat_view.vue index 5ea2fd2b5..f0a40ebc6 100644 --- a/src/components/chat_view/chat_view.vue +++ b/src/components/chat_view/chat_view.vue @@ -67,7 +67,10 @@ -
+
{{ explicitReplyStatus ? $t('status.reply_to_selected') : $t('status.reply_to_last') }}