diff --git a/changelog.d/mute-dropdown.fix b/changelog.d/mute-dropdown.fix deleted file mode 100644 index 33f12a571..000000000 --- a/changelog.d/mute-dropdown.fix +++ /dev/null @@ -1 +0,0 @@ -Fixed status action mute hiding itself on click diff --git a/changelog.d/quote-by-url.add b/changelog.d/quote-by-url.add deleted file mode 100644 index ef401f93c..000000000 --- a/changelog.d/quote-by-url.add +++ /dev/null @@ -1 +0,0 @@ -Add quoting by URL and in replies diff --git a/src/components/chat/chat.vue b/src/components/chat/chat.vue index cedbdce69..dfd197e56 100644 --- a/src/components/chat/chat.vue +++ b/src/components/chat/chat.vue @@ -73,7 +73,6 @@ :disable-notice="true" :disable-lock-warning="true" :disable-polls="true" - :disable-quotes="true" :disable-sensitivity-checkbox="true" :disable-submit="errorLoadingChat || !currentChat" :disable-preview="true" diff --git a/src/components/draft/draft.js b/src/components/draft/draft.js index 45786614e..ffc299af6 100644 --- a/src/components/draft/draft.js +++ b/src/components/draft/draft.js @@ -45,12 +45,7 @@ const Draft = { } }, safeToSave() { - return ( - this.draft.status || - this.draft.files?.length || - this.draft.hasPoll || - this.draft.hasQuote - ) + return this.draft.status || this.draft.files?.length || this.draft.hasPoll }, postStatusFormProps() { return { diff --git a/src/components/edit_status_form/edit_status_form.vue b/src/components/edit_status_form/edit_status_form.vue index 1452be422..0a7ec760a 100644 --- a/src/components/edit_status_form/edit_status_form.vue +++ b/src/components/edit_status_form/edit_status_form.vue @@ -4,7 +4,6 @@ v-bind="params" :post-handler="doEditStatus" :disable-polls="true" - :disable-quotes="true" :disable-visibility-selector="true" /> diff --git a/src/components/mrf_transparency_panel/mrf_transparency_panel.js b/src/components/mrf_transparency_panel/mrf_transparency_panel.js index d77a0a839..b387bcf4c 100644 --- a/src/components/mrf_transparency_panel/mrf_transparency_panel.js +++ b/src/components/mrf_transparency_panel/mrf_transparency_panel.js @@ -24,6 +24,7 @@ const MRFTransparencyPanel = { mrfPolicies: (state) => get(state, 'federationPolicy.mrf_policies', []), quarantineInstances: (state) => + console.log(state) || toInstanceReasonObject( get(state, 'federationPolicy.quarantined_instances', []), get( diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index d08a8b9c2..7ebbeeaeb 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -15,7 +15,6 @@ import EmojiInput from '../emoji_input/emoji_input.vue' import suggestor from '../emoji_input/suggestor.js' import MediaUpload from '../media_upload/media_upload.vue' import PollForm from '../poll/poll_form.vue' -import QuoteForm from '../quote/quote_form.vue' import ScopeSelector from '../scope_selector/scope_selector.vue' import Select from '../select/select.vue' import StatusContent from '../status_content/status_content.vue' @@ -38,7 +37,6 @@ import { faChevronRight, faCircleNotch, faPollH, - faQuoteRight, faSmileBeam, faTimes, faUpload, @@ -48,7 +46,6 @@ library.add( faSmileBeam, faPollH, faUpload, - faQuoteRight, faBan, faTimes, faCircleNotch, @@ -110,7 +107,6 @@ const PostStatusForm = { 'disableNotice', 'disableLockWarning', 'disablePolls', - 'disableQuotes', 'disableSensitivityCheckbox', 'disableSubmit', 'disablePreview', @@ -142,7 +138,6 @@ const PostStatusForm = { MediaUpload, EmojiInput, PollForm, - QuoteForm, ScopeSelector, Checkbox, Select, @@ -152,9 +147,6 @@ const PostStatusForm = { DraftCloser, Popover, }, - created() { - this.initQuote() - }, mounted() { this.updateIdempotencyKey() this.resize(this.$refs.textarea) @@ -213,8 +205,6 @@ const PostStatusForm = { files: [], poll: {}, hasPoll: false, - hasQuote: false, - quote: {}, mediaDescriptions: {}, visibility: scope, contentType, @@ -232,8 +222,6 @@ const PostStatusForm = { files: this.statusFiles || [], poll: this.statusPoll || {}, hasPoll: false, - hasQuote: false, - quote: {}, mediaDescriptions: this.statusMediaDescriptions || {}, visibility: this.statusScope || scope, contentType: statusContentType, @@ -360,28 +348,12 @@ const PostStatusForm = { isEdit() { return typeof this.statusId !== 'undefined' && this.statusId.trim() !== '' }, - quotingAvailable() { + quotable() { if (!useInstanceCapabilitiesStore().quotingAvailable) { return false } - return this.disableQuotes !== true - }, - isReply() { - return this.newStatus.type === 'reply' - }, - quotable() { - return this.quotingAvailable && this.replyTo - }, - quoteThreadToggled() { - return this.newStatus.hasQuote && this.newStatus.quote.thread - }, - defaultQuotable() { - if ( - !this.quotingAvailable || - !this.isReply || - !this.$store.getters.mergedConfig.quoteReply - ) { + if (!this.replyTo) { return false } @@ -403,25 +375,12 @@ const PostStatusForm = { return false }, - inReplyStatusId() { - return !this.newStatus.hasQuote || - !this.newStatus.quote.thread || - !this.newStatus.quote.id - ? this.replyTo - : undefined - }, - quoteId() { - return this.newStatus.hasQuote ? this.newStatus.quote.id : undefined - }, debouncedMaybeAutoSaveDraft() { return debounce(this.maybeAutoSaveDraft, 3000) }, pollFormVisible() { return this.newStatus.hasPoll }, - quoteFormVisible() { - return this.newStatus.hasQuote && !this.newStatus.quote.thread - }, shouldAutoSaveDraft() { return useMergedConfigStore().mergedConfig.autoSaveDraft }, @@ -439,8 +398,7 @@ const PostStatusForm = { (this.newStatus.status || this.newStatus.spoilerText || this.newStatus.files?.length || - this.newStatus.hasPoll || - this.newStatus.hasQuote) && + this.newStatus.hasPoll) && this.saveable ) }, @@ -451,8 +409,7 @@ const PostStatusForm = { this.newStatus.status || this.newStatus.spoilerText || this.newStatus.files?.length || - this.newStatus.hasPoll || - this.newStatus.hasQuote + this.newStatus.hasPoll ) ) }, @@ -502,13 +459,11 @@ const PostStatusForm = { contentType: newStatus.contentType, poll: {}, hasPoll: false, - hasQuote: false, - quote: {}, mediaDescriptions: {}, + quoting: false, } this.$refs.mediaUpload && this.$refs.mediaUpload.clearFile() this.clearPollForm() - this.clearQuoteForm() if (this.preserveFocus) { this.$nextTick(() => { this.$refs.textarea.focus() @@ -548,7 +503,9 @@ const PostStatusForm = { return } - const poll = newStatus.hasPoll ? pollFormToMasto(newStatus.poll) : {} + const poll = this.newStatus.hasPoll + ? pollFormToMasto(this.newStatus.poll) + : {} if (this.pollContentError) { this.error = this.pollContentError return @@ -564,6 +521,10 @@ const PostStatusForm = { return } + const replyOrQuoteAttr = newStatus.quoting + ? 'quoteId' + : 'inReplyToStatusId' + const postingOptions = { status: newStatus.status, spoilerText: newStatus.spoilerText || null, @@ -571,8 +532,7 @@ const PostStatusForm = { sensitive: newStatus.nsfw, media: newStatus.files, store: this.$store, - inReplyToStatusId: this.inReplyStatusId, - quoteId: this.quoteId, + [replyOrQuoteAttr]: this.replyTo, contentType: newStatus.contentType, poll, idempotencyKey: this.idempotencyKey, @@ -601,7 +561,9 @@ const PostStatusForm = { } const newStatus = this.newStatus this.previewLoading = true - + const replyOrQuoteAttr = newStatus.quoting + ? 'quoteId' + : 'inReplyToStatusId' statusPoster .postStatus({ status: newStatus.status, @@ -610,8 +572,7 @@ const PostStatusForm = { sensitive: newStatus.nsfw, media: [], store: this.$store, - inReplyToStatusId: this.inReplyStatusId, - quoteId: this.quoteId, + [replyOrQuoteAttr]: this.replyTo, contentType: newStatus.contentType, poll: {}, preview: true, @@ -855,32 +816,6 @@ const PostStatusForm = { this.$refs.pollForm.clear() } }, - initQuote() { - const quote = this.newStatus.quote - - if (Object.keys(quote).length > 0) { - return - } - - const quotable = this.defaultQuotable - - quote.id = quotable ? this.replyTo : '' - quote.url = '' - quote.thread = quotable - }, - setQuoteThread(v) { - this.newStatus.hasQuote = v - this.newStatus.quote.thread = v - this.newStatus.quote.id = v ? this.replyTo : '' - }, - clearQuoteForm() { - if (this.$refs.quoteForm) { - this.$refs.quoteForm.clear() - } - }, - toggleQuoteForm() { - this.newStatus.hasQuote = !this.newStatus.hasQuote - }, dismissScopeNotice() { useSyncConfigStore().setSimplePrefAndSave({ path: 'hideScopeNotice', diff --git a/src/components/post_status_form/post_status_form.scss b/src/components/post_status_form/post_status_form.scss index 684a92267..c7fdb0806 100644 --- a/src/components/post_status_form/post_status_form.scss +++ b/src/components/post_status_form/post_status_form.scss @@ -136,17 +136,11 @@ .poll-icon { order: 3; - justify-content: center; - } - - .quote-icon { - order: 4; justify-content: right; } .media-upload-icon, .poll-icon, - .quote-icon, .emoji-icon { font-size: 1.85em; line-height: 1.1; diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 5fdde4784..fe37394f5 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -115,26 +115,24 @@ @@ -272,13 +270,6 @@ :visible="pollFormVisible" :params="newStatus.poll" /> - -
+ + +

+ + + +

loggedIn, - toggleable: false, + toggleable: true, dropdown: true, - action({ status, dispatch, emit }) { - /* prevent hiding */ - }, + // action ({ status, dispatch, emit }) { + // } }, { // ========= diff --git a/src/components/status_action_buttons/status_action_buttons.scss b/src/components/status_action_buttons/status_action_buttons.scss index 3bbcdeefb..23b86e5bd 100644 --- a/src/components/status_action_buttons/status_action_buttons.scss +++ b/src/components/status_action_buttons/status_action_buttons.scss @@ -6,7 +6,7 @@ grid-template-columns: repeat(auto-fill, minmax(10%, 3em)); grid-auto-flow: row dense; grid-auto-rows: 1fr; - grid-gap: 1.25em 0; + grid-gap: 1.25em 1em; margin-top: var(--status-margin); } diff --git a/src/i18n/en.json b/src/i18n/en.json index 7851c297c..0165af240 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -284,7 +284,6 @@ "new_status": "Post new status", "reply_option": "Reply to this status", "quote_option": "Quote this status", - "quote_url": "Link to quoted post", "account_not_locked_warning": "Your account is not {0}. Anyone can follow you to view your follower-only posts.", "account_not_locked_warning_link": "locked", "attachments_sensitive": "Mark attachments as sensitive", @@ -1766,7 +1765,6 @@ "favorite": "Favorite", "unfavorite": "Unfavorite", "add_reaction": "Add Reaction", - "add_quote": "Add quote", "user_settings": "User Settings", "accept_follow_request": "Accept follow request", "reject_follow_request": "Reject follow request", diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 2e2ca5a5c..48f8b9e8a 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -693,7 +693,7 @@ const fetchStatus = ({ id, credentials }) => { if (data.ok) { return data } - throw new Error('Error fetching timeline', { cause: data }) + throw new Error('Error fetching timeline', data) }) .then((data) => data.json()) .then((data) => parseStatus(data)) @@ -706,7 +706,7 @@ const fetchStatusSource = ({ id, credentials }) => { if (data.ok) { return data } - throw new Error('Error fetching source', { cause: data }) + throw new Error('Error fetching source', data) }) .then((data) => data.json()) .then((data) => parseSource(data)) diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 8fb98bc9b..bcc27e8cb 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -384,7 +384,7 @@ export const parseStatus = (data) => { } output.summary_raw_html = escapeHtml(data.spoiler_text) - output.external_url = data.uri || data.url + output.external_url = data.url output.poll = data.poll if (output.poll) { output.poll.options = (output.poll.options || []).map((field) => ({