From 79d02bddbe2b77574844b8ade7a09043c31b1c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 13 Feb 2022 19:07:49 +0100 Subject: [PATCH 001/965] Birthdays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/components/settings_modal/tabs/profile_tab.js | 6 +++++- .../settings_modal/tabs/profile_tab.scss | 5 +++++ src/components/settings_modal/tabs/profile_tab.vue | 12 ++++++++++++ src/components/user_profile/user_profile.js | 11 +++++++++-- src/components/user_profile/user_profile.vue | 14 ++++++++++++++ src/i18n/en.json | 5 +++++ src/i18n/pl.json | 9 +++++++-- .../entity_normalizer/entity_normalizer.service.js | 3 +++ 8 files changed, 60 insertions(+), 5 deletions(-) diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js index 64079fcd..0ae95dbd 100644 --- a/src/components/settings_modal/tabs/profile_tab.js +++ b/src/components/settings_modal/tabs/profile_tab.js @@ -29,6 +29,8 @@ const ProfileTab = { newLocked: this.$store.state.users.currentUser.locked, newNoRichText: this.$store.state.users.currentUser.no_rich_text, newDefaultScope: this.$store.state.users.currentUser.default_scope, + newBirthday: this.$store.state.users.currentUser.birthday, + showBirthday: this.$store.state.users.currentUser.show_birthday, newFields: this.$store.state.users.currentUser.fields.map(field => ({ name: field.name, value: field.value })), hideFollows: this.$store.state.users.currentUser.hide_follows, hideFollowers: this.$store.state.users.currentUser.hide_followers, @@ -132,7 +134,9 @@ const ProfileTab = { allow_following_move: this.allowFollowingMove, hide_follows_count: this.hideFollowsCount, hide_followers_count: this.hideFollowersCount, - show_role: this.showRole + show_role: this.showRole, + birthday: this.newBirthday || null, + show_birthday: this.showBirthday /* eslint-enable camelcase */ } }).then((user) => { this.newFields.splice(user.fields.length) diff --git a/src/components/settings_modal/tabs/profile_tab.scss b/src/components/settings_modal/tabs/profile_tab.scss index 111eaed3..24287511 100644 --- a/src/components/settings_modal/tabs/profile_tab.scss +++ b/src/components/settings_modal/tabs/profile_tab.scss @@ -124,4 +124,9 @@ padding: 0 0.5em; } } + + .birthday-input { + display: block; + margin-bottom: 1em; + } } diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue index bb3c301d..9b92056d 100644 --- a/src/components/settings_modal/tabs/profile_tab.vue +++ b/src/components/settings_modal/tabs/profile_tab.vue @@ -95,6 +95,18 @@ {{ $t('settings.discoverable') }}

+
+

{{ $t('settings.birthday.label') }}

+ + + {{ $t('settings.birthday.show_birthday') }} + +

{{ $t('settings.profile_fields.label') }}

