logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: d6bbccdd71b99ecc1c5588ae30233189ce4c5d90
parent 913749739ff4ae543433cc051485b0d572fc22f9
Author: Henry Jameson <me@hjkos.com>
Date:   Sun, 27 Mar 2022 12:50:00 +0300

Merge remote-tracking branch 'origin/develop' into vue3-again

* origin/develop:
  Remove debugging code
  Fix overlapping buttons in Theme settings
  Update dependency ruffle-mirror to v2021.12.31
  Update dependency babel-loader to v8.2.4

Diffstat:

Mpackage.json5+++--
Msrc/components/settings_modal/settings_modal.scss5+++++
Msrc/components/settings_modal/settings_modal.vue4++++
Msrc/components/settings_modal/tabs/theme_tab/theme_tab.js4++++
Msrc/components/settings_modal/tabs/theme_tab/theme_tab.scss30++++++++++++++++--------------
Msrc/components/settings_modal/tabs/theme_tab/theme_tab.vue35++++++++++++++++++++---------------
Msrc/components/tab_switcher/tab_switcher.jsx9+++++++++
Myarn.lock36+++++++++++++++++++++++++-----------
8 files changed, 86 insertions(+), 42 deletions(-)

diff --git a/package.json b/package.json @@ -33,12 +33,13 @@ "phoenix": "1.4.0", "portal-vue": "2.1.7", "punycode.js": "2.1.0", - "ruffle-mirror": "2021.4.11", + "ruffle-mirror": "2021.12.31", "click-outside-vue3": "4.0.1", "vue": "^3.1.0", "@vue/compat": "^3.1.0", "vue-i18n": "9.1.9", "vue-router": "4.0.14", + "vue-template-compiler": "2.6.11", "@vuelidate/core": "2.0.0-alpha.35", "@vuelidate/validators": "2.0.0-alpha.27", "vuex": "4.0.2" @@ -55,7 +56,7 @@ "@vue/compiler-sfc": "^3.1.0", "autoprefixer": "6.7.7", "babel-eslint": "7.2.3", - "babel-loader": "8.2.3", + "babel-loader": "8.2.4", "babel-plugin-lodash": "3.3.4", "chai": "3.5.0", "chalk": "1.1.3", diff --git a/src/components/settings_modal/settings_modal.scss b/src/components/settings_modal/settings_modal.scss @@ -54,5 +54,10 @@ >* { margin-right: 0.5em; } + + .extra-content { + display: flex; + flex-grow: 1; + } } } diff --git a/src/components/settings_modal/settings_modal.vue b/src/components/settings_modal/settings_modal.vue @@ -113,6 +113,10 @@ <Checkbox :modelValue="!!expertLevel" @update:modelValue="expertLevel = Number($event)"> {{ $t("settings.expert_mode") }} </Checkbox> + <portal-target + class="extra-content" + name="unscrolled-content" + /> </div> </div> </Modal> diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.js b/src/components/settings_modal/tabs/theme_tab/theme_tab.js @@ -377,6 +377,10 @@ export default { // To separate from other random JSON files and possible future source formats _pleroma_theme_version: 2, theme, source } + }, + isActive () { + const tabSwitcher = this.$parent + return tabSwitcher ? tabSwitcher.isActive('theme') : false } }, components: { diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.scss b/src/components/settings_modal/tabs/theme_tab/theme_tab.scss @@ -268,13 +268,6 @@ } } - .apply-container { - justify-content: center; - position: absolute; - bottom: 8px; - right: 5px; - } - .radius-item, .color-item { min-width: 20em; @@ -334,16 +327,25 @@ padding: 20px; } + .btn { + margin-left: .25em; + margin-right: .25em; + } +} + +.extra-content { .apply-container { + display: flex; + flex-direction: row; + justify-content: space-around; + flex-grow: 1; + .btn { + flex-grow: 1; min-height: 28px; - min-width: 10em; - padding: 0 2em; + min-width: 0; + max-width: 10em; + padding: 0; } } - - .btn { - margin-left: .25em; - margin-right: .25em; - } } diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue @@ -1018,21 +1018,26 @@ </tab-switcher> </keep-alive> - <div class="apply-container"> - <button - class="btn button-default submit" - :disabled="!themeValid" - @click="setCustomTheme" - > - {{ $t('general.apply') }} - </button> - <button - class="btn button-default" - @click="clearAll" - > - {{ $t('settings.style.switcher.reset') }} - </button> - </div> + <portal + v-if="isActive" + to="unscrolled-content" + > + <div class="apply-container"> + <button + class="btn button-default submit" + :disabled="!themeValid" + @click="setCustomTheme" + > + {{ $t('general.apply') }} + </button> + <button + class="btn button-default" + @click="clearAll" + > + {{ $t('settings.style.switcher.reset') }} + </button> + </div> + </portal> </div> </template> diff --git a/src/components/tab_switcher/tab_switcher.jsx b/src/components/tab_switcher/tab_switcher.jsx @@ -55,6 +55,15 @@ export default { return this.active } }, + isActive () { + return tabName => { + const isWanted = slot => slot.props && slot.props['data-tab-name'] === tabName + return this.$slots.default.findIndex(isWanted) === this.activeIndex + } + }, + settingsModalVisible () { + return this.settingsModalState === 'visible' + }, ...mapState({ settingsModalState: state => state.interface.settingsModalState }) diff --git a/yarn.lock b/yarn.lock @@ -2128,13 +2128,13 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-loader@8.2.3: - version "8.2.3" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.3.tgz#8986b40f1a64cacfcb4b8429320085ef68b1342d" - integrity sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw== +babel-loader@8.2.4: + version "8.2.4" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.4.tgz#95f5023c791b2e9e2ca6f67b0984f39c82ff384b" + integrity sha512-8dytA3gcvPPPv4Grjhnt8b5IIiTcq/zeXOPk4iTYI0SVXcsmuGg7JtBRDp8S9X+gJfhQ8ektjXZlDu1Bb33U8A== dependencies: find-cache-dir "^3.3.1" - loader-utils "^1.4.0" + loader-utils "^2.0.0" make-dir "^3.1.0" schema-utils "^2.6.5" @@ -3378,6 +3378,11 @@ dateformat@^1.0.6: get-stdin "^4.0.1" meow "^3.3.0" +de-indent@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" + integrity sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0= + debug@2, debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -4895,9 +4900,10 @@ he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" -he@1.2.x: +he@1.2.x, he@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== hmac-drbg@^1.0.0: version "1.0.1" @@ -5953,7 +5959,7 @@ loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0: emojis-list "^2.0.0" json5 "^1.0.1" -loader-utils@^1.2.3, loader-utils@^1.4.0: +loader-utils@^1.2.3: version "1.4.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== @@ -8505,10 +8511,10 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -ruffle-mirror@2021.4.11: - version "2021.4.11" - resolved "https://registry.yarnpkg.com/ruffle-mirror/-/ruffle-mirror-2021.4.11.tgz#039940e0a68e6849259dbef6b54fb877ac4373e7" - integrity sha512-a3N2OkPCJauiHBloHoZgCn/mSUlybyb9Ps4ikPGgHUy8iXPy6qMqh62imvNDU07tBJc5Y0c5mRHBFJRgpMgEpA== +ruffle-mirror@2021.12.31: + version "2021.12.31" + resolved "https://registry.yarnpkg.com/ruffle-mirror/-/ruffle-mirror-2021.12.31.tgz#d5ece0ff164d98468d84eb7cba3e69abff4c0687" + integrity sha512-kilyYstBQ+ZQY44IvUHhMt8Uh1yQJ8B+6GdzA1FzErgJy+5mnaLUBtU8JEG7cSrW3QLdFQLhRSeh8lLDINXgSA== run-async@^2.2.0: version "2.3.0" @@ -9958,6 +9964,14 @@ vue-style-loader@4.1.2: hash-sum "^1.0.2" loader-utils "^1.0.2" +vue-template-compiler@2.6.11: + version "2.6.11" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz#c04704ef8f498b153130018993e56309d4698080" + integrity sha512-KIq15bvQDrcCjpGjrAhx4mUlyyHfdmTaoNfeoATHLAiWB+MU3cx4lOzMwrnUh9cCxy0Lt1T11hAFY6TQgroUAA== + dependencies: + de-indent "^1.0.2" + he "^1.1.0" + vue@^3.1.0: version "3.2.31" resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.31.tgz#e0c49924335e9f188352816788a4cca10f817ce6"