diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2b4452d5..25e499c4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,6 +43,8 @@ lint: test: stage: test + tags: + - amd64 variables: APT_CACHE_DIR: apt-cache script: @@ -54,6 +56,8 @@ test: build: stage: build + tags: + - amd64 script: - yarn - npm run build diff --git a/changelog.d/ci-runner.skip b/changelog.d/ci-runner.skip new file mode 100644 index 00000000..ad4b79d5 --- /dev/null +++ b/changelog.d/ci-runner.skip @@ -0,0 +1 @@ +stop using that one runner for intensive tasks \ No newline at end of file diff --git a/changelog.d/no-preserve-selection-color.fix b/changelog.d/no-preserve-selection-color.fix new file mode 100644 index 00000000..669e744c --- /dev/null +++ b/changelog.d/no-preserve-selection-color.fix @@ -0,0 +1 @@ +Ensure selection text color has enough contrast diff --git a/changelog.d/profile-mentions.fix b/changelog.d/profile-mentions.fix new file mode 100644 index 00000000..3f38ab0c --- /dev/null +++ b/changelog.d/profile-mentions.fix @@ -0,0 +1 @@ +Fix profile mentions causing a 422 error diff --git a/changelog.d/themesv3-on-safari.fix b/changelog.d/themesv3-on-safari.fix new file mode 100644 index 00000000..af767b3a --- /dev/null +++ b/changelog.d/themesv3-on-safari.fix @@ -0,0 +1 @@ +Fix Themes v3 on Safari not working diff --git a/index.html b/index.html index e790fb57..6d9c4ce5 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,8 @@ + + diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 5564b118..563dfb96 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -87,7 +87,8 @@ const PostStatusForm = { 'fileLimit', 'submitOnEnter', 'emojiPickerPlacement', - 'optimisticPosting' + 'optimisticPosting', + 'profileMention' ], emits: [ 'posted', @@ -125,7 +126,7 @@ const PostStatusForm = { const { scopeCopy } = this.$store.getters.mergedConfig - if (this.replyTo) { + if (this.replyTo || this.profileMention) { const currentUser = this.$store.state.users.currentUser statusText = buildMentionsString({ user: this.repliedUser, attentions: this.attentions }, currentUser) } diff --git a/src/components/root.style.js b/src/components/root.style.js index 3e840a52..f9bdf16e 100644 --- a/src/components/root.style.js +++ b/src/components/root.style.js @@ -37,7 +37,7 @@ export default { // Selection colors '--selectionBackground': 'color | --accent', - '--selectionText': 'color | $textColor(--accent, --text)' + '--selectionText': 'color | $textColor(--accent, --text, no-preserve)' } } ] diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index e17bf8eb..b1fe2e8f 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -225,7 +225,7 @@ export default { this.$store.dispatch('setCurrentMedia', attachment) }, mentionUser () { - this.$store.dispatch('openPostStatusModal', { replyTo: true, repliedUser: this.user }) + this.$store.dispatch('openPostStatusModal', { profileMention: true, repliedUser: this.user }) }, onAvatarClickHandler (e) { if (this.onAvatarClick) { diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js index 126b6946..9e068a1e 100644 --- a/src/services/style_setter/style_setter.js +++ b/src/services/style_setter/style_setter.js @@ -6,6 +6,45 @@ import { getCssRules } from '../theme_data/css_utils.js' import { defaultState } from '../../modules/config.js' import { chunk } from 'lodash' +// On platforms where this is not supported, it will return undefined +// Otherwise it will return an array +const supportsAdoptedStyleSheets = !!document.adoptedStyleSheets + +const createStyleSheet = (id) => { + if (supportsAdoptedStyleSheets) { + return { + el: null, + sheet: new CSSStyleSheet(), + rules: [] + } + } + + const el = document.getElementById(id) + // Clear all rules in it + for (let i = el.sheet.cssRules.length - 1; i >= 0; --i) { + el.sheet.deleteRule(i) + } + + return { + el, + sheet: el.sheet, + rules: [] + } +} + +const EAGER_STYLE_ID = 'pleroma-eager-styles' +const LAZY_STYLE_ID = 'pleroma-lazy-styles' + +const adoptStyleSheets = (styles) => { + if (supportsAdoptedStyleSheets) { + document.adoptedStyleSheets = styles.map(s => s.sheet) + } + // Some older browsers do not support document.adoptedStyleSheets. + // In this case, we use the