aboutsummaryrefslogtreecommitdiff
path: root/src/components/tab_switcher/tab_switcher.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2022-03-25 13:22:06 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2022-03-25 13:22:06 +0000
commitfd77c583bf18be81b628d92b1f95cc14a2d9c09d (patch)
treeb93f63f1b30fc533d05ca6cfd90c97e5c02cac4b /src/components/tab_switcher/tab_switcher.js
parentaa0b2e07233f4370497ab01e05bb6b913ee6efa5 (diff)
parentb319c0c72b5d4da224492574865a78fd624bf206 (diff)
Merge branch 'from/develop/tusooa/fix-overlap-button' into 'develop'
Fix overlapping buttons in Theme settings See merge request pleroma/pleroma-fe!1488
Diffstat (limited to 'src/components/tab_switcher/tab_switcher.js')
-rw-r--r--src/components/tab_switcher/tab_switcher.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js
index 12aac8e6..d2a7f5c5 100644
--- a/src/components/tab_switcher/tab_switcher.js
+++ b/src/components/tab_switcher/tab_switcher.js
@@ -47,6 +47,12 @@ export default Vue.component('tab-switcher', {
return this.active
}
},
+ isActive () {
+ return tabName => {
+ const isWanted = slot => slot.data && slot.data.attrs['data-tab-name'] === tabName
+ return this.$slots.default.findIndex(isWanted) === this.activeIndex
+ }
+ },
settingsModalVisible () {
return this.settingsModalState === 'visible'
},