+ + + {{ $t('user_card.birthday', { birthday: formattedBirthday }) }} + From f8a0cd2dd3e298b2a771d786033a7c29df8dcbfc Mon Sep 17 00:00:00 2001 From: Xnuk Shuman Date: Tue, 20 Dec 2022 02:34:11 +0900 Subject: [PATCH 004/965] vertical centering the checkbox --- src/components/checkbox/checkbox.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/checkbox/checkbox.vue b/src/components/checkbox/checkbox.vue index b6768d67..d7839e82 100644 --- a/src/components/checkbox/checkbox.vue +++ b/src/components/checkbox/checkbox.vue @@ -39,20 +39,23 @@ export default { display: inline-block; min-height: 1.2em; + & > * { + vertical-align: middle; + } + &-indicator { + display: inline-block; position: relative; - padding-left: 1.2em; + width: 1.2em; + height: 1.2em; } &-indicator::before { position: absolute; - right: 0; - top: 0; + inset: 0; display: block; content: '✓'; transition: color 200ms; - width: 1.1em; - height: 1.1em; border-radius: $fallback--checkboxRadius; border-radius: var(--checkboxRadius, $fallback--checkboxRadius); box-shadow: 0px 0px 2px black inset; From b7e93739656d225ed0a8854f357746b5291b6857 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Mon, 25 Jul 2022 15:38:05 -0400 Subject: [PATCH 005/965] Add support for multiple interface languages --- .../interface_language_switcher.vue | 75 +++++++++++++++---- .../settings_modal/tabs/profile_tab.js | 4 +- src/i18n/messages.js | 26 ++++++- src/modules/config.js | 5 +- src/services/locale/locale.service.js | 5 ++ 5 files changed, 92 insertions(+), 23 deletions(-) diff --git a/src/components/interface_language_switcher/interface_language_switcher.vue b/src/components/interface_language_switcher/interface_language_switcher.vue index 6997f149..e18a2a12 100644 --- a/src/components/interface_language_switcher/interface_language_switcher.vue +++ b/src/components/interface_language_switcher/interface_language_switcher.vue @@ -1,21 +1,39 @@ @@ -34,7 +52,7 @@ export default { required: true }, language: { - type: String, + type: [Array, String], required: true }, setLanguage: { @@ -48,7 +66,9 @@ export default { }, controlledLanguage: { - get: function () { return this.language }, + get: function () { + return Array.isArray(this.language) ? this.language : [this.language] + }, set: function (val) { this.setLanguage(val) } @@ -58,7 +78,30 @@ export default { methods: { getLanguageName (code) { return localeService.getLanguageName(code) + }, + addLanguage () { + this.controlledLanguage = [...this.controlledLanguage, ''] + }, + setLanguageAt (index, val) { + const lang = [...this.controlledLanguage] + lang[index] = val + this.controlledLanguage = lang + }, + removeLanguageAt (index) { + const lang = [...this.controlledLanguage] + lang.splice(index, 1) + this.controlledLanguage = lang } } } + + diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js index b86faef0..d5977461 100644 --- a/src/components/settings_modal/tabs/profile_tab.js +++ b/src/components/settings_modal/tabs/profile_tab.js @@ -43,7 +43,7 @@ const ProfileTab = { bannerPreview: null, background: null, backgroundPreview: null, - emailLanguage: this.$store.state.users.currentUser.language || '' + emailLanguage: this.$store.state.users.currentUser.language || [''] } }, components: { @@ -130,7 +130,7 @@ const ProfileTab = { } if (this.emailLanguage) { - params.language = localeService.internalToBackendLocale(this.emailLanguage) + params.language = localeService.internalToBackendLocaleMulti(this.emailLanguage) } this.$store.state.api.backendInteractor diff --git a/src/i18n/messages.js b/src/i18n/messages.js index 74a89ca8..849d98fd 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -7,8 +7,11 @@ // sed -i -e "s/'//gm" -e 's/"/\\"/gm' -re 's/^( +)(.+?): ((.+?))?(,?)(\{?)$/\1"\2": "\4"/gm' -e 's/\"\{\"/{/g' -e 's/,"$/",/g' file.json // There's only problem that apostrophe character ' gets replaced by \\ so you have to fix it manually, sorry. +import { isEqual } from 'lodash' import { languages, langCodeToJsonName } from './languages.js' +const ULTIMATE_FALLBACK_LOCALE = 'en' + const hasLanguageFile = (code) => languages.includes(code) const loadLanguageFile = (code) => { @@ -25,11 +28,26 @@ const messages = { en: require('./en.json').default }, setLanguage: async (i18n, language) => { - if (hasLanguageFile(language)) { - const messages = await loadLanguageFile(language) - i18n.setLocaleMessage(language, messages.default) + const languages = (Array.isArray(language) ? language : [language]).filter(k => k) + + if (!languages.includes(ULTIMATE_FALLBACK_LOCALE)) { + languages.push(ULTIMATE_FALLBACK_LOCALE) } - i18n.locale = language + const [first, ...rest] = languages + + if (first === i18n.locale && isEqual(rest, i18n.fallbackLocale)) { + return + } + + for (const lang of languages) { + if (hasLanguageFile(lang)) { + const messages = await loadLanguageFile(lang) + i18n.setLocaleMessage(lang, messages.default) + } + } + + i18n.fallbackLocale = rest + i18n.locale = first } } diff --git a/src/modules/config.js b/src/modules/config.js index 3cd6888f..1a0e0fc8 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -184,7 +184,10 @@ const config = { case 'interfaceLanguage': messages.setLanguage(this.getters.i18n, value) dispatch('loadUnicodeEmojiData', value) - Cookies.set(BACKEND_LANGUAGE_COOKIE_NAME, localeService.internalToBackendLocale(value)) + Cookies.set( + BACKEND_LANGUAGE_COOKIE_NAME, + localeService.internalToBackendLocaleMulti(value) + ) break case 'thirdColumnMode': dispatch('setLayoutWidth', undefined) diff --git a/src/services/locale/locale.service.js b/src/services/locale/locale.service.js index d3389785..a4af8b90 100644 --- a/src/services/locale/locale.service.js +++ b/src/services/locale/locale.service.js @@ -11,6 +11,10 @@ const specialLanguageCodes = { const internalToBrowserLocale = code => specialLanguageCodes[code] || code const internalToBackendLocale = code => internalToBrowserLocale(code).replace('_', '-') +const internalToBackendLocaleMulti = codes => { + const langs = Array.isArray(codes) ? codes : [codes] + return langs.map(internalToBackendLocale).join(',') +} const getLanguageName = (code) => { const specialLanguageNames = { @@ -28,6 +32,7 @@ const languages = _.map(languagesObject.languages, (code) => ({ code, name: getL const localeService = { internalToBrowserLocale, internalToBackendLocale, + internalToBackendLocaleMulti, languages, getLanguageName } From 52eef2eed1767cd4061d1c3c94475429b2924952 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Mon, 25 Jul 2022 15:38:31 -0400 Subject: [PATCH 006/965] Add English translations for multiple interface languages --- src/i18n/en.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/i18n/en.json b/src/i18n/en.json index 59ee1c17..9abfae67 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -334,6 +334,8 @@ "select_all": "Select all" }, "settings": { + "add_language": "Add another language", + "remove_language": "Remove", "app_name": "App name", "expert_mode": "Show advanced", "save": "Save changes", From 7e2ae2ba9565a58944fe8915f054f8eef812ee54 Mon Sep 17 00:00:00 2001 From: tusooa Date: Fri, 23 Dec 2022 23:02:21 -0500 Subject: [PATCH 007/965] Optimize UI --- .../interface_language_switcher.vue | 37 +++++++++++-------- src/i18n/en.json | 4 +- src/modules/instance.js | 9 ++++- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/components/interface_language_switcher/interface_language_switcher.vue b/src/components/interface_language_switcher/interface_language_switcher.vue index e18a2a12..c9e7506b 100644 --- a/src/components/interface_language_switcher/interface_language_switcher.vue +++ b/src/components/interface_language_switcher/interface_language_switcher.vue @@ -3,29 +3,34 @@ -
    +
    • - - {{ lang.name }} - - + + + + > + {{ $t('settings.remove_language') }} +
    • -
+
diff --git a/src/i18n/en.json b/src/i18n/en.json index 9abfae67..7df42d92 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -334,8 +334,10 @@ "select_all": "Select all" }, "settings": { - "add_language": "Add another language", + "add_language": "Add fallback language", "remove_language": "Remove", + "primary_language": "Primary language:", + "fallback_language": "Fallback language {index}:", "app_name": "App name", "expert_mode": "Show advanced", "save": "Save changes", diff --git a/src/modules/instance.js b/src/modules/instance.js index 3b15e62e..bff26151 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -273,8 +273,13 @@ const instance = { langList .map(async lang => { if (!state.unicodeEmojiAnnotations[lang]) { - const annotations = await loadAnnotations(lang) - commit('setUnicodeEmojiAnnotations', { lang, annotations }) + try { + const annotations = await loadAnnotations(lang) + commit('setUnicodeEmojiAnnotations', { lang, annotations }) + } catch (e) { + console.warn(`Error loading unicode emoji annotations for ${lang}: `, e) + // ignore + } } })) }, From 8d79a6b906f03e29bd435d290841ee85c5ab2657 Mon Sep 17 00:00:00 2001 From: Pleroma Renovate Bot Date: Thu, 5 Jan 2023 09:08:27 +0000 Subject: [PATCH 008/965] Update dependency @vue/test-utils to v2.2.7 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 671a1fc2..e04a2d31 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@vue/babel-helper-vue-jsx-merge-props": "1.4.0", "@vue/babel-plugin-jsx": "1.1.1", "@vue/compiler-sfc": "3.2.45", - "@vue/test-utils": "2.2.6", + "@vue/test-utils": "2.2.7", "autoprefixer": "10.4.13", "babel-loader": "9.1.0", "babel-plugin-lodash": "3.3.4", diff --git a/yarn.lock b/yarn.lock index e2be4668..c6b08650 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2239,10 +2239,10 @@ resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.45.tgz#a3fffa7489eafff38d984e23d0236e230c818bc2" integrity sha512-Ewzq5Yhimg7pSztDV+RH1UDKBzmtqieXQlpTVm2AwraoRL/Rks96mvd8Vgi7Lj+h+TH8dv7mXD3FRZR3TUvbSg== -"@vue/test-utils@2.2.6": - version "2.2.6" - resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-2.2.6.tgz#23d85b81d05be36f12aa802459a7876457dec795" - integrity sha512-64zHtJZdG7V/U2L0j/z3Pt5bSygccI3xs+Kl7LB73AZK4MQ8WONJhqDQPK8leUFFA9CmmoJygeky7zcl2hX10A== +"@vue/test-utils@2.2.7": + version "2.2.7" + resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-2.2.7.tgz#0d93d635031a4cca2de70b825aef3fe20a41e702" + integrity sha512-BMuoruUFTEqhLoOgsMcgNVMiByYbfHCKGr2C4CPdGtz/affUtDVX5zr1RnPuq0tYSiaqq+Enw5voUpG6JY8Q7g== "@vuelidate/core@2.0.0": version "2.0.0" From c25542d374d87c4350813d452b620859db13e989 Mon Sep 17 00:00:00 2001 From: Pleroma Renovate Bot Date: Fri, 6 Jan 2023 09:07:32 +0000 Subject: [PATCH 009/965] Update dependency nightwatch to v2.6.6 --- package.json | 2 +- yarn.lock | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 671a1fc2..98473f10 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "lodash": "4.17.21", "mini-css-extract-plugin": "2.7.2", "mocha": "10.2.0", - "nightwatch": "2.6.4", + "nightwatch": "2.6.6", "opn": "5.5.0", "ora": "0.4.1", "postcss": "8.4.20", diff --git a/yarn.lock b/yarn.lock index e2be4668..21d1c6c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2653,10 +2653,10 @@ autoprefixer@^9.8.6: postcss "^7.0.32" postcss-value-parser "^4.1.0" -axe-core@^4.4.3: - version "4.6.1" - resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.6.1.tgz#79cccdee3e3ab61a8f42c458d4123a6768e6fbce" - integrity sha512-lCZN5XRuOnpG4bpMq8v0khrWtUOn+i8lZSb6wHZH56ZfbIEv6XwJV84AAueh9/zi7qPVJ/E4yz6fmsiyOmXR4w== +axe-core@^4.6.1: + version "4.6.2" + resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.6.2.tgz#6e566ab2a3d29e415f5115bc0fd2597a5eb3e5e3" + integrity sha512-b1WlTV8+XKLj9gZy2DZXgQiyDp9xkkoe2a6U6UbYccScq2wgH/YwCeI2/Jq2mgo0HzQxqJOjWZBLeA/mqsk5Mg== axios@^1.1.3: version "1.2.2" @@ -6493,17 +6493,17 @@ neo-async@^2.6.2: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -nightwatch-axe-verbose@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/nightwatch-axe-verbose/-/nightwatch-axe-verbose-2.0.3.tgz#719f0a1b53d611fa2b4872ee5730f5c0ad2c0cec" - integrity sha512-VxwYTXmdbWZ4GRxgAc0/6uZ1nDQ5/xnXUipLrxoUsLxrh9OjNmAwqlMsIlQN8o33XwbjGm+o9ikan5erYGEOFQ== +nightwatch-axe-verbose@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/nightwatch-axe-verbose/-/nightwatch-axe-verbose-2.1.0.tgz#3a03f70dd9b78739a5178ee096a24e0658a8ee53" + integrity sha512-j31VB0wdv/HXoQWWAJsvNc9UenXzXf1u/QsvExCUDuFOMR4GRg3963wlPIxd2ME47egXsnkXPd1dl8Ozdk7XHA== dependencies: - axe-core "^4.4.3" + axe-core "^4.6.1" -nightwatch@2.6.4: - version "2.6.4" - resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-2.6.4.tgz#dfc981b7e335ba29b21f4663b1502e6e2ddb1215" - integrity sha512-ODw1tzkWD6T7RziDkcb9TG5CS5NFK00mAsQZkzb1Q4EWUBYkZRnUgA+WdilHJ3FupwgOQuobpXNTFCrhiE63Pg== +nightwatch@2.6.6: + version "2.6.6" + resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-2.6.6.tgz#f811b8c534206a33c88a2d2c86713b4eb5691b58" + integrity sha512-Vris8WRfRWACW4g58bSiC5nFmPsBKyg2mkb/qpPpYg7bBB5Y7nsnpSnsZvxJm6hocfWtbKtx4y+AUR7Pun4rpg== dependencies: "@nightwatch/chai" "5.0.2" "@nightwatch/html-reporter-template" "0.1.3" @@ -6529,7 +6529,7 @@ nightwatch@2.6.4: minimist "1.2.6" mkpath "1.0.0" mocha "9.2.2" - nightwatch-axe-verbose "2.0.3" + nightwatch-axe-verbose "^2.1.0" open "8.4.0" ora "5.4.1" selenium-webdriver "4.6.1" From 76019d1e0349ecf170d660b8324145677b1e472c Mon Sep 17 00:00:00 2001 From: tusooa Date: Fri, 6 Jan 2023 13:14:38 -0500 Subject: [PATCH 010/965] Fix emoji picker off-by-1 error --- src/components/emoji_picker/emoji_picker.js | 2 +- src/components/emoji_picker/emoji_picker.scss | 2 +- src/components/emoji_picker/emoji_picker.vue | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index 4a447905..0d7ca812 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -244,7 +244,7 @@ const EmojiPicker = { if (!this.$refs['emoji-groups']) { return } - this.width = this.$refs['emoji-groups'].$el.offsetWidth + this.width = this.$refs['emoji-groups'].$el.clientWidth }) } }, diff --git a/src/components/emoji_picker/emoji_picker.scss b/src/components/emoji_picker/emoji_picker.scss index dda12197..848d435a 100644 --- a/src/components/emoji_picker/emoji_picker.scss +++ b/src/components/emoji_picker/emoji_picker.scss @@ -7,7 +7,7 @@ $emoji-picker-emoji-size: 32px; .emoji-picker { width: 25em; - max-width: 100vw; + max-width: calc(100vw - 20px); // popover gives 10px margin from window edge display: flex; flex-direction: column; background-color: $fallback--bg; diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue index 453ecdfc..ca90bf26 100644 --- a/src/components/emoji_picker/emoji_picker.vue +++ b/src/components/emoji_picker/emoji_picker.vue @@ -83,6 +83,7 @@ :emit-update="true" @update="onScroll" @visible="recalculateItemPerRow" + @resize="recalculateItemPerRow" > - - diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 218aa6b3..973a5935 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -80,7 +80,8 @@ diff --git a/src/components/attachment/attachment.scss b/src/components/attachment/attachment.scss index b2dea98d..cf38d45b 100644 --- a/src/components/attachment/attachment.scss +++ b/src/components/attachment/attachment.scss @@ -1,4 +1,4 @@ -@import '../../_variables.scss'; +@import "../../variables"; .Attachment { display: inline-flex; @@ -102,14 +102,13 @@ padding-top: 0.5em; } - .play-icon { position: absolute; font-size: 64px; top: calc(50% - 32px); left: calc(50% - 32px); - color: rgba(255, 255, 255, 0.75); - text-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + color: rgb(255 255 255 / 75%); + text-shadow: 0 0 2px rgb(0 0 0 / 40%); &::before { margin: 0; @@ -135,18 +134,32 @@ margin-left: 0.5em; font-size: 1.25em; // TODO: theming? hard to theme with unknown background image color - background: rgba(230, 230, 230, 0.7); + background: rgb(230 230 230 / 70%); .svg-inline--fa { - color: rgba(0, 0, 0, 0.6); + color: rgb(0 0 0 / 60%); } &:hover .svg-inline--fa { - color: rgba(0, 0, 0, 0.9); + color: rgb(0 0 0 / 90%); } } } + &.-contain-fit { + img, + canvas { + object-fit: contain; + } + } + + &.-cover-fit { + img, + canvas { + object-fit: cover; + } + } + .oembed-container { line-height: 1.2em; flex: 1 0 100%; @@ -160,8 +173,9 @@ .image { flex: 1; + img { - border: 0px; + border: 0; border-radius: 5px; height: 100%; object-fit: cover; @@ -172,9 +186,10 @@ flex: 2; margin: 8px; word-break: break-all; + h1 { font-size: 1rem; - margin: 0px; + margin: 0; } } } @@ -251,18 +266,4 @@ &.-loading { cursor: progress; } - - &.-contain-fit { - img, - canvas { - object-fit: contain; - } - } - - &.-cover-fit { - img, - canvas { - object-fit: cover; - } - } } diff --git a/src/components/autosuggest/autosuggest.vue b/src/components/autosuggest/autosuggest.vue index f283ab82..7b7102fd 100644 --- a/src/components/autosuggest/autosuggest.vue +++ b/src/components/autosuggest/autosuggest.vue @@ -24,7 +24,7 @@ diff --git a/src/components/chat_list/chat_list.vue b/src/components/chat_list/chat_list.vue index 1248c4c8..27a475ed 100644 --- a/src/components/chat_list/chat_list.vue +++ b/src/components/chat_list/chat_list.vue @@ -45,7 +45,7 @@ diff --git a/src/components/chat_message/chat_message.scss b/src/components/chat_message/chat_message.scss index 1913479f..fd5b7aa4 100644 --- a/src/components/chat_message/chat_message.scss +++ b/src/components/chat_message/chat_message.scss @@ -1,12 +1,12 @@ -@import '../../_variables.scss'; +@import "../../variables"; .chat-message-wrapper { - &.hovered-message-chain { .animated.Avatar { canvas { display: none; } + img { visibility: visible; } @@ -28,7 +28,8 @@ .menu-icon { cursor: pointer; - &:hover, .extra-button-popover.open & { + &:hover, + .extra-button-popover.open & { color: $fallback--text; color: var(--text, $fallback--text); } @@ -54,27 +55,11 @@ width: 32px; } - .link-preview, .attachments { + .link-preview, + .attachments { margin-bottom: 1em; } - .chat-message-inner { - display: flex; - flex-direction: column; - align-items: flex-start; - max-width: 80%; - min-width: 10em; - width: 100%; - - &.with-media { - width: 100%; - - .status { - width: 100%; - } - } - } - .status { border-radius: $fallback--chatMessageRadius; border-radius: var(--chatMessageRadius, $fallback--chatMessageRadius); @@ -86,7 +71,7 @@ position: relative; float: right; font-size: 0.8em; - margin: -1em 0 -0.5em 0; + margin: -1em 0 -0.5em; font-style: italic; opacity: 0.8; } @@ -103,18 +88,54 @@ } .pending { - .status-content.media-body, .created-at { + .status-content.media-body, + .created-at { color: var(--faint); } } .error { - .status-content.media-body, .created-at { + .status-content.media-body, + .created-at { color: $fallback--cRed; color: var(--badgeNotification, $fallback--cRed); } } + .chat-message-inner { + display: flex; + flex-direction: column; + align-items: flex-start; + max-width: 80%; + min-width: 10em; + width: 100%; + } + + .outgoing { + display: flex; + flex-flow: row wrap; + align-content: end; + justify-content: flex-end; + + a { + color: var(--chatMessageOutgoingLink, $fallback--link); + } + + .status { + color: var(--chatMessageOutgoingText, $fallback--text); + background-color: var(--chatMessageOutgoingBg, $fallback--lightBg); + border: 1px solid var(--chatMessageOutgoingBorder, --lightBg); + } + + .chat-message-inner { + align-items: flex-end; + } + + .chat-message-menu { + right: 0.4rem; + } + } + .incoming { a { color: var(--chatMessageIncomingLink, $fallback--link); @@ -137,36 +158,17 @@ } } - .outgoing { - display: flex; - flex-direction: row; - flex-wrap: wrap; - align-content: end; - justify-content: flex-end; - - a { - color: var(--chatMessageOutgoingLink, $fallback--link); - } + .chat-message-inner.with-media { + width: 100%; .status { - color: var(--chatMessageOutgoingText, $fallback--text); - background-color: var(--chatMessageOutgoingBg, $fallback--lightBg); - border: 1px solid var(--chatMessageOutgoingBorder, --lightBg); - } - - .chat-message-inner { - align-items: flex-end; - } - - .chat-message-menu { - right: 0.4rem; + width: 100%; } } .visible { opacity: 1; } - } .chat-message-date-separator { diff --git a/src/components/chat_message/chat_message.vue b/src/components/chat_message/chat_message.vue index d635c47e..381574c3 100644 --- a/src/components/chat_message/chat_message.vue +++ b/src/components/chat_message/chat_message.vue @@ -33,7 +33,7 @@
@@ -98,6 +98,6 @@ diff --git a/src/components/chat_new/chat_new.scss b/src/components/chat_new/chat_new.scss index 240e1a38..b145ecf9 100644 --- a/src/components/chat_new/chat_new.scss +++ b/src/components/chat_new/chat_new.scss @@ -1,7 +1,7 @@ .chat-new { .input-wrap { display: flex; - margin: 0.7em 0.5em 0.7em 0.5em; + margin: 0.7em 0.5em; input { width: 100%; diff --git a/src/components/chat_new/chat_new.vue b/src/components/chat_new/chat_new.vue index bf09a379..52306c1d 100644 --- a/src/components/chat_new/chat_new.vue +++ b/src/components/chat_new/chat_new.vue @@ -46,6 +46,6 @@ diff --git a/src/components/chat_title/chat_title.vue b/src/components/chat_title/chat_title.vue index ab7491fa..93db4fa7 100644 --- a/src/components/chat_title/chat_title.vue +++ b/src/components/chat_title/chat_title.vue @@ -26,7 +26,7 @@ diff --git a/src/components/color_input/color_input.scss b/src/components/color_input/color_input.scss index 3de31fde..ca46199a 100644 --- a/src/components/color_input/color_input.scss +++ b/src/components/color_input/color_input.scss @@ -1,4 +1,4 @@ -@import '../../_variables.scss'; +@import "../../variables"; .color-input { display: inline-flex; @@ -8,7 +8,7 @@ flex: 0 0 0; max-width: 9em; align-items: stretch; - padding: .2em 8px; + padding: 0.2em 8px; input { background: none; @@ -31,6 +31,7 @@ min-height: 100%; } } + .computedIndicator, .transparentIndicator { flex: 0 0 2em; @@ -38,22 +39,27 @@ align-self: stretch; min-height: 100%; } + .transparentIndicator { // forgot to install counter-strike source, ooops - background-color: #FF00FF; + background-color: #f0f; position: relative; - &::before, &::after { + + &::before, + &::after { display: block; - content: ''; - background-color: #000000; + content: ""; + background-color: #000; position: absolute; height: 50%; width: 50%; } + &::after { top: 0; left: 0; } + &::before { bottom: 0; right: 0; @@ -64,5 +70,4 @@ .label { flex: 1 1 auto; } - } diff --git a/src/components/contrast_ratio/contrast_ratio.vue b/src/components/contrast_ratio/contrast_ratio.vue index 374cb9ba..bbd6fd4a 100644 --- a/src/components/contrast_ratio/contrast_ratio.vue +++ b/src/components/contrast_ratio/contrast_ratio.vue @@ -87,7 +87,6 @@ export default { .contrast-ratio { display: flex; justify-content: flex-end; - margin-top: -4px; margin-bottom: 5px; diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index afa04db0..7577129e 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -210,17 +210,16 @@ diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index b2fad1c9..a84d47f6 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -172,15 +172,10 @@ diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue index c919b11a..eff69fb2 100644 --- a/src/components/follow_card/follow_card.vue +++ b/src/components/follow_card/follow_card.vue @@ -39,9 +39,8 @@ &-content-container { flex-shrink: 0; display: flex; - flex-direction: row; + flex-flow: row wrap; justify-content: space-between; - flex-wrap: wrap; line-height: 1.5em; } diff --git a/src/components/follow_request_card/follow_request_card.vue b/src/components/follow_request_card/follow_request_card.vue index 1b12ba4b..eb222cc7 100644 --- a/src/components/follow_request_card/follow_request_card.vue +++ b/src/components/follow_request_card/follow_request_card.vue @@ -22,8 +22,8 @@ diff --git a/src/components/global_notice_list/global_notice_list.vue b/src/components/global_notice_list/global_notice_list.vue index d828b819..0e58476f 100644 --- a/src/components/global_notice_list/global_notice_list.vue +++ b/src/components/global_notice_list/global_notice_list.vue @@ -25,7 +25,7 @@ diff --git a/src/components/lists_edit/lists_edit.vue b/src/components/lists_edit/lists_edit.vue index 6521aba6..eec0f978 100644 --- a/src/components/lists_edit/lists_edit.vue +++ b/src/components/lists_edit/lists_edit.vue @@ -164,7 +164,7 @@ diff --git a/src/components/media_upload/media_upload.vue b/src/components/media_upload/media_upload.vue index a538a5ed..2799495b 100644 --- a/src/components/media_upload/media_upload.vue +++ b/src/components/media_upload/media_upload.vue @@ -29,7 +29,7 @@ diff --git a/src/components/moderation_tools/moderation_tools.vue b/src/components/moderation_tools/moderation_tools.vue index 8535ef27..b708cdc8 100644 --- a/src/components/moderation_tools/moderation_tools.vue +++ b/src/components/moderation_tools/moderation_tools.vue @@ -166,18 +166,21 @@ diff --git a/src/components/mute_card/mute_card.vue b/src/components/mute_card/mute_card.vue index ca33c6c5..97e91cbc 100644 --- a/src/components/mute_card/mute_card.vue +++ b/src/components/mute_card/mute_card.vue @@ -37,6 +37,7 @@ .mute-card-content-container { margin-top: 0.5em; text-align: right; + button { width: 10em; } diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue index d628c380..1a826cc4 100644 --- a/src/components/nav_panel/nav_panel.vue +++ b/src/components/nav_panel/nav_panel.vue @@ -102,7 +102,7 @@ diff --git a/src/components/navigation/navigation_entry.vue b/src/components/navigation/navigation_entry.vue index f4d53836..411ca536 100644 --- a/src/components/navigation/navigation_entry.vue +++ b/src/components/navigation/navigation_entry.vue @@ -63,7 +63,7 @@ diff --git a/src/components/reply_button/reply_button.vue b/src/components/reply_button/reply_button.vue index dada511b..6e3964b7 100644 --- a/src/components/reply_button/reply_button.vue +++ b/src/components/reply_button/reply_button.vue @@ -51,8 +51,8 @@ diff --git a/src/components/report/report.scss b/src/components/report/report.scss index 578b4eb1..9762400b 100644 --- a/src/components/report/report.scss +++ b/src/components/report/report.scss @@ -1,4 +1,4 @@ -@import '../../_variables.scss'; +@import "../../variables"; .Report { .report-content { diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index 240828e3..7700ee0d 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -65,8 +65,8 @@ diff --git a/src/components/search_bar/search_bar.vue b/src/components/search_bar/search_bar.vue index 199a7500..3969d8de 100644 --- a/src/components/search_bar/search_bar.vue +++ b/src/components/search_bar/search_bar.vue @@ -56,7 +56,7 @@ diff --git a/src/components/selectable_list/selectable_list.vue b/src/components/selectable_list/selectable_list.vue index 1f7683ab..14910fc5 100644 --- a/src/components/selectable_list/selectable_list.vue +++ b/src/components/selectable_list/selectable_list.vue @@ -51,7 +51,7 @@ diff --git a/src/components/settings_modal/helpers/size_setting.vue b/src/components/settings_modal/helpers/size_setting.vue index 90c9f538..5a78f100 100644 --- a/src/components/settings_modal/helpers/size_setting.vue +++ b/src/components/settings_modal/helpers/size_setting.vue @@ -45,10 +45,11 @@ diff --git a/src/components/settings_modal/settings_modal.scss b/src/components/settings_modal/settings_modal.scss index 13cb0e65..f5861229 100644 --- a/src/components/settings_modal/settings_modal.scss +++ b/src/components/settings_modal/settings_modal.scss @@ -1,4 +1,5 @@ -@import 'src/_variables.scss'; +@import "src/variables"; + .settings-modal { overflow: hidden; @@ -6,32 +7,13 @@ .option-list { list-style-type: none; padding-left: 2em; + li { margin-bottom: 0.5em; } + .suboptions { - margin-top: 0.3em - } - } - - &.peek { - .settings-modal-panel { - /* Explanation: - * Modal is positioned vertically centered. - * 100vh - 100% = Distance between modal's top+bottom boundaries and screen - * (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen - * + 100% - we move modal completely off-screen, it's top boundary touches - * bottom of the screen - * - 50px - leaving tiny amount of space so that titlebar + tiny amount of modal is visible - */ - transform: translateY(calc(((100vh - 100%) / 2 + 100%) - 50px)); - - @media all and (max-width: 800px) { - /* For mobile, the modal takes 100% of the available screen. - This ensures the minimized modal is always 50px above the browser bottom bar regardless of whether or not it is visible. - */ - transform: translateY(calc(100% - 50px)); - } + margin-top: 0.3em; } } @@ -63,6 +45,7 @@ .settings-footer { display: flex; + >* { margin-right: 0.5em; } @@ -72,4 +55,26 @@ flex-grow: 1; } } + + &.peek { + .settings-modal-panel { + /* Explanation: + * Modal is positioned vertically centered. + * 100vh - 100% = Distance between modal's top+bottom boundaries and screen + * (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen + * + 100% - we move modal completely off-screen, it's top boundary touches + * bottom of the screen + * - 50px - leaving tiny amount of space so that titlebar + tiny amount of modal is visible + */ + transform: translateY(calc(((100vh - 100%) / 2 + 100%) - 50px)); + + @media all and (max-width: 800px) { + /* For mobile, the modal takes 100% of the available screen. + This ensures the minimized modal is always 50px above the browser bottom + bar regardless of whether or not it is visible. + */ + transform: translateY(calc(100% - 50px)); + } + } + } } diff --git a/src/components/settings_modal/settings_modal_content.scss b/src/components/settings_modal/settings_modal_content.scss index 81ab434b..87df7982 100644 --- a/src/components/settings_modal/settings_modal_content.scss +++ b/src/components/settings_modal/settings_modal_content.scss @@ -1,4 +1,5 @@ -@import 'src/_variables.scss'; +@import "src/variables"; + .settings_tab-switcher { height: 100%; @@ -10,7 +11,8 @@ > div, > label { display: block; - margin-bottom: .5em; + margin-bottom: 0.5em; + &:last-child { margin-bottom: 0; } @@ -21,7 +23,7 @@ .option-list { margin: 0; - padding-left: .5em; + padding-left: 0.5em; } } diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index 8561647b..582cb288 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -464,6 +464,7 @@ justify-content: space-evenly; flex-wrap: wrap; } + .column-settings .size-label { display: block; margin-bottom: 0.5em; diff --git a/src/components/settings_modal/tabs/mutes_and_blocks_tab.scss b/src/components/settings_modal/tabs/mutes_and_blocks_tab.scss index 2adff847..5fa3a27b 100644 --- a/src/components/settings_modal/tabs/mutes_and_blocks_tab.scss +++ b/src/components/settings_modal/tabs/mutes_and_blocks_tab.scss @@ -1,29 +1,29 @@ .mutes-and-blocks-tab { - height: 100%; + height: 100%; - .usersearch-wrapper { - padding: 1em; - } + .usersearch-wrapper { + padding: 1em; + } - .bulk-actions { - text-align: right; - padding: 0 1em; - min-height: 2em; - } + .bulk-actions { + text-align: right; + padding: 0 1em; + min-height: 2em; + } - .bulk-action-button { - width: 10em - } + .bulk-action-button { + width: 10em; + } - .domain-mute-form { - padding: 1em; - display: flex; - flex-direction: column - } + .domain-mute-form { + padding: 1em; + display: flex; + flex-direction: column; + } - .domain-mute-button { - align-self: flex-end; - margin-top: 1em; - width: 10em - } + .domain-mute-button { + align-self: flex-end; + margin-top: 1em; + width: 10em; + } } diff --git a/src/components/settings_modal/tabs/profile_tab.scss b/src/components/settings_modal/tabs/profile_tab.scss index 201f1a76..73879192 100644 --- a/src/components/settings_modal/tabs/profile_tab.scss +++ b/src/components/settings_modal/tabs/profile_tab.scss @@ -1,4 +1,5 @@ -@import '../../../_variables.scss'; +@import "../../../variables"; + .profile-tab { .bio { margin: 0; @@ -8,7 +9,7 @@ padding-top: 5px; } - input[type=file] { + input[type="file"] { padding: 5px; height: auto; } @@ -52,7 +53,7 @@ right: 0.2em; border-radius: $fallback--tooltipRadius; border-radius: var(--tooltipRadius, $fallback--tooltipRadius); - background-color: rgba(0, 0, 0, 0.6); + background-color: rgb(0 0 0 / 60%); opacity: 0.7; width: 1.5em; height: 1.5em; diff --git a/src/components/settings_modal/tabs/security_tab/mfa.vue b/src/components/settings_modal/tabs/security_tab/mfa.vue index 455d17b6..ee5b6b13 100644 --- a/src/components/settings_modal/tabs/security_tab/mfa.vue +++ b/src/components/settings_modal/tabs/security_tab/mfa.vue @@ -137,9 +137,11 @@ diff --git a/src/components/thread_tree/thread_tree.vue b/src/components/thread_tree/thread_tree.vue index c6fffc71..04727278 100644 --- a/src/components/thread_tree/thread_tree.vue +++ b/src/components/thread_tree/thread_tree.vue @@ -119,7 +119,8 @@ diff --git a/src/components/update_notification/update_notification.scss b/src/components/update_notification/update_notification.scss index ce8129d0..4337acc4 100644 --- a/src/components/update_notification/update_notification.scss +++ b/src/components/update_notification/update_notification.scss @@ -1,4 +1,5 @@ -@import 'src/_variables.scss'; +@import "src/variables"; + .UpdateNotification { overflow: hidden; } @@ -21,7 +22,8 @@ @media all and (max-width: 800px) { /* For mobile, the modal takes 100% of the available screen. - This ensures the minimized modal is always 50px above the browser bottom bar regardless of whether or not it is visible. + This ensures the minimized modal is always 50px above the browser + bottom bar regardless of whether or not it is visible. */ width: 100vw; } @@ -44,7 +46,7 @@ } .panel-body { - border-width: 0 0 1px 0; + border-width: 0 0 1px; border-style: solid; border-color: var(--border, $fallback--border); } @@ -67,7 +69,7 @@ z-index: 20; position: relative; shape-margin: 0.5em; - filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.5)); + filter: drop-shadow(5px 5px 10px rgb(0 0 0 / 50%)); pointer-events: none; } @@ -94,7 +96,7 @@ } &.-peek { - /* Explanation: + /* Explanation: * 100vh - 100% = Distance between modal's top+bottom boundaries and screen * (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen */ @@ -103,7 +105,7 @@ .pleroma-tan { float: right; z-index: 10; - shape-image-threshold: 0.7; + shape-image-threshold: 70%; } .extra-info-group { diff --git a/src/components/user_avatar/user_avatar.vue b/src/components/user_avatar/user_avatar.vue index f4d294df..91c17611 100644 --- a/src/components/user_avatar/user_avatar.vue +++ b/src/components/user_avatar/user_avatar.vue @@ -27,7 +27,7 @@ diff --git a/src/components/user_card/user_card.scss b/src/components/user_card/user_card.scss index cdb8cb57..942673c4 100644 --- a/src/components/user_card/user_card.scss +++ b/src/components/user_card/user_card.scss @@ -1,4 +1,4 @@ -@import '../../_variables.scss'; +@import "../../variables"; .user-card { position: relative; @@ -11,7 +11,7 @@ } .panel-heading { - padding: .5em 0; + padding: 0.5em 0; text-align: center; box-shadow: none; background: transparent; @@ -35,17 +35,19 @@ left: 0; right: 0; bottom: 0; - mask: linear-gradient(to top, white, transparent) bottom no-repeat, - linear-gradient(to top, white, white); + mask: + linear-gradient(to top, white, transparent) bottom no-repeat, + linear-gradient(to top, white, white); // Autoprefixer seem to ignore this one, and also syntax is different - -webkit-mask-composite: xor; + mask-composite: xor; mask-composite: exclude; background-size: cover; mask-size: 100% 60%; - border-top-left-radius: calc(var(--__roundnessTop, --panelRadius) - 1px); - border-top-right-radius: calc(var(--__roundnessTop, --panelRadius) - 1px); - border-bottom-left-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px); - border-bottom-right-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px); + border-radius: + calc(var(--__roundnessTop, --panelRadius) - 1px) + calc(var(--__roundnessTop, --panelRadius) - 1px) + calc(var(--__roundnessBottom, --panelRadius) - 1px) + calc(var(--__roundnessBottom, --panelRadius) - 1px); background-color: var(--profileBg); z-index: -2; @@ -159,17 +161,17 @@ top: 0; right: 0; bottom: 0; - background-color: rgba(0, 0, 0, 0.3); + background-color: rgb(0 0 0 / 30%); display: flex; justify-content: center; align-items: center; border-radius: $fallback--avatarRadius; border-radius: var(--avatarRadius, $fallback--avatarRadius); opacity: 0; - transition: opacity .2s ease; + transition: opacity 0.2s ease; svg { - color: #FFF; + color: #fff; } } @@ -178,7 +180,8 @@ } } - .external-link-button, .edit-profile-button { + .external-link-button, + .edit-profile-button { cursor: pointer; width: 2.5em; text-align: center; @@ -191,34 +194,6 @@ } } - .user-summary { - display: block; - margin-left: 0.6em; - text-align: left; - text-overflow: ellipsis; - white-space: nowrap; - flex: 1 1 0; - // This is so that text doesn't get overlapped by avatar's shadow if it has - // big one - z-index: 1; - line-height: 2em; - - --emoji-size: 1.7em; - - .top-line, - .bottom-line { - display: flex; - } - } - - .user-name { - text-overflow: ellipsis; - overflow: hidden; - flex: 1 1 auto; - margin-right: 1em; - font-size: 1.1em; - } - .bottom-line { font-weight: light; font-size: 1.1em; @@ -253,8 +228,36 @@ } } + .user-summary { + display: block; + margin-left: 0.6em; + text-align: left; + text-overflow: ellipsis; + white-space: nowrap; + flex: 1 1 0; + // This is so that text doesn't get overlapped by avatar's shadow if it has + // big one + z-index: 1; + line-height: 2em; + + --emoji-size: 1.7em; + + .top-line, + .bottom-line { + display: flex; + } + } + + .user-name { + text-overflow: ellipsis; + overflow: hidden; + flex: 1 1 auto; + margin-right: 1em; + font-size: 1.1em; + } + .user-meta { - margin-bottom: .15em; + margin-bottom: 0.15em; display: flex; align-items: baseline; line-height: 22px; @@ -263,7 +266,7 @@ .following { flex: 1 0 auto; margin: 0; - margin-bottom: .25em; + margin-bottom: 0.25em; text-align: left; } @@ -271,7 +274,7 @@ flex: 0 1 auto; display: flex; flex-wrap: wrap; - margin-right: -.5em; + margin-right: -0.5em; align-self: start; .userHighlightCl { @@ -294,19 +297,20 @@ .userHighlightText, .userHighlightSel { vertical-align: top; - margin-right: .5em; - margin-bottom: .25em; + margin-right: 0.5em; + margin-bottom: 0.25em; } } } + .user-interactions { position: relative; display: flex; flex-flow: row wrap; - margin-right: -.75em; + margin-right: -0.75em; > * { - margin: 0 .75em .6em 0; + margin: 0 0.75em 0.6em 0; white-space: nowrap; min-width: 95px; } @@ -317,7 +321,7 @@ } .user-note { - margin: 0 .75em .6em 0; + margin: 0 0.75em 0.6em 0; } } @@ -327,8 +331,8 @@ .user-counts { display: flex; - line-height:16px; - padding: .5em 1.5em 0em 1.5em; + line-height: 16px; + padding: 0.5em 1.5em 0; text-align: center; justify-content: space-between; color: $fallback--lightText; @@ -338,14 +342,16 @@ .user-count { flex: 1 0 auto; - padding: .5em 0 .5em 0; - margin: 0 .5em; + padding: 0.5em 0; + margin: 0 0.5em; h5 { - font-size:1em; + font-size: 1em; font-weight: bolder; margin: 0 0 0.25em; } + + /* stylelint-disable-next-line no-descending-specificity */ a { text-decoration: none; } diff --git a/src/components/user_list_popover/user_list_popover.vue b/src/components/user_list_popover/user_list_popover.vue index 635dc7f6..8307cc8a 100644 --- a/src/components/user_list_popover/user_list_popover.vue +++ b/src/components/user_list_popover/user_list_popover.vue @@ -48,7 +48,7 @@ diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index d5e8d230..2720f052 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -140,7 +140,7 @@ diff --git a/src/components/who_to_follow_panel/who_to_follow_panel.vue b/src/components/who_to_follow_panel/who_to_follow_panel.vue index c1ba6fb1..0fecec0b 100644 --- a/src/components/who_to_follow_panel/who_to_follow_panel.vue +++ b/src/components/who_to_follow_panel/who_to_follow_panel.vue @@ -33,24 +33,28 @@ .who-to-follow * { vertical-align: middle; } + .who-to-follow img { width: 32px; height: 32px; } + .who-to-follow { - padding: 0em 1em; - margin: 0px; + padding: 0 1em; + margin: 0; } + .who-to-follow-items { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - padding: 0px; - margin: 1em 0em; + padding: 0; + margin: 1em 0; } + .who-to-follow-more { - padding: 0px; - margin: 1em 0em; + padding: 0; + margin: 1em 0; text-align: center; } diff --git a/src/hocs/with_load_more/with_load_more.scss b/src/hocs/with_load_more/with_load_more.scss index de86ed4a..bad852f4 100644 --- a/src/hocs/with_load_more/with_load_more.scss +++ b/src/hocs/with_load_more/with_load_more.scss @@ -1,5 +1,4 @@ - -@import '../../_variables.scss'; +@import "../../variables"; .with-load-more { &-footer { diff --git a/src/hocs/with_subscription/with_subscription.scss b/src/hocs/with_subscription/with_subscription.scss index 7fd83802..996045b4 100644 --- a/src/hocs/with_subscription/with_subscription.scss +++ b/src/hocs/with_subscription/with_subscription.scss @@ -7,4 +7,4 @@ font-size: 1rem; } } -} \ No newline at end of file +} diff --git a/src/panel.scss b/src/panel.scss index a53e47c6..9471da11 100644 --- a/src/panel.scss +++ b/src/panel.scss @@ -1,3 +1,4 @@ +/* stylelint-disable no-descending-specificity */ .panel { position: relative; display: flex; @@ -12,14 +13,14 @@ } &::after { - content: ''; + content: ""; position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 5; - box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6); + box-shadow: 1px 1px 4px rgb(0 0 0 / 60%); box-shadow: var(--panelShadow); pointer-events: none; } @@ -87,7 +88,7 @@ &::after, &::before { - content: ''; + content: ""; position: absolute; top: 0; bottom: 0; @@ -126,7 +127,7 @@ .panel-heading { border-radius: $fallback--panelRadius $fallback--panelRadius 0 0; border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0; - border-width: 0 0 1px 0; + border-width: 0 0 1px; align-items: start; // panel theme color: var(--panelText); @@ -150,7 +151,7 @@ .button-unstyled:hover, a:hover { - i[class*=icon-], + i[class*="icon-"], .svg-inline--fa, .iconLetter { color: var(--panelText); @@ -173,7 +174,7 @@ flex-shrink: 0; &, - i[class*=icon-] { + i[class*="icon-"] { color: $fallback--text; color: var(--btnPanelText, $fallback--text); } @@ -234,7 +235,8 @@ border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius; border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius); align-items: center; - border-width: 1px 0 0 0; + border-width: 1px 0 0; border-style: solid; border-color: var(--border, $fallback--border); } +/* stylelint-enable no-descending-specificity */ diff --git a/yarn.lock b/yarn.lock index c0061cf8..e2e06dec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5278,7 +5278,7 @@ jest-worker@^27.4.5: merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^28.0.2: +jest-worker@^28.0.2, jest-worker@^28.1.0: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.3.tgz#7e3c4ce3fa23d1bb6accb169e7f396f98ed4bb98" integrity sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g== @@ -8014,6 +8014,17 @@ stylelint-scss@^4.0.0: postcss-selector-parser "^6.0.6" postcss-value-parser "^4.1.0" +stylelint-webpack-plugin@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/stylelint-webpack-plugin/-/stylelint-webpack-plugin-3.3.0.tgz#3ba40e2b2b2b7d1802fa53618e01fc28bc21ffb3" + integrity sha512-F53bapIZ9zI16ero8IWm6TrUE6SSibZBphJE9b5rR2FxtvmGmm1YmS+a5xjQzn63+cv71GVSCu4byX66fBLpEw== + dependencies: + globby "^11.1.0" + jest-worker "^28.1.0" + micromatch "^4.0.5" + normalize-path "^3.0.0" + schema-utils "^4.0.0" + stylelint@14.16.1: version "14.16.1" resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-14.16.1.tgz#b911063530619a1bbe44c2b875fd8181ebdc742d" From aea9f92d39df4af5e7579e9d0ec443d3fb18a756 Mon Sep 17 00:00:00 2001 From: flxy Date: Wed, 11 Jan 2023 13:52:49 +0100 Subject: [PATCH 015/965] Adjust query selector to actually get the popover now --- src/components/react_button/react_button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js index 2a0dac85..58fbb61b 100644 --- a/src/components/react_button/react_button.js +++ b/src/components/react_button/react_button.js @@ -41,7 +41,7 @@ const ReactButton = { }, focusInput () { this.$nextTick(() => { - const input = this.$el.querySelector('input') + const input = document.querySelector('.popover.ReactButton').querySelector('input') if (input) input.focus() }) }, From d81fdafacb86b120714b6541bd83cf588ab8b577 Mon Sep 17 00:00:00 2001 From: flxy Date: Wed, 11 Jan 2023 14:12:29 +0100 Subject: [PATCH 016/965] Pick a better query selector --- src/components/react_button/react_button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js index 58fbb61b..47a48623 100644 --- a/src/components/react_button/react_button.js +++ b/src/components/react_button/react_button.js @@ -41,7 +41,7 @@ const ReactButton = { }, focusInput () { this.$nextTick(() => { - const input = document.querySelector('.popover.ReactButton').querySelector('input') + const input = document.querySelector('.reaction-picker-filter > input') if (input) input.focus() }) }, From d21ce77670d1a639929aac468e0b4c88cf0b2186 Mon Sep 17 00:00:00 2001 From: flxy Date: Thu, 12 Jan 2023 09:45:10 +0100 Subject: [PATCH 017/965] Use splice instead of delete --- src/components/settings_modal/tabs/profile_tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js index b86faef0..ff2ccef2 100644 --- a/src/components/settings_modal/tabs/profile_tab.js +++ b/src/components/settings_modal/tabs/profile_tab.js @@ -153,7 +153,7 @@ const ProfileTab = { return false }, deleteField (index, event) { - this.$delete(this.newFields, index) + this.newFields.splice(index, 1) }, uploadFile (slot, e) { const file = e.target.files[0] From a28032fa58ff341b8815a0651d621ed358efd168 Mon Sep 17 00:00:00 2001 From: tusooa Date: Fri, 13 Jan 2023 00:37:42 -0500 Subject: [PATCH 018/965] Disable no-shorthand for certain props for better readability --- .stylelintrc.json | 17 ++++++++++++++++- src/App.scss | 2 -- src/components/desktop_nav/desktop_nav.scss | 2 -- src/components/user_card/user_card.scss | 9 ++++----- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index 7517362c..d6689cc0 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -21,6 +21,21 @@ "import-notation": null, "custom-property-pattern": null, "keyframes-name-pattern": null, - "scss/operator-no-newline-after": null + "scss/operator-no-newline-after": null, + "declaration-block-no-redundant-longhand-properties": [ + true, + { + "ignoreShorthands": [ + "grid-template", + "margin", + "padding", + "border", + "border-width", + "border-style", + "border-color", + "border-radius" + ] + } + ] } } diff --git a/src/App.scss b/src/App.scss index 0d2daa7d..be5dce9d 100644 --- a/src/App.scss +++ b/src/App.scss @@ -214,10 +214,8 @@ nav { grid-template-columns: var(--effectiveSidebarColumnWidth) var(--effectiveContentColumnWidth); - /* stylelint-disable declaration-block-no-redundant-longhand-properties */ grid-template-areas: "sidebar content"; grid-template-rows: 1fr; - /* stylelint-enable declaration-block-no-redundant-longhand-properties */ box-sizing: border-box; margin: 0 auto; align-content: flex-start; diff --git a/src/components/desktop_nav/desktop_nav.scss b/src/components/desktop_nav/desktop_nav.scss index 00f434bf..c7e02936 100644 --- a/src/components/desktop_nav/desktop_nav.scss +++ b/src/components/desktop_nav/desktop_nav.scss @@ -14,11 +14,9 @@ .inner-nav { display: grid; - /* stylelint-disable declaration-block-no-redundant-longhand-properties */ grid-template-rows: var(--navbar-height); grid-template-columns: 2fr auto 2fr; grid-template-areas: "sitename logo actions"; - /* stylelint-enable declaration-block-no-redundant-longhand-properties */ box-sizing: border-box; padding: 0 1.2em; margin: auto; diff --git a/src/components/user_card/user_card.scss b/src/components/user_card/user_card.scss index 942673c4..d56b6672 100644 --- a/src/components/user_card/user_card.scss +++ b/src/components/user_card/user_card.scss @@ -43,11 +43,10 @@ mask-composite: exclude; background-size: cover; mask-size: 100% 60%; - border-radius: - calc(var(--__roundnessTop, --panelRadius) - 1px) - calc(var(--__roundnessTop, --panelRadius) - 1px) - calc(var(--__roundnessBottom, --panelRadius) - 1px) - calc(var(--__roundnessBottom, --panelRadius) - 1px); + border-top-left-radius: calc(var(--__roundnessTop, --panelRadius) - 1px); + border-top-right-radius: calc(var(--__roundnessTop, --panelRadius) - 1px); + border-bottom-left-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px); + border-bottom-right-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px); background-color: var(--profileBg); z-index: -2; From 274d384572f5699ddf0b43065235b32304954ca1 Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 14 Jan 2023 10:19:08 -0500 Subject: [PATCH 019/965] Make modal easier to close if there is only one image --- src/components/media_modal/media_modal.js | 5 +++++ src/components/media_modal/media_modal.vue | 1 + src/components/swipe_click/swipe_click.js | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js index ff993664..05ef9fbe 100644 --- a/src/components/media_modal/media_modal.js +++ b/src/components/media_modal/media_modal.js @@ -63,6 +63,11 @@ const MediaModal = { }, type () { return this.currentMedia ? this.getType(this.currentMedia) : null + }, + swipeDisableClickThreshold () { + // If there is only one media, allow more mouse movements to close the modal + // because there is less chance that the user wants to switch to another image + return () => this.canNavigate ? 1 : 30 } }, methods: { diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index d59055b3..8e1adda5 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -10,6 +10,7 @@ class="modal-image-container" :direction="swipeDirection" :threshold="swipeThreshold" + :disable-click-threshold="swipeDisableClickThreshold" @preview-requested="handleSwipePreview" @swipe-finished="handleSwipeEnd" @swipeless-clicked="hide" diff --git a/src/components/swipe_click/swipe_click.js b/src/components/swipe_click/swipe_click.js index 238e6df8..2a423901 100644 --- a/src/components/swipe_click/swipe_click.js +++ b/src/components/swipe_click/swipe_click.js @@ -5,6 +5,8 @@ import GestureService from '../../services/gesture_service/gesture_service' * direction: a vector that indicates the direction of the intended swipe * threshold: the minimum distance in pixels the swipe has moved on `direction' * for swipe-finished() to have a non-zero sign + * disableClickThreshold: the minimum distance in pixels for the swipe to + * not trigger a click * perpendicularTolerance: see gesture_service * * Events: @@ -34,6 +36,10 @@ const SwipeClick = { type: Function, default: () => 30 }, + disableClickThreshold: { + type: Function, + default: () => 1 + }, perpendicularTolerance: { type: Number, default: 1.0 @@ -72,6 +78,7 @@ const SwipeClick = { this.$gesture = new GestureService.SwipeAndClickGesture({ direction: this.direction, threshold: this.threshold, + disableClickThreshold: this.disableClickThreshold, perpendicularTolerance: this.perpendicularTolerance, swipePreviewCallback: this.preview, swipeEndCallback: this.end, From c69878cee7a77364afe6ed44a6df109e84273f3b Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 14 Jan 2023 22:17:21 -0500 Subject: [PATCH 020/965] Display better error message for unauthenticated timelines --- src/services/api/api.service.js | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 00d1c020..af12265e 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -734,26 +734,22 @@ const fetchTimeline = ({ const queryString = map(params, (param) => `${param[0]}=${param[1]}`).join('&') url += `?${queryString}` - let status = '' - let statusText = '' - - let pagination = {} return fetch(url, { headers: authHeaders(credentials) }) - .then((data) => { - status = data.status - statusText = data.statusText - pagination = parseLinkHeaderPagination(data.headers.get('Link'), { - flakeId: timeline !== 'bookmarks' && timeline !== 'notifications' - }) - return data - }) - .then((data) => data.json()) - .then((data) => { - if (!data.errors) { + .then(async (response) => { + const success = response.ok + + const data = await response.json() + + if (success && !data.errors) { + const pagination = parseLinkHeaderPagination(response.headers.get('Link'), { + flakeId: timeline !== 'bookmarks' && timeline !== 'notifications' + }) + return { data: data.map(isNotifications ? parseNotification : parseStatus), pagination } } else { - data.status = status - data.statusText = statusText + data.errors ||= [] + data.status = response.status + data.statusText = response.statusText return data } }) From 8acbc31a20069c737a65a9bc38f760741560574d Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 14 Jan 2023 22:36:21 -0500 Subject: [PATCH 021/965] Use bdi to isolate repeater name --- src/components/status/status.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 82eb7ac6..f3bdb19d 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -84,7 +84,7 @@ :user="statusoid.user" />
- @@ -101,7 +101,7 @@ v-else :to="retweeterProfileLink" >{{ retweeter }} - + {{ ' ' }} Date: Sat, 14 Jan 2023 22:43:18 -0500 Subject: [PATCH 022/965] Debounce mute word setting --- src/components/settings_modal/tabs/filtering_tab.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/settings_modal/tabs/filtering_tab.js b/src/components/settings_modal/tabs/filtering_tab.js index 5354e5db..7c37f0bc 100644 --- a/src/components/settings_modal/tabs/filtering_tab.js +++ b/src/components/settings_modal/tabs/filtering_tab.js @@ -1,4 +1,4 @@ -import { filter, trim } from 'lodash' +import { filter, trim, debounce } from 'lodash' import BooleanSetting from '../helpers/boolean_setting.vue' import ChoiceSetting from '../helpers/choice_setting.vue' import IntegerSetting from '../helpers/integer_setting.vue' @@ -29,11 +29,16 @@ const FilteringTab = { }, set (value) { this.muteWordsStringLocal = value + this.debouncedSetMuteWords(value) + } + }, + debouncedSetMuteWords () { + return debounce((value) => { this.$store.dispatch('setOption', { name: 'muteWords', value: filter(value.split('\n'), (word) => trim(word).length > 0) }) - } + }, 1000) } }, // Updating nested properties From a58a6d3c357592f34007c67bbf7fdf740864212a Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 14 Jan 2023 23:20:28 -0500 Subject: [PATCH 023/965] Fix notification attachment icon overflow --- src/components/attachment/attachment.js | 4 +++- src/components/attachment/attachment.scss | 7 ++++++- src/components/attachment/attachment.vue | 5 +++-- src/components/gallery/gallery.js | 1 + src/components/gallery/gallery.vue | 1 + src/components/status_content/status_content.vue | 1 + 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index 5dc50475..6e14b24d 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -36,6 +36,7 @@ library.add( const Attachment = { props: [ 'attachment', + 'compact', 'description', 'hideDescription', 'nsfw', @@ -71,7 +72,8 @@ const Attachment = { { '-loading': this.loading, '-nsfw-placeholder': this.hidden, - '-editable': this.edit !== undefined + '-editable': this.edit !== undefined, + '-compact': this.compact }, '-type-' + this.type, this.size && '-size-' + this.size, diff --git a/src/components/attachment/attachment.scss b/src/components/attachment/attachment.scss index b2dea98d..966acc68 100644 --- a/src/components/attachment/attachment.scss +++ b/src/components/attachment/attachment.scss @@ -102,7 +102,6 @@ padding-top: 0.5em; } - .play-icon { position: absolute; font-size: 64px; @@ -265,4 +264,10 @@ object-fit: cover; } } + + &.-compact { + .placeholder-container { + padding-bottom: 0.5em; + } + } } diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 2a89886d..79f62806 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -162,10 +162,11 @@ target="_blank" > -

+

{{ localDescription }}

diff --git a/src/components/gallery/gallery.js b/src/components/gallery/gallery.js index 4e1bda55..e86a3eea 100644 --- a/src/components/gallery/gallery.js +++ b/src/components/gallery/gallery.js @@ -4,6 +4,7 @@ import { sumBy, set } from 'lodash' const Gallery = { props: [ 'attachments', + 'compact', 'limitRows', 'descriptions', 'limit', diff --git a/src/components/gallery/gallery.vue b/src/components/gallery/gallery.vue index ccf6e3e2..bc18f545 100644 --- a/src/components/gallery/gallery.vue +++ b/src/components/gallery/gallery.vue @@ -20,6 +20,7 @@ v-for="(attachment, attachmentIndex) in row.items" :key="attachment.id" class="gallery-item" + :compact="compact" :nsfw="nsfw" :attachment="attachment" :size="size" diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index e2120f7a..c0e5c0b9 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -33,6 +33,7 @@ Date: Sun, 15 Jan 2023 00:08:59 -0500 Subject: [PATCH 024/965] Add status authors from search results to store --- src/modules/statuses.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 5a5c7b1b..77dd7e1c 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -765,6 +765,7 @@ const statuses = { return store.rootState.api.backendInteractor.search2({ q, resolve, limit, offset, following, type }) .then((data) => { store.commit('addNewUsers', data.accounts) + store.commit('addNewUsers', data.statuses.map(s => s.user).filter(u => u)) store.commit('addNewStatuses', { statuses: data.statuses }) return data }) From 73bc93bb462b4abd7915d29a1224c6ba8f0ef357 Mon Sep 17 00:00:00 2001 From: Pleroma Renovate Bot Date: Mon, 16 Jan 2023 09:12:36 +0000 Subject: [PATCH 025/965] Update dependency eslint-plugin-n to v15.6.1 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8658af93..83197bee 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "eslint-config-standard": "17.0.0", "eslint-formatter-friendly": "7.0.0", "eslint-plugin-import": "2.26.0", - "eslint-plugin-n": "15.6.0", + "eslint-plugin-n": "15.6.1", "eslint-plugin-promise": "6.1.1", "eslint-plugin-vue": "9.8.0", "eslint-webpack-plugin": "3.2.0", diff --git a/yarn.lock b/yarn.lock index e2e06dec..4bf3ae05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3954,10 +3954,10 @@ eslint-plugin-import@2.26.0: resolve "^1.22.0" tsconfig-paths "^3.14.1" -eslint-plugin-n@15.6.0: - version "15.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.6.0.tgz#cfb1d2e2e427d620eb9008f8b3b5a40de0c84120" - integrity sha512-Hd/F7wz4Mj44Jp0H6Jtty13NcE69GNTY0rVlgTIj1XBnGGVI6UTdDrpE6vqu3AHo07bygq/N+7OH/lgz1emUJw== +eslint-plugin-n@15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.6.1.tgz#f7e77f24abb92a550115cf11e29695da122c398c" + integrity sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA== dependencies: builtins "^5.0.1" eslint-plugin-es "^4.1.0" From bd58ccd3b6db00c98520987c42fdea40d8e8dd2f Mon Sep 17 00:00:00 2001 From: tusooa Date: Sun, 15 Jan 2023 22:39:20 -0500 Subject: [PATCH 026/965] Fix mobile layout margin --- src/App.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.scss b/src/App.scss index be5dce9d..1c4c8941 100644 --- a/src/App.scss +++ b/src/App.scss @@ -335,7 +335,7 @@ nav { .column { padding-top: 0; - margin-top: var(--navbar-height) 0 0 0; + margin: var(--navbar-height) 0 0 0; } .panel-heading, From 99314e2eaf2a54b7b67356b946ba8a44f5110f9c Mon Sep 17 00:00:00 2001 From: Pleroma Renovate Bot Date: Tue, 17 Jan 2023 09:07:51 +0000 Subject: [PATCH 027/965] Update dependency nightwatch to v2.6.10 --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 83197bee..897fda4a 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "lodash": "4.17.21", "mini-css-extract-plugin": "2.7.2", "mocha": "10.2.0", - "nightwatch": "2.6.6", + "nightwatch": "2.6.10", "opn": "5.5.0", "ora": "0.4.1", "postcss": "8.4.20", diff --git a/yarn.lock b/yarn.lock index 4bf3ae05..bc05dd56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1782,10 +1782,10 @@ pathval "1.1.1" type-detect "4.0.8" -"@nightwatch/html-reporter-template@0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@nightwatch/html-reporter-template/-/html-reporter-template-0.1.3.tgz#5251254ca9bb4551ce3c125756ad4e1056d87cd4" - integrity sha512-pNYmmIrYfDJ17sJ7Q2vCbxAAIIHlhtR5gzTkOC4sbAy2105Iqx+PSvvuvIuHys+DzZSdxteS9X/Yckh6jAGHaA== +"@nightwatch/html-reporter-template@0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@nightwatch/html-reporter-template/-/html-reporter-template-0.1.4.tgz#c70db1a13bb2e7e1932e6b10ac1e022e61177c94" + integrity sha512-fVylXypRuNJbyFAwY/5H2QM1A1XVoZWis0zhiMwA5LQN0cxHzpG2aUheb+qP1EfkxhFxwSUHOcrvphFLbPA8ow== "@nodelib/fs.scandir@2.1.3": version "2.1.3" @@ -6307,13 +6307,13 @@ nightwatch-axe-verbose@^2.1.0: dependencies: axe-core "^4.6.1" -nightwatch@2.6.6: - version "2.6.6" - resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-2.6.6.tgz#f811b8c534206a33c88a2d2c86713b4eb5691b58" - integrity sha512-Vris8WRfRWACW4g58bSiC5nFmPsBKyg2mkb/qpPpYg7bBB5Y7nsnpSnsZvxJm6hocfWtbKtx4y+AUR7Pun4rpg== +nightwatch@2.6.10: + version "2.6.10" + resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-2.6.10.tgz#eda82a6a0ff0002fdbeb9d160938d3c53a92dd88" + integrity sha512-nn5HVEtETLQ8qgu7APAZKg/yXTBkMflwdmzhfywP8mZUfKk0/dRQbeDqY2RawHr/sYsFmZV6eMirlJaaQoQ7Yw== dependencies: "@nightwatch/chai" "5.0.2" - "@nightwatch/html-reporter-template" "0.1.3" + "@nightwatch/html-reporter-template" "0.1.4" ansi-to-html "0.7.2" assertion-error "1.1.0" boxen "5.1.2" From 5b56b6b9fdd9ad82a8f1c24d03024be0e7902c80 Mon Sep 17 00:00:00 2001 From: tusooa Date: Tue, 17 Jan 2023 19:55:16 -0500 Subject: [PATCH 028/965] Populate user card on receiving chats --- src/modules/chats.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/chats.js b/src/modules/chats.js index f28c2603..0f1540db 100644 --- a/src/modules/chats.js +++ b/src/modules/chats.js @@ -65,6 +65,7 @@ const chats = { const newChatMessageSideEffects = (chat) => { maybeShowChatNotification(store, chat) } + commit('addNewUsers', chats.map(k => k.account).filter(k => k)) commit('addNewChats', { dispatch, chats, rootGetters, newChatMessageSideEffects }) }, updateChat ({ commit }, { chat }) { From ea6254e84800a2df7a9c1765e94f3238ebd0f9f2 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 19 Jan 2023 00:26:05 +0200 Subject: [PATCH 029/965] Update doc on making and using custom builds. --- docs/HACKING.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/HACKING.md b/docs/HACKING.md index 7f2964b4..a5c49113 100644 --- a/docs/HACKING.md +++ b/docs/HACKING.md @@ -25,7 +25,17 @@ This could be a bit trickier, you basically need steps 1-4 from *develop build* ### Replacing your instance's frontend with custom FE build -This is the most easiest way to use and test FE build: you just need to copy or symlink contents of `dist` folder into backend's [static directory](../backend/configuration/static_dir.md), by default it is located in `instance/static`, or in `/var/lib/pleroma/static` for OTP release installations, create it if it doesn't exist already. Be aware that running `yarn build` wipes the contents of `dist` folder. +#### New way (via AdminFE, a bit janky but works) + +In backend's [static directory](../backend/configuration/static_dir.md) there should be a folder called `frontends` if you installed any frontends from AdminFE before, otherwise you can create it yourself (ensuring correct permissions). Backend will serve given frontend from path `frontends/{frontend}/{reference}`, where `{frontend}` is name of frontend (`pleroma-fe`) and `{reference}` is version. You could make a production build, move `dist` folder into `frontends/pleroma-fe` and rename it into something like `myCustomVersion`. To actually make backend serve this frontend by default, in AdminFE you'll need to set name/reference in Settings -> Frontend -> Frontends -> Primary. + +You could also install from a zip file (i.e. CI build) but AdminFE UI is a bit buggy and lacking, so this approach is not recommended. + +Take note that frontend management is in early development and currently there's no way for user to change frontend or version for themselves, primary frontend becomes default frontend for all users and visitors. + +#### Old way (replaces everything, hard to maintain, not recommended) + +Copy or symlink contents of `dist` folder into backend's [static directory](../backend/configuration/static_dir.md), by default it is located in `instance/static`, or in `/var/lib/pleroma/static` for OTP release installations, create it if it doesn't exist already. Be aware that running `yarn build` wipes the contents of `dist` folder, and this could remove emojis, other frontends etc. and therefore this approach is not recommended. ### Running production build locally or on a separate server From f6ca59315787f11af179d631b189d626a82f5aef Mon Sep 17 00:00:00 2001 From: Pleroma Renovate Bot Date: Thu, 19 Jan 2023 09:07:41 +0000 Subject: [PATCH 030/965] Update dependency eslint to v8.32.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 897fda4a..a256eebb 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "css-loader": "6.7.3", "css-minimizer-webpack-plugin": "4.2.2", "custom-event-polyfill": "1.0.7", - "eslint": "8.31.0", + "eslint": "8.32.0", "eslint-config-standard": "17.0.0", "eslint-formatter-friendly": "7.0.0", "eslint-plugin-import": "2.26.0", diff --git a/yarn.lock b/yarn.lock index bc05dd56..ed45d5a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4042,10 +4042,10 @@ eslint-webpack-plugin@3.2.0: normalize-path "^3.0.0" schema-utils "^4.0.0" -eslint@8.31.0: - version "8.31.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.31.0.tgz#75028e77cbcff102a9feae1d718135931532d524" - integrity sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA== +eslint@8.32.0: + version "8.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.32.0.tgz#d9690056bb6f1a302bd991e7090f5b68fbaea861" + integrity sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ== dependencies: "@eslint/eslintrc" "^1.4.1" "@humanwhocodes/config-array" "^0.11.8" From d1876503bc560b9c62d03e219021593cb954fcf4 Mon Sep 17 00:00:00 2001 From: tusooa Date: Fri, 20 Jan 2023 12:33:19 -0500 Subject: [PATCH 031/965] Display delete status errors --- src/i18n/en.json | 1 + src/modules/statuses.js | 14 ++++++++++++-- src/services/api/api.service.js | 5 +++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/i18n/en.json b/src/i18n/en.json index 1ee1147a..5e653ad8 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -844,6 +844,7 @@ "favorites": "Favorites", "repeats": "Repeats", "delete": "Delete status", + "delete_error": "Error deleting status: {0}", "edit": "Edit status", "edited_at": "(last edited {time})", "pin": "Pin on profile", diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 77dd7e1c..93a4a957 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -615,9 +615,19 @@ const statuses = { fetchStatusHistory ({ rootState, dispatch }, status) { return apiService.fetchStatusHistory({ status }) }, - deleteStatus ({ rootState, commit }, status) { - commit('setDeleted', { status }) + deleteStatus ({ rootState, commit, dispatch }, status) { apiService.deleteStatus({ id: status.id, credentials: rootState.users.currentUser.credentials }) + .then((_) => { + commit('setDeleted', { status }) + }) + .catch((e) => { + dispatch('pushGlobalNotice', { + level: 'error', + messageKey: 'status.delete_error', + messageArgs: [e.message], + timeout: 5000 + }) + }) }, deleteStatusById ({ rootState, commit }, id) { const status = rootState.statuses.allStatusesObject[id] diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index af12265e..609f6790 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -923,8 +923,9 @@ const editStatus = ({ } const deleteStatus = ({ id, credentials }) => { - return fetch(MASTODON_DELETE_URL(id), { - headers: authHeaders(credentials), + return promisedRequest({ + url: MASTODON_DELETE_URL(id), + credentials, method: 'DELETE' }) } From 3ad5df805e22ddd473fdaa9a92df335a61fad7fc Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:04:53 -0500 Subject: [PATCH 032/965] Add delete status confirm modal --- src/components/extra_buttons/extra_buttons.js | 31 +++++++++++++++---- .../extra_buttons/extra_buttons.vue | 10 ++++++ src/modules/config.js | 6 ++++ src/modules/instance.js | 6 ++++ 4 files changed, 47 insertions(+), 6 deletions(-) diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index 3dc968c9..b1458d30 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -1,4 +1,5 @@ import Popover from '../popover/popover.vue' +import ConfirmModal from '../confirm_modal/confirm_modal.vue' import { library } from '@fortawesome/fontawesome-svg-core' import { faEllipsisH, @@ -32,10 +33,14 @@ library.add( const ExtraButtons = { props: ['status'], - components: { Popover }, + components: { + Popover, + ConfirmModal + }, data () { return { - expanded: false + expanded: false, + showingDeleteDialog: false } }, methods: { @@ -46,11 +51,22 @@ const ExtraButtons = { this.expanded = false }, deleteStatus () { - const confirmed = window.confirm(this.$t('status.delete_confirm')) - if (confirmed) { - this.$store.dispatch('deleteStatus', { id: this.status.id }) + if (this.shouldConfirmDelete) { + this.showDeleteStatusConfirmDialog() + } else { + this.doDeleteStatus() } }, + doDeleteStatus () { + this.$store.dispatch('deleteStatus', { id: this.status.id }) + hideDeleteStatusConfirmDialog() + }, + showDeleteStatusConfirmDialog () { + this.showingDeleteDialog = true + }, + hideDeleteStatusConfirmDialog () { + this.showingDeleteDialog = false + }, pinStatus () { this.$store.dispatch('pinStatus', this.status.id) .then(() => this.$emit('onSuccess')) @@ -133,7 +149,10 @@ const ExtraButtons = { isEdited () { return this.status.edited_at !== null }, - editingAvailable () { return this.$store.state.instance.editingAvailable } + editingAvailable () { return this.$store.state.instance.editingAvailable }, + shouldConfirmDelete () { + return this.$store.getters.mergedConfig.modalOnDelete + } } } diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index a84d47f6..293f6d68 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -165,6 +165,16 @@ /> + + {{ $t('status.delete_confirm') }} + diff --git a/src/modules/config.js b/src/modules/config.js index 3cd6888f..a8949030 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -78,6 +78,12 @@ export const defaultState = { minimalScopesMode: undefined, // instance default // This hides statuses filtered via a word filter hideFilteredStatuses: undefined, // instance default + modalOnRepeat: undefined, // instance default + modalOnUnfollow: undefined, // instance default + modalOnBlock: undefined, // instance default + modalOnMute: undefined, // instance default + modalOnDelete: undefined, // instance default + modalOnLogout: undefined, // instance default playVideosInModal: false, useOneClickNsfw: false, useContainFit: true, diff --git a/src/modules/instance.js b/src/modules/instance.js index 8e8d13d3..6fc3830c 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -71,6 +71,12 @@ const defaultState = { hideSitename: false, hideUserStats: false, muteBotStatuses: false, + modalOnRepeat: false, + modalOnUnfollow: false, + modalOnBlock: true, + modalOnMute: false, + modalOnDelete: true, + modalOnLogout: true, loginMethod: 'password', logo: '/static/logo.svg', logoMargin: '.2em', From 1e352fbfacddc205397153bf5087484d550129e6 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:05:21 -0500 Subject: [PATCH 033/965] Add English translations for delete status confirm modal --- src/components/extra_buttons/extra_buttons.js | 2 +- src/i18n/en.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index b1458d30..48b960b2 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -59,7 +59,7 @@ const ExtraButtons = { }, doDeleteStatus () { this.$store.dispatch('deleteStatus', { id: this.status.id }) - hideDeleteStatusConfirmDialog() + this.hideDeleteStatusConfirmDialog() }, showDeleteStatusConfirmDialog () { this.showingDeleteDialog = true diff --git a/src/i18n/en.json b/src/i18n/en.json index 1ee1147a..b2bec692 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -852,6 +852,9 @@ "bookmark": "Bookmark", "unbookmark": "Unbookmark", "delete_confirm": "Do you really want to delete this status?", + "delete_confirm_title": "Delete confirmation", + "delete_confirm_accept_button": "Delete", + "delete_confirm_cancel_button": "Keep", "reply_to": "Reply to", "mentions": "Mentions", "replies_list": "Replies:", From 1ff2948aeb485ef48a4add6310ba8fb9d43d262c Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:17:06 -0500 Subject: [PATCH 034/965] Add setting entries for whether to show confirmation dialogs --- .../settings_modal/tabs/general_tab.vue | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index 582cb288..906c3758 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -148,6 +148,41 @@
+
  • + {{ $t('settings.confirm_dialogs') }} +
      +
    • + + {{ $t('settings.confirm_dialogs_repeat') }} + +
    • +
    • + + {{ $t('settings.confirm_dialogs_unfollow') }} + +
    • +
    • + + {{ $t('settings.confirm_dialogs_block') }} + +
    • +
    • + + {{ $t('settings.confirm_dialogs_mute') }} + +
    • +
    • + + {{ $t('settings.confirm_dialogs_delete') }} + +
    • +
    • + + {{ $t('settings.confirm_dialogs_logout') }} + +
    • +
    +
  • From f8b522e36dd08a08cd7071c30b5e4e61832275aa Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:17:49 -0500 Subject: [PATCH 035/965] Add English translations for setting entries --- src/i18n/en.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/i18n/en.json b/src/i18n/en.json index b2bec692..ed21e2a5 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -416,6 +416,13 @@ "composing": "Composing", "confirm_new_password": "Confirm new password", "current_password": "Current password", + "confirm_dialogs": "Ask for confirmation when", + "confirm_dialogs_repeat": "repeating a status", + "confirm_dialogs_unfollow": "unfollowing a user", + "confirm_dialogs_block": "blocking a user", + "confirm_dialogs_mute": "muting a user", + "confirm_dialogs_delete": "deleting a status", + "confirm_dialogs_logout": "logging out", "mutes_and_blocks": "Mutes and Blocks", "data_import_export_tab": "Data import / export", "default_vis": "Default visibility scope", From 4d175235f1bc72c369c5e5fc8ed1997b384c0b83 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:49:39 -0500 Subject: [PATCH 036/965] Add confirmation for repeating --- .../retweet_button/retweet_button.js | 24 ++++++++++++++++++- .../retweet_button/retweet_button.vue | 10 ++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/components/retweet_button/retweet_button.js b/src/components/retweet_button/retweet_button.js index 4d92b5fa..198b6c14 100644 --- a/src/components/retweet_button/retweet_button.js +++ b/src/components/retweet_button/retweet_button.js @@ -1,3 +1,4 @@ +import ConfirmModal from '../confirm_modal/confirm_modal.vue' import { library } from '@fortawesome/fontawesome-svg-core' import { faRetweet, @@ -15,13 +16,24 @@ library.add( const RetweetButton = { props: ['status', 'loggedIn', 'visibility'], + components: { + ConfirmModal + }, data () { return { - animated: false + animated: false, + showingConfirmDialog: false } }, methods: { retweet () { + if (!this.status.repeated && this.shouldConfirmRepeat) { + this.showConfirmDialog() + } else { + this.doRetweet() + } + }, + doRetweet () { if (!this.status.repeated) { this.$store.dispatch('retweet', { id: this.status.id }) } else { @@ -31,6 +43,13 @@ const RetweetButton = { setTimeout(() => { this.animated = false }, 500) + this.hideConfirmDialog() + }, + showConfirmDialog () { + this.showingConfirmDialog = true + }, + hideConfirmDialog () { + this.showingConfirmDialog = false } }, computed: { @@ -39,6 +58,9 @@ const RetweetButton = { }, remoteInteractionLink () { return this.$store.getters.remoteInteractionLink({ statusId: this.status.id }) + }, + shouldConfirmRepeat () { + return this.mergedConfig.modalOnRepeat } } } diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index 7700ee0d..38d4dc3f 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -59,6 +59,16 @@ > {{ status.repeat_num }} + + {{ $t('status.repeat_confirm') }} +
    From a0b886459bf5e146b8b7654d97ba8838bfac29de Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:50:04 -0500 Subject: [PATCH 037/965] Add confirmation for following --- src/components/follow_button/follow_button.js | 25 +++++++++++- .../follow_button/follow_button.vue | 38 ++++++++++++++----- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/src/components/follow_button/follow_button.js b/src/components/follow_button/follow_button.js index 3edbcb86..0a74a7a1 100644 --- a/src/components/follow_button/follow_button.js +++ b/src/components/follow_button/follow_button.js @@ -1,12 +1,20 @@ +import ConfirmModal from '../confirm_modal/confirm_modal.vue' import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate' export default { props: ['relationship', 'user', 'labelFollowing', 'buttonClass'], + components: { + ConfirmModal + }, data () { return { - inProgress: false + inProgress: false, + showingConfirmUnfollow: false, } }, computed: { + shouldConfirmUnfollow () { + return this.$store.getters.mergedConfig.modalOnUnfollow + }, isPressed () { return this.inProgress || this.relationship.following }, @@ -35,6 +43,12 @@ export default { } }, methods: { + showConfirmUnfollow () { + this.showingConfirmUnfollow = true + }, + hideConfirmUnfollow () { + this.showingConfirmUnfollow = false + }, onClick () { this.relationship.following || this.relationship.requested ? this.unfollow() : this.follow() }, @@ -45,12 +59,21 @@ export default { }) }, unfollow () { + if (this.shouldConfirmUnfollow) { + this.showConfirmUnfollow() + } else { + this.doUnfollow() + } + }, + doUnfollow () { const store = this.$store this.inProgress = true requestUnfollow(this.relationship.id, store).then(() => { this.inProgress = false store.commit('removeStatus', { timeline: 'friends', userId: this.relationship.id }) }) + + this.hideConfirmUnfollow() } } } diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 965d5256..4fc2233a 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -1,13 +1,33 @@ From 0684f19d1b903a7d941aa7cfa366044b98d97659 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 15:50:25 -0500 Subject: [PATCH 038/965] Add ConfirmModal comp --- src/components/confirm_modal/confirm_modal.js | 42 +++++++++++++++++++ .../confirm_modal/confirm_modal.vue | 28 +++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 src/components/confirm_modal/confirm_modal.js create mode 100644 src/components/confirm_modal/confirm_modal.vue diff --git a/src/components/confirm_modal/confirm_modal.js b/src/components/confirm_modal/confirm_modal.js new file mode 100644 index 00000000..bb5e9d97 --- /dev/null +++ b/src/components/confirm_modal/confirm_modal.js @@ -0,0 +1,42 @@ +import DialogModal from '../dialog_modal/dialog_modal.vue' + +/** + * This component emits the following events: + * cancelled, emitted when the action should not be performed; + * accepted, emitted when the action should be performed; + * + * The caller should close this dialog after receiving any of the two events. + */ +const ConfirmModal = { + components: { + DialogModal + }, + data: { + }, + props: { + showing: { + type: Boolean + }, + title: { + type: String + }, + cancelText: { + type: String + }, + confirmText: { + type: String + } + }, + computed: { + }, + methods: { + onCancel () { + this.$emit('cancelled') + }, + onAccept () { + this.$emit('accepted') + } + } +} + +export default ConfirmModal diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue new file mode 100644 index 00000000..250a6984 --- /dev/null +++ b/src/components/confirm_modal/confirm_modal.vue @@ -0,0 +1,28 @@ + + + From a0c6d642af277954585b32724de4f2b157b02e42 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:08:47 -0500 Subject: [PATCH 039/965] Add English translations for repeat and unfollow confirmation --- src/i18n/en.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/i18n/en.json b/src/i18n/en.json index ed21e2a5..7e23a849 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -850,6 +850,10 @@ "status": { "favorites": "Favorites", "repeats": "Repeats", + "repeat_confirm": "Do you really want to repeat this status?", + "repeat_confirm_title": "Repeat confirmation", + "repeat_confirm_accept_button": "Repeat", + "repeat_confirm_cancel_button": "Do not repeat", "delete": "Delete status", "edit": "Edit status", "edited_at": "(last edited {time})", @@ -919,6 +923,10 @@ "follow_sent": "Request sent!", "follow_progress": "Requesting…", "follow_unfollow": "Unfollow", + "unfollow_confirm_title": "Unfollow confirmation", + "unfollow_confirm": "Do you really want to unfollow {user}?", + "unfollow_confirm_accept_button": "Unfollow", + "unfollow_confirm_cancel_button": "Do not unfollow", "followees": "Following", "followers": "Followers", "following": "Following!", From e7e35ead09589e1673dd6b6fdd24f7679ef108bf Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:21:19 -0500 Subject: [PATCH 040/965] Add confirmation for muting --- src/components/user_card/user_card.js | 24 ++++++++++++++++++++++-- src/components/user_card/user_card.vue | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 67879307..1bcc4341 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -8,6 +8,7 @@ import UserNote from '../user_note/user_note.vue' import Select from '../select/select.vue' import UserLink from '../user_link/user_link.vue' import RichContent from 'src/components/rich_content/rich_content.jsx' +import ConfirmModal from '../confirm_modal/confirm_modal.vue' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' import { mapGetters } from 'vuex' import { library } from '@fortawesome/fontawesome-svg-core' @@ -46,7 +47,8 @@ export default { data () { return { followRequestInProgress: false, - betterShadow: this.$store.state.interface.browserSupport.cssFilter + betterShadow: this.$store.state.interface.browserSupport.cssFilter, + showingConfirmMute: false } }, created () { @@ -137,6 +139,9 @@ export default { supportsNote () { return 'note' in this.relationship }, + shouldConfirmMute () { + return this.mergedConfig.modalOnMute + }, ...mapGetters(['mergedConfig']) }, components: { @@ -149,11 +154,26 @@ export default { Select, RichContent, UserLink, - UserNote + UserNote, + ConfirmModal }, methods: { + showConfirmMute () { + this.showingConfirmMute = true + }, + hideConfirmMute () { + this.showingConfirmMute = false + }, muteUser () { + if (!this.shouldConfirmMute) { + this.doMuteUser() + } else { + this.showConfirmMute() + } + }, + doMuteUser () { this.$store.dispatch('muteUser', this.user.id) + this.hideConfirmMute() }, unmuteUser () { this.$store.dispatch('unmuteUser', this.user.id) diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 349c7cb1..fac900a9 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -314,6 +314,24 @@ :handle-links="true" />
    + + + + + From c032b48219ba601df5dabc7fd271444fe7db0321 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:21:30 -0500 Subject: [PATCH 041/965] Add English translation for mute confirmation --- src/i18n/en.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/i18n/en.json b/src/i18n/en.json index 7e23a849..fa359f88 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -938,6 +938,10 @@ "message": "Message", "mute": "Mute", "muted": "Muted", + "mute_confirm_title": "Mute confirmation", + "mute_confirm": "Do you really want to mute {user}?", + "mute_confirm_accept_button": "Mute", + "mute_confirm_cancel_button": "Do not mute", "per_day": "per day", "remote_follow": "Remote follow", "remove_follower": "Remove follower", From 3b7aaae2b366abe1162c22a29918336c4210446f Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:26:30 -0500 Subject: [PATCH 042/965] Add confirmation for blocking --- .../account_actions/account_actions.js | 25 +++++++++++++++++-- .../account_actions/account_actions.vue | 18 +++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js index c23407f9..7dec0c3d 100644 --- a/src/components/account_actions/account_actions.js +++ b/src/components/account_actions/account_actions.js @@ -2,6 +2,7 @@ import { mapState } from 'vuex' import ProgressButton from '../progress_button/progress_button.vue' import Popover from '../popover/popover.vue' import UserListMenu from 'src/components/user_list_menu/user_list_menu.vue' +import ConfirmModal from '../confirm_modal/confirm_modal.vue' import { library } from '@fortawesome/fontawesome-svg-core' import { faEllipsisV @@ -16,14 +17,23 @@ const AccountActions = { 'user', 'relationship' ], data () { - return { } + return { + showingConfirmBlock: false + } }, components: { ProgressButton, Popover, - UserListMenu + UserListMenu, + ConfirmModal }, methods: { + showConfirmBlock () { + this.showingConfirmBlock = true + }, + hideConfirmBlock () { + this.showingConfirmBlock = false + }, showRepeats () { this.$store.dispatch('showReblogs', this.user.id) }, @@ -31,7 +41,15 @@ const AccountActions = { this.$store.dispatch('hideReblogs', this.user.id) }, blockUser () { + if (!this.shouldConfirmBlock) { + this.doBlockUser() + } else { + this.showConfirmBlock() + } + }, + doBlockUser () { this.$store.dispatch('blockUser', this.user.id) + this.hideConfirmBlock() }, unblockUser () { this.$store.dispatch('unblockUser', this.user.id) @@ -50,6 +68,9 @@ const AccountActions = { } }, computed: { + shouldConfirmBlock () { + return this.$store.getters.mergedConfig.modalOnBlock + }, ...mapState({ pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable }) diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 973a5935..dfe1f706 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -74,6 +74,24 @@ + + + + + From 0bfe100ef77ca36e2789310b204987ea54ec2696 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:26:42 -0500 Subject: [PATCH 043/965] Add English translation for block confirmation --- src/i18n/en.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/i18n/en.json b/src/i18n/en.json index fa359f88..1dec4b90 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -914,6 +914,10 @@ "approve": "Approve", "block": "Block", "blocked": "Blocked!", + "block_confirm_title": "Block confirmation", + "block_confirm": "Do you really want to block {user}?", + "block_confirm_accept_button": "Block", + "block_confirm_cancel_button": "Do not block", "deactivated": "Deactivated", "deny": "Deny", "edit_profile": "Edit profile", From c202c89ca0f8c9bc1957bff3bbe3ea39e21ddbba Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:51:13 -0500 Subject: [PATCH 044/965] Add confirmation for logout --- .../confirm_modal/confirm_modal.vue | 1 + src/components/desktop_nav/desktop_nav.js | 26 +++++++++++++++--- src/components/desktop_nav/desktop_nav.vue | 10 +++++++ src/components/mobile_nav/mobile_nav.js | 27 ++++++++++++++++--- src/components/mobile_nav/mobile_nav.vue | 18 +++++++++++++ 5 files changed, 76 insertions(+), 6 deletions(-) diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue index 250a6984..fa354285 100644 --- a/src/components/confirm_modal/confirm_modal.vue +++ b/src/components/confirm_modal/confirm_modal.vue @@ -1,6 +1,7 @@ @@ -235,6 +245,14 @@ } } } + .confirm-modal.dark-overlay { + &::before { + z-index: 3000; + } + .dialog-modal.panel { + z-index: 3001; + } + } } From 5c048321e787b880f4c228e52b956b59edc3fc4f Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 16:51:32 -0500 Subject: [PATCH 045/965] Add English translation for logout confirmation --- src/i18n/en.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/i18n/en.json b/src/i18n/en.json index 1dec4b90..f7d83aa3 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -137,6 +137,10 @@ "login": "Log in", "description": "Log in with OAuth", "logout": "Log out", + "logout_confirm_title": "Logout confirmation", + "logout_confirm": "Do you really want to logout?", + "logout_confirm_accept_button": "Logout", + "logout_confirm_cancel_button": "Do not logout", "password": "Password", "placeholder": "e.g. lain", "register": "Register", From 8c8a8232c8c23f706b82c03c7ddadbd94ca2f3df Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 9 Feb 2022 17:03:17 -0500 Subject: [PATCH 046/965] Lint --- src/components/confirm_modal/confirm_modal.vue | 14 +++++++------- src/components/follow_button/follow_button.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue index fa354285..59e46dc1 100644 --- a/src/components/confirm_modal/confirm_modal.vue +++ b/src/components/confirm_modal/confirm_modal.vue @@ -2,26 +2,26 @@ - + diff --git a/src/components/follow_button/follow_button.js b/src/components/follow_button/follow_button.js index 0a74a7a1..443aa9bc 100644 --- a/src/components/follow_button/follow_button.js +++ b/src/components/follow_button/follow_button.js @@ -8,7 +8,7 @@ export default { data () { return { inProgress: false, - showingConfirmUnfollow: false, + showingConfirmUnfollow: false } }, computed: { From 51ade260660b1a6586b5c0091d89c9701b684870 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Fri, 11 Feb 2022 10:18:20 -0500 Subject: [PATCH 047/965] Fix logout confirm dialog title --- src/components/desktop_nav/desktop_nav.vue | 2 +- src/components/mobile_nav/mobile_nav.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/desktop_nav/desktop_nav.vue b/src/components/desktop_nav/desktop_nav.vue index 7db94a37..0f5b3136 100644 --- a/src/components/desktop_nav/desktop_nav.vue +++ b/src/components/desktop_nav/desktop_nav.vue @@ -78,7 +78,7 @@ Date: Thu, 17 Mar 2022 00:06:26 -0400 Subject: [PATCH 048/965] Use portal for modals --- .../account_actions/account_actions.vue | 36 ++++++------ src/components/confirm_modal/confirm_modal.js | 5 -- .../confirm_modal/confirm_modal.vue | 1 - src/components/desktop_nav/desktop_nav.vue | 22 ++++---- .../extra_buttons/extra_buttons.vue | 22 ++++---- .../follow_button/follow_button.vue | 56 +++++++++---------- src/components/mobile_nav/mobile_nav.vue | 22 ++++---- .../retweet_button/retweet_button.vue | 22 ++++---- src/components/user_card/user_card.vue | 36 ++++++------ 9 files changed, 114 insertions(+), 108 deletions(-) diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index dfe1f706..273aac69 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -74,24 +74,26 @@ - - + - - - + + + + + diff --git a/src/components/confirm_modal/confirm_modal.js b/src/components/confirm_modal/confirm_modal.js index bb5e9d97..96ddc118 100644 --- a/src/components/confirm_modal/confirm_modal.js +++ b/src/components/confirm_modal/confirm_modal.js @@ -11,12 +11,7 @@ const ConfirmModal = { components: { DialogModal }, - data: { - }, props: { - showing: { - type: Boolean - }, title: { type: String }, diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue index 59e46dc1..5b5014c5 100644 --- a/src/components/confirm_modal/confirm_modal.vue +++ b/src/components/confirm_modal/confirm_modal.vue @@ -1,6 +1,5 @@ diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index 293f6d68..4641947a 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -165,16 +165,18 @@ /> - - {{ $t('status.delete_confirm') }} - + + + {{ $t('status.delete_confirm') }} + + diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 4fc2233a..5c799406 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -1,33 +1,33 @@ diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue index 0f23b7ac..6b6b8f21 100644 --- a/src/components/mobile_nav/mobile_nav.vue +++ b/src/components/mobile_nav/mobile_nav.vue @@ -88,16 +88,18 @@ ref="sideDrawer" :logout="logout" /> - - {{ $t('login.logout_confirm') }} - + + + {{ $t('login.logout_confirm') }} + + diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index 38d4dc3f..9ed24bd5 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -59,16 +59,18 @@ > {{ status.repeat_num }} - - {{ $t('status.repeat_confirm') }} - + + + {{ $t('status.repeat_confirm') }} + + diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index fac900a9..5a848ead 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -314,24 +314,26 @@ :handle-links="true" /> - - + - - - + + + + + From dc04c8cbd48dd8dcfc6b1937663e57983d38562a Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 6 Apr 2022 14:54:58 -0400 Subject: [PATCH 049/965] Use vue3 teleport instead of portal --- src/components/account_actions/account_actions.vue | 4 ++-- src/components/desktop_nav/desktop_nav.vue | 4 ++-- src/components/extra_buttons/extra_buttons.vue | 4 ++-- src/components/follow_button/follow_button.vue | 4 ++-- src/components/mobile_nav/mobile_nav.vue | 4 ++-- src/components/retweet_button/retweet_button.vue | 4 ++-- src/components/user_card/user_card.vue | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 273aac69..fc303271 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -74,7 +74,7 @@ - + - + diff --git a/src/components/desktop_nav/desktop_nav.vue b/src/components/desktop_nav/desktop_nav.vue index 18630385..92622cf9 100644 --- a/src/components/desktop_nav/desktop_nav.vue +++ b/src/components/desktop_nav/desktop_nav.vue @@ -76,7 +76,7 @@ - + {{ $t('login.logout_confirm') }} - + diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index 4641947a..c1c15c0f 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -165,7 +165,7 @@ /> - + {{ $t('status.delete_confirm') }} - + diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue index 5c799406..b4567348 100644 --- a/src/components/follow_button/follow_button.vue +++ b/src/components/follow_button/follow_button.vue @@ -7,7 +7,7 @@ @click="onClick" > {{ label }} - + - + diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue index 6b6b8f21..6d826622 100644 --- a/src/components/mobile_nav/mobile_nav.vue +++ b/src/components/mobile_nav/mobile_nav.vue @@ -88,7 +88,7 @@ ref="sideDrawer" :logout="logout" /> - + {{ $t('login.logout_confirm') }} - + diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue index 9ed24bd5..134fcb36 100644 --- a/src/components/retweet_button/retweet_button.vue +++ b/src/components/retweet_button/retweet_button.vue @@ -59,7 +59,7 @@ > {{ status.repeat_num }} - + {{ $t('status.repeat_confirm') }} - + diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 5a848ead..856ed54b 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -314,7 +314,7 @@ :handle-links="true" /> - + - + From 76d99c08d6740886b8c52ee4a0291706dc68ca3f Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 6 Apr 2022 15:02:21 -0400 Subject: [PATCH 050/965] Move modal out of vue tree --- index.html | 1 + src/App.vue | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 4af84a59..c02bf308 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@
    + + + + {{ $t('user_card.approve_confirm', { user: user.screen_name_ui }) }} + + + {{ $t('user_card.deny_confirm', { user: user.screen_name_ui }) }} + + diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index 906c3758..9de3ed81 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -181,6 +181,16 @@ {{ $t('settings.confirm_dialogs_logout') }} +
  • + + {{ $t('settings.confirm_dialogs_approve_follow') }} + +
  • +
  • + + {{ $t('settings.confirm_dialogs_deny_follow') }} + +
  • diff --git a/src/modules/config.js b/src/modules/config.js index a8949030..1df279a2 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -84,6 +84,8 @@ export const defaultState = { modalOnMute: undefined, // instance default modalOnDelete: undefined, // instance default modalOnLogout: undefined, // instance default + modalOnApproveFollow: undefined, // instance default + modalOnDenyFollow: undefined, // instance default playVideosInModal: false, useOneClickNsfw: false, useContainFit: true, diff --git a/src/modules/instance.js b/src/modules/instance.js index 6fc3830c..fcb6eecc 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -77,6 +77,8 @@ const defaultState = { modalOnMute: false, modalOnDelete: true, modalOnLogout: true, + modalOnApproveFollow: false, + modalOnDenyFollow: false, loginMethod: 'password', logo: '/static/logo.svg', logoMargin: '.2em', From 041bbb162299b896f5d0583c1ed4e8dcdc035c38 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Tue, 7 Jun 2022 12:37:38 -0400 Subject: [PATCH 058/965] Add English translation for accept & deny follow requests --- src/i18n/en.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/i18n/en.json b/src/i18n/en.json index fc0de3ac..213f9cf0 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -427,6 +427,8 @@ "confirm_dialogs_mute": "muting a user", "confirm_dialogs_delete": "deleting a status", "confirm_dialogs_logout": "logging out", + "confirm_dialogs_approve_follow": "approving a follower", + "confirm_dialogs_deny_follow": "denying a follower", "mutes_and_blocks": "Mutes and Blocks", "data_import_export_tab": "Data import / export", "default_vis": "Default visibility scope", @@ -916,6 +918,10 @@ }, "user_card": { "approve": "Approve", + "approve_confirm_title": "Approve confirmation", + "approve_confirm_accept_button": "Approve", + "approve_confirm_cancel_button": "Do not approve", + "approve_confirm": "Do you want to approve {user}'s follow request?", "block": "Block", "blocked": "Blocked!", "block_confirm_title": "Block confirmation", @@ -924,6 +930,10 @@ "block_confirm_cancel_button": "Do not block", "deactivated": "Deactivated", "deny": "Deny", + "deny_confirm_title": "Deny confirmation", + "deny_confirm_accept_button": "Deny", + "deny_confirm_cancel_button": "Do not deny", + "deny_confirm": "Do you want to deny {user}'s follow request?", "edit_profile": "Edit profile", "favorites": "Favorites", "follow": "Follow", From 1856eeda40e76618717a66b51ffc49a1ecf8c967 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Fri, 10 Jun 2022 15:55:31 -0400 Subject: [PATCH 059/965] Auto close confirm dialog after approve/deny --- src/components/notification/notification.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index 0ce8892e..420db4f0 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -104,6 +104,7 @@ const Notification = { notification.type = 'follow' } }) + this.hideApproveConfirmDialog() }, denyUser () { if (this.shouldConfirmDeny) { @@ -118,6 +119,7 @@ const Notification = { this.$store.dispatch('dismissNotificationLocal', { id: this.notification.id }) this.$store.dispatch('removeFollowRequest', this.user) }) + this.hideDenyConfirmDialog() } }, computed: { From 8a99d129dcc4a07375727b4f8959c7fa775b8ec0 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Mon, 1 Aug 2022 11:02:21 -0400 Subject: [PATCH 060/965] Fix confirm modal lint --- src/components/confirm_modal/confirm_modal.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/confirm_modal/confirm_modal.vue b/src/components/confirm_modal/confirm_modal.vue index 1ac64b62..3b98174a 100644 --- a/src/components/confirm_modal/confirm_modal.vue +++ b/src/components/confirm_modal/confirm_modal.vue @@ -4,13 +4,13 @@ class="confirm-modal" :on-cancel="onCancel" > -