logo

pleroma-fe

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

port !1488 to vue3

Diffstat:

Msrc/components/settings_modal/settings_modal.vue4++--
Msrc/components/settings_modal/tabs/theme_tab/theme_tab.vue6+++---
Msrc/components/tab_switcher/tab_switcher.jsx4++--
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/components/settings_modal/settings_modal.vue b/src/components/settings_modal/settings_modal.vue @@ -113,9 +113,9 @@ <Checkbox :modelValue="!!expertLevel" @update:modelValue="expertLevel = Number($event)"> {{ $t("settings.expert_mode") }} </Checkbox> - <portal-target + <span class="extra-content" - name="unscrolled-content" + id="unscrolled-content" /> </div> </div> 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,9 +1018,9 @@ </tab-switcher> </keep-alive> - <portal + <teleport v-if="isActive" - to="unscrolled-content" + to="#unscrolled-content" > <div class="apply-container"> <button @@ -1037,7 +1037,7 @@ {{ $t('settings.style.switcher.reset') }} </button> </div> - </portal> + </teleport> </div> </template> diff --git a/src/components/tab_switcher/tab_switcher.jsx b/src/components/tab_switcher/tab_switcher.jsx @@ -50,7 +50,7 @@ export default { activeIndex () { // In case of controlled component if (this.activeTab) { - return this.slots().findIndex(slot => this.activeTab === slot.key) + return this.slots().findIndex(slot => this.activeTab === slot.props.key) } else { return this.active } @@ -58,7 +58,7 @@ export default { isActive () { return tabName => { const isWanted = slot => slot.props && slot.props['data-tab-name'] === tabName - return this.$slots.default.findIndex(isWanted) === this.activeIndex + return this.$slots.default().findIndex(isWanted) === this.activeIndex } }, settingsModalVisible () {