From cd5d0a8b641248c82ad2fe6b613a61f2528ef042 Mon Sep 17 00:00:00 2001 From: tusooa Date: Fri, 28 Apr 2023 18:15:44 -0400 Subject: Skip changelog --- changelog.d/check-changelog.skip | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 changelog.d/check-changelog.skip (limited to 'changelog.d') diff --git a/changelog.d/check-changelog.skip b/changelog.d/check-changelog.skip new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3-70-g09d2 From 3ead21bcc640dfd2fb0f4080e532ba637cc2fdb3 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 23 May 2023 22:30:24 +0300 Subject: changelog --- changelog.d/adminfe.add | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/adminfe.add (limited to 'changelog.d') diff --git a/changelog.d/adminfe.add b/changelog.d/adminfe.add new file mode 100644 index 00000000..188c4555 --- /dev/null +++ b/changelog.d/adminfe.add @@ -0,0 +1 @@ +Implemented a very basic instance administration screen -- cgit v1.2.3-70-g09d2 From 10e28f6c1df4432947fa5686c6cecde9ffe8582d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 5 Jun 2023 21:54:17 +0300 Subject: changelog --- changelog.d/parser.fix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/parser.fix (limited to 'changelog.d') diff --git a/changelog.d/parser.fix b/changelog.d/parser.fix new file mode 100644 index 00000000..13bac0bf --- /dev/null +++ b/changelog.d/parser.fix @@ -0,0 +1 @@ +fix regex issue in HTML parser/renderer -- cgit v1.2.3-70-g09d2 From 8ba22a248118dfd5869adc9da881794e464e564c Mon Sep 17 00:00:00 2001 From: tusooa Date: Fri, 9 Jun 2023 16:11:15 -0400 Subject: Fix react button not working if reaction accounts are not loaded --- changelog.d/react-button.fix | 1 + src/components/emoji_reactions/emoji_reactions.js | 7 ++++--- src/modules/statuses.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 changelog.d/react-button.fix (limited to 'changelog.d') diff --git a/changelog.d/react-button.fix b/changelog.d/react-button.fix new file mode 100644 index 00000000..c2222fb6 --- /dev/null +++ b/changelog.d/react-button.fix @@ -0,0 +1 @@ +Fix react button not working if reaction accounts are not loaded diff --git a/src/components/emoji_reactions/emoji_reactions.js b/src/components/emoji_reactions/emoji_reactions.js index b4936424..4d5c6c5a 100644 --- a/src/components/emoji_reactions/emoji_reactions.js +++ b/src/components/emoji_reactions/emoji_reactions.js @@ -57,10 +57,10 @@ const EmojiReactions = { reactedWith (emoji) { return this.status.emoji_reactions.find(r => r.name === emoji).me }, - fetchEmojiReactionsByIfMissing () { + async fetchEmojiReactionsByIfMissing () { const hasNoAccounts = this.status.emoji_reactions.find(r => !r.accounts) if (hasNoAccounts) { - this.$store.dispatch('fetchEmojiReactionsBy', this.status.id) + return await this.$store.dispatch('fetchEmojiReactionsBy', this.status.id) } }, reactWith (emoji) { @@ -69,9 +69,10 @@ const EmojiReactions = { unreact (emoji) { this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji }) }, - emojiOnClick (emoji, event) { + async emojiOnClick (emoji, event) { if (!this.loggedIn) return + await this.fetchEmojiReactionsByIfMissing() if (this.reactedWith(emoji)) { this.unreact(emoji) } else { diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 93a4a957..ed21a730 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -757,7 +757,7 @@ const statuses = { ) }, fetchEmojiReactionsBy ({ rootState, commit }, id) { - rootState.api.backendInteractor.fetchEmojiReactions({ id }).then( + return rootState.api.backendInteractor.fetchEmojiReactions({ id }).then( emojiReactions => { commit('addEmojiReactionsBy', { id, emojiReactions, currentUser: rootState.users.currentUser }) } -- cgit v1.2.3-70-g09d2 From 4e6af5bd234d9ce9be04286d7645d81a3cbc910b Mon Sep 17 00:00:00 2001 From: tusooa Date: Tue, 13 Jun 2023 14:00:20 -0400 Subject: Fix openSettingsModalTab --- changelog.d/edit-profile-button.fix | 1 + src/modules/interface.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/edit-profile-button.fix (limited to 'changelog.d') diff --git a/changelog.d/edit-profile-button.fix b/changelog.d/edit-profile-button.fix new file mode 100644 index 00000000..5a92765c --- /dev/null +++ b/changelog.d/edit-profile-button.fix @@ -0,0 +1 @@ +Fix openSettingsModalTab so that it correctly opens Settings modal instead of Admin modal diff --git a/src/modules/interface.js b/src/modules/interface.js index 2d012f1b..f8d62d87 100644 --- a/src/modules/interface.js +++ b/src/modules/interface.js @@ -112,7 +112,7 @@ const interfaceMod = { }, openSettingsModalTab ({ commit }, value) { commit('setSettingsModalTargetTab', value) - commit('openSettingsModal') + commit('openSettingsModal', 'user') }, pushGlobalNotice ( { commit, dispatch, state }, -- cgit v1.2.3-70-g09d2 From db1643b94e47262bf5648d53d9a21f2d5cec7f00 Mon Sep 17 00:00:00 2001 From: tusooa Date: Tue, 13 Jun 2023 15:06:46 -0400 Subject: Keep aspect ratio of custom emoji reaction in notification --- changelog.d/custom-emoji-notif-width.fix | 1 + src/components/notifications/notifications.scss | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/custom-emoji-notif-width.fix (limited to 'changelog.d') diff --git a/changelog.d/custom-emoji-notif-width.fix b/changelog.d/custom-emoji-notif-width.fix new file mode 100644 index 00000000..da118f6b --- /dev/null +++ b/changelog.d/custom-emoji-notif-width.fix @@ -0,0 +1 @@ +Keep aspect ratio of custom emoji reaction in notification diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index 61f7317e..5749e430 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -136,6 +136,7 @@ .emoji-reaction-emoji-image { vertical-align: middle; + object-fit: contain; } .notification-details { -- cgit v1.2.3-70-g09d2 From 16140c278ba68f4ad9817181c943477a8b367858 Mon Sep 17 00:00:00 2001 From: tusooa Date: Sun, 18 Jun 2023 15:46:05 -0400 Subject: Add changelog --- changelog.d/emoji-picker-button-accessible.fix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/emoji-picker-button-accessible.fix (limited to 'changelog.d') diff --git a/changelog.d/emoji-picker-button-accessible.fix b/changelog.d/emoji-picker-button-accessible.fix new file mode 100644 index 00000000..12898a1a --- /dev/null +++ b/changelog.d/emoji-picker-button-accessible.fix @@ -0,0 +1 @@ +Add alt text to emoji picker buttons -- cgit v1.2.3-70-g09d2 From d98650e21d9d24dde321e77367e701a5025e9b70 Mon Sep 17 00:00:00 2001 From: Kian-ting Tan Date: Tue, 20 Jun 2023 14:47:51 +0000 Subject: add changelog --- changelog.d/add-taiwanese-aka-hokkien-i18n-support.add | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/add-taiwanese-aka-hokkien-i18n-support.add (limited to 'changelog.d') diff --git a/changelog.d/add-taiwanese-aka-hokkien-i18n-support.add b/changelog.d/add-taiwanese-aka-hokkien-i18n-support.add new file mode 100644 index 00000000..53d89805 --- /dev/null +++ b/changelog.d/add-taiwanese-aka-hokkien-i18n-support.add @@ -0,0 +1 @@ +add the initial i18n translation file for Taiwanese (Hokkien), and modify some related files. \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 8cc6b213fb3581caa77637a45ee60ee20268218a Mon Sep 17 00:00:00 2001 From: tusooa Date: Thu, 29 Jun 2023 10:27:02 -0400 Subject: Fix react button misalignment on safari ios --- changelog.d/react-button-safari.fix | 1 + src/components/emoji_reactions/emoji_reactions.vue | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog.d/react-button-safari.fix (limited to 'changelog.d') diff --git a/changelog.d/react-button-safari.fix b/changelog.d/react-button-safari.fix new file mode 100644 index 00000000..9846d50d --- /dev/null +++ b/changelog.d/react-button-safari.fix @@ -0,0 +1 @@ +Fix react button misalignment on safari ios diff --git a/src/components/emoji_reactions/emoji_reactions.vue b/src/components/emoji_reactions/emoji_reactions.vue index 92fc58ca..c11b338e 100644 --- a/src/components/emoji_reactions/emoji_reactions.vue +++ b/src/components/emoji_reactions/emoji_reactions.vue @@ -93,6 +93,7 @@ .emoji-reaction-count-button { background-color: var(--btn); + margin: 0; height: 100%; border-top-left-radius: 0; border-bottom-left-radius: 0; @@ -120,6 +121,7 @@ box-sizing: border-box; border-top-right-radius: 0; border-bottom-right-radius: 0; + margin: 0; .reaction-emoji { width: var(--emoji-size); -- cgit v1.2.3-70-g09d2 From 09402e2537e0c43c52bd8345301885647e841ed1 Mon Sep 17 00:00:00 2001 From: tusooa Date: Thu, 29 Jun 2023 11:31:07 -0400 Subject: Fix scrolling emoji selector in modal in safari ios --- changelog.d/scroll-emoji-selector-safari.fix | 1 + src/components/emoji_picker/emoji_picker.js | 4 ++++ src/components/emoji_picker/emoji_picker.vue | 2 ++ 3 files changed, 7 insertions(+) create mode 100644 changelog.d/scroll-emoji-selector-safari.fix (limited to 'changelog.d') diff --git a/changelog.d/scroll-emoji-selector-safari.fix b/changelog.d/scroll-emoji-selector-safari.fix new file mode 100644 index 00000000..3f5dda7d --- /dev/null +++ b/changelog.d/scroll-emoji-selector-safari.fix @@ -0,0 +1 @@ +Fix scrolling emoji selector in modal in safari ios diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index 349b043d..30c01aa5 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -105,6 +105,7 @@ const EmojiPicker = { default: false } }, + inject: ['popoversZLayer'], data () { return { keyword: '', @@ -350,6 +351,9 @@ const EmojiPicker = { return emoji.displayText } + }, + isInModal () { + return this.popoversZLayer === 'modals' } } } diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue index 6972164b..3e77d523 100644 --- a/src/components/emoji_picker/emoji_picker.vue +++ b/src/components/emoji_picker/emoji_picker.vue @@ -12,6 +12,7 @@ Date: Mon, 17 Jul 2023 11:29:36 -0400 Subject: Add changelog for quote --- changelog.d/quote.add | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/quote.add (limited to 'changelog.d') diff --git a/changelog.d/quote.add b/changelog.d/quote.add new file mode 100644 index 00000000..b43b6aba --- /dev/null +++ b/changelog.d/quote.add @@ -0,0 +1 @@ +Implement quoting -- cgit v1.2.3-70-g09d2 From 35d3b8f27dace6efd5aab8915b2025d16bb7e7e7 Mon Sep 17 00:00:00 2001 From: tusooa Date: Tue, 18 Jul 2023 19:06:00 -0400 Subject: Fix pinned statuses gone when reloading user timeline --- changelog.d/reload-user-pinned.fix | 1 + src/components/timeline/timeline.js | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 changelog.d/reload-user-pinned.fix (limited to 'changelog.d') diff --git a/changelog.d/reload-user-pinned.fix b/changelog.d/reload-user-pinned.fix new file mode 100644 index 00000000..db241c20 --- /dev/null +++ b/changelog.d/reload-user-pinned.fix @@ -0,0 +1 @@ +Fix pinned statuses gone when reloading user timeline diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index b7414610..1050b87a 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -160,6 +160,9 @@ const Timeline = { if (this.timeline.flushMarker !== 0) { this.$store.commit('clearTimeline', { timeline: this.timelineName, excludeUserId: true }) this.$store.commit('queueFlush', { timeline: this.timelineName, id: 0 }) + if (this.timelineName === 'user') { + this.$store.dispatch('fetchPinnedStatuses', this.userId) + } this.fetchOlderStatuses() } else { this.blockClicksTemporarily() -- cgit v1.2.3-70-g09d2 From 0b0b1dabdfa2051d0b1d1ad846892da4801ca588 Mon Sep 17 00:00:00 2001 From: tusooa Date: Fri, 21 Jul 2023 13:54:10 -0400 Subject: Fix parsing non-ascii tags --- changelog.d/nonascii-tags.fix | 1 + src/services/matcher/matcher.service.js | 7 +++++-- test/unit/specs/services/matcher/matcher.spec.js | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 changelog.d/nonascii-tags.fix (limited to 'changelog.d') diff --git a/changelog.d/nonascii-tags.fix b/changelog.d/nonascii-tags.fix new file mode 100644 index 00000000..e4c6dc82 --- /dev/null +++ b/changelog.d/nonascii-tags.fix @@ -0,0 +1 @@ +Fix parsing non-ascii tags diff --git a/src/services/matcher/matcher.service.js b/src/services/matcher/matcher.service.js index b6c4e909..54f02d31 100644 --- a/src/services/matcher/matcher.service.js +++ b/src/services/matcher/matcher.service.js @@ -14,8 +14,11 @@ export const mentionMatchesUrl = (attention, url) => { * @param {string} url */ export const extractTagFromUrl = (url) => { - const regex = /tag[s]*\/(\w+)$/g - const result = regex.exec(url) + const decoded = decodeURI(url) + // https://git.pleroma.social/pleroma/elixir-libraries/linkify/-/blob/master/lib/linkify/parser.ex + // https://www.pcre.org/original/doc/html/pcrepattern.html + const regex = /tag[s]*\/([\p{L}\p{N}_]*[\p{Alphabetic}_·\u{200c}][\p{L}\p{N}_·\p{M}\u{200c}]*)$/ug + const result = regex.exec(decoded) if (!result) { return false } diff --git a/test/unit/specs/services/matcher/matcher.spec.js b/test/unit/specs/services/matcher/matcher.spec.js index 7a2494f0..c6e9719d 100644 --- a/test/unit/specs/services/matcher/matcher.spec.js +++ b/test/unit/specs/services/matcher/matcher.spec.js @@ -78,5 +78,11 @@ describe('MatcherService', () => { expect(MatcherService.extractTagFromUrl(url)).to.eql(false) }) + + it('should return tag name from non-ascii tags', () => { + const url = encodeURI('https://website.com/tag/喵喵喵') + + expect(MatcherService.extractTagFromUrl(url)).to.eql('喵喵喵') + }) }) }) -- cgit v1.2.3-70-g09d2 From 56a74aa3926fb8bfd7241936bef0a13902fb886e Mon Sep 17 00:00:00 2001 From: tusooa Date: Mon, 24 Jul 2023 18:28:02 -0400 Subject: Make MentionsLine aware of line breaking by non-br elements --- changelog.d/mentionsline-shouldbreak.fix | 1 + src/components/rich_content/rich_content.jsx | 54 ++++++++++++++++++---------- 2 files changed, 37 insertions(+), 18 deletions(-) create mode 100644 changelog.d/mentionsline-shouldbreak.fix (limited to 'changelog.d') diff --git a/changelog.d/mentionsline-shouldbreak.fix b/changelog.d/mentionsline-shouldbreak.fix new file mode 100644 index 00000000..33ee8d2c --- /dev/null +++ b/changelog.d/mentionsline-shouldbreak.fix @@ -0,0 +1 @@ +Make MentionsLine aware of line breaking by non-br elements diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index b16ab242..ff14a58a 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -8,6 +8,27 @@ import HashtagLink from 'src/components/hashtag_link/hashtag_link.vue' import './rich_content.scss' +const MAYBE_LINE_BREAKING_ELEMENTS = [ + 'blockquote', + 'br', + 'hr', + 'ul', + 'ol', + 'li', + 'p', + 'table', + 'tbody', + 'td', + 'th', + 'thead', + 'tr', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5' +] + /** * RichContent, The Über-powered component for rendering Post HTML. * @@ -166,25 +187,22 @@ export default { !(children && typeof children[0] === 'string' && children[0].match(/^\s/)) ? lastSpacing : '' - switch (Tag) { - case 'br': + if (MAYBE_LINE_BREAKING_ELEMENTS.includes(Tag)) { + // all the elements that can cause a line change + currentMentions = null + } else if (Tag === 'img') { // replace images with StillImage + return ['', [mentionsLinePadding, renderImage(opener)], ''] + } else if (Tag === 'a' && this.handleLinks) { // replace mentions with MentionLink + if (fullAttrs.class && fullAttrs.class.includes('mention')) { + // Handling mentions here + return renderMention(attrs, children) + } else { currentMentions = null - break - case 'img': // replace images with StillImage - return ['', [mentionsLinePadding, renderImage(opener)], ''] - case 'a': // replace mentions with MentionLink - if (!this.handleLinks) break - if (fullAttrs.class && fullAttrs.class.includes('mention')) { - // Handling mentions here - return renderMention(attrs, children) - } else { - currentMentions = null - break - } - case 'span': - if (this.handleLinks && fullAttrs.class && fullAttrs.class.includes('h-card')) { - return ['', children.map(processItem), ''] - } + } + } else if (Tag === 'span') { + if (this.handleLinks && fullAttrs.class && fullAttrs.class.includes('h-card')) { + return ['', children.map(processItem), ''] + } } if (children !== undefined) { -- cgit v1.2.3-70-g09d2 From 0dc2afb8261fc474bd46bcb1b57ab845fc1baf32 Mon Sep 17 00:00:00 2001 From: tusooa Date: Mon, 24 Jul 2023 19:13:37 -0400 Subject: Fix a bug where mentioning a user twice will not fill the mention into the textarea --- changelog.d/mention-twice.fix | 1 + src/components/post_status_modal/post_status_modal.js | 4 ++++ src/components/post_status_modal/post_status_modal.vue | 2 +- src/modules/postStatus.js | 6 ++++++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 changelog.d/mention-twice.fix (limited to 'changelog.d') diff --git a/changelog.d/mention-twice.fix b/changelog.d/mention-twice.fix new file mode 100644 index 00000000..0e4b71df --- /dev/null +++ b/changelog.d/mention-twice.fix @@ -0,0 +1 @@ +Fix a bug where mentioning a user twice will not fill the mention into the textarea diff --git a/src/components/post_status_modal/post_status_modal.js b/src/components/post_status_modal/post_status_modal.js index b44354db..8970dd9b 100644 --- a/src/components/post_status_modal/post_status_modal.js +++ b/src/components/post_status_modal/post_status_modal.js @@ -44,6 +44,10 @@ const PostStatusModal = { methods: { closeModal () { this.$store.dispatch('closePostStatusModal') + }, + resetAndClose () { + this.$store.dispatch('resetPostStatusModal') + this.$store.dispatch('closePostStatusModal') } } } diff --git a/src/components/post_status_modal/post_status_modal.vue b/src/components/post_status_modal/post_status_modal.vue index dbcd321e..bc2cad4a 100644 --- a/src/components/post_status_modal/post_status_modal.vue +++ b/src/components/post_status_modal/post_status_modal.vue @@ -12,7 +12,7 @@ diff --git a/src/modules/postStatus.js b/src/modules/postStatus.js index 638c1fb2..d3bea137 100644 --- a/src/modules/postStatus.js +++ b/src/modules/postStatus.js @@ -10,6 +10,9 @@ const postStatus = { }, closePostStatusModal (state) { state.modalActivated = false + }, + resetPostStatusModal (state) { + state.params = null } }, actions: { @@ -18,6 +21,9 @@ const postStatus = { }, closePostStatusModal ({ commit }) { commit('closePostStatusModal') + }, + resetPostStatusModal ({ commit }) { + commit('resetPostStatusModal') } } } -- cgit v1.2.3-70-g09d2 From 9baffbfbdeaaf52be95112c519e31ef5f2408180 Mon Sep 17 00:00:00 2001 From: Alexander Tumin Date: Wed, 31 May 2023 00:25:10 +0300 Subject: Fix HTML attribute parsing, discard attributes not strating with a letter --- changelog.d/html-attribute-parsing.fix | 1 + src/services/html_converter/utility.service.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/html-attribute-parsing.fix (limited to 'changelog.d') diff --git a/changelog.d/html-attribute-parsing.fix b/changelog.d/html-attribute-parsing.fix new file mode 100644 index 00000000..0952f773 --- /dev/null +++ b/changelog.d/html-attribute-parsing.fix @@ -0,0 +1 @@ +Fix HTML attribute parsing, discard attributes not strating with a letter diff --git a/src/services/html_converter/utility.service.js b/src/services/html_converter/utility.service.js index a1301353..f8e62dfe 100644 --- a/src/services/html_converter/utility.service.js +++ b/src/services/html_converter/utility.service.js @@ -22,7 +22,7 @@ export const getAttrs = (tag, filter) => { .replace(new RegExp('^' + getTagName(tag)), '') .replace(/\/?$/, '') .trim() - const attrs = Array.from(innertag.matchAll(/([a-z0-9-]+)(?:=("[^"]+?"|'[^']+?'))?/gi)) + const attrs = Array.from(innertag.matchAll(/([a-z]+[a-z0-9-]*)(?:=("[^"]+?"|'[^']+?'))?/gi)) .map(([trash, key, value]) => [key, value]) .map(([k, v]) => { if (!v) return [k, true] -- cgit v1.2.3-70-g09d2 From ac78f801943f22c27cc6e7e9eac7ececb9fa2a5a Mon Sep 17 00:00:00 2001 From: Alexander Tumin Date: Mon, 14 Aug 2023 16:21:43 +0300 Subject: Fix OAuth2 token lingering after revocation --- changelog.d/oauth2-token-linger.fix | 1 + src/modules/users.js | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 changelog.d/oauth2-token-linger.fix (limited to 'changelog.d') diff --git a/changelog.d/oauth2-token-linger.fix b/changelog.d/oauth2-token-linger.fix new file mode 100644 index 00000000..da4e4631 --- /dev/null +++ b/changelog.d/oauth2-token-linger.fix @@ -0,0 +1 @@ +Fix OAuth2 token lingering after revocation diff --git a/src/modules/users.js b/src/modules/users.js index e976d875..50b4cb84 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -651,6 +651,12 @@ const users = { const response = data.error // Authentication failed commit('endLogin') + + // remove authentication token on client/authentication errors + if ([400, 401, 403, 422].includes(response.status)) { + commit('clearToken') + } + if (response.status === 401) { reject(new Error('Wrong username or password')) } else { -- cgit v1.2.3-70-g09d2 From 6e5c7bf308ddcb2be756cb84c6c7119b612e4e28 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 10 Sep 2023 08:22:28 +0200 Subject: Use export-subst gitattribute to allow tarball builds For example it would do the following: let subst = "d3bf557c"; --- .gitattributes | 1 + build/webpack.prod.conf.js | 13 ++++++++++--- changelog.d/export-subst-hash.fix | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .gitattributes create mode 100644 changelog.d/export-subst-hash.fix (limited to 'changelog.d') diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..c5b9ea10 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +/build/webpack.prod.conf.js export-subst diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 7de93721..664290a5 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -11,9 +11,16 @@ var env = process.env.NODE_ENV === 'testing' ? require('../config/test.env') : config.build.env -let commitHash = require('child_process') - .execSync('git rev-parse --short HEAD') - .toString(); +let commitHash = (() => { + let subst = "$Format:%h$"; + if(!subst.match(/Format:/)) { + return subst; + } else { + return require('child_process') + .execSync('git rev-parse --short HEAD') + .toString(); + } +})(); var webpackConfig = merge(baseWebpackConfig, { mode: 'production', diff --git a/changelog.d/export-subst-hash.fix b/changelog.d/export-subst-hash.fix new file mode 100644 index 00000000..fb0d85cb --- /dev/null +++ b/changelog.d/export-subst-hash.fix @@ -0,0 +1 @@ +Use export-subst gitattribute to allow tarball builds -- cgit v1.2.3-70-g09d2 From 765fdbe8ab695820efed0c11f7a869abd0f9ccd1 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 11 Oct 2023 22:49:12 +0300 Subject: changelog --- changelog.d/quote-hide.fix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/quote-hide.fix (limited to 'changelog.d') diff --git a/changelog.d/quote-hide.fix b/changelog.d/quote-hide.fix new file mode 100644 index 00000000..678fc3bc --- /dev/null +++ b/changelog.d/quote-hide.fix @@ -0,0 +1 @@ +don't display quoted status twice -- cgit v1.2.3-70-g09d2 From 8f87a1506964e1b6dafc662f896e4332cd50eee9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 13 Oct 2023 12:37:50 +0300 Subject: oops --- changelog.d/quote-hide-oops.fix | 1 + src/components/status_content/status_content.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/quote-hide-oops.fix (limited to 'changelog.d') diff --git a/changelog.d/quote-hide-oops.fix b/changelog.d/quote-hide-oops.fix new file mode 100644 index 00000000..d93c0d29 --- /dev/null +++ b/changelog.d/quote-hide-oops.fix @@ -0,0 +1 @@ +fix typo in code that prevented cards from showing at all diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index c01b80af..8d8a91dc 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -75,7 +75,7 @@ const StatusContent = { ...controlledOrUncontrolledGetters(['showingTall', 'expandingSubject', 'showingLongSubject']), statusCard () { if (!this.status.card) return null - return this.status.card.url === this.status.quote_url ? null : status.card + return this.status.card.url === this.status.quote_url ? null : this.status.card }, hideAttachments () { return (this.mergedConfig.hideAttachments && !this.inConversation) || -- cgit v1.2.3-70-g09d2 From c9fd9ceb75520716b6481a5827e736c2f77943e7 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 27 Oct 2023 02:48:30 +0300 Subject: changelog --- changelog.d/fix-reports.fix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/fix-reports.fix (limited to 'changelog.d') diff --git a/changelog.d/fix-reports.fix b/changelog.d/fix-reports.fix new file mode 100644 index 00000000..961b8033 --- /dev/null +++ b/changelog.d/fix-reports.fix @@ -0,0 +1 @@ +fix reports now showing reason/content:w -- cgit v1.2.3-70-g09d2