aboutsummaryrefslogtreecommitdiff
path: root/src/components/tab_switcher
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-03-27 12:50:00 +0300
committerHenry Jameson <me@hjkos.com>2022-03-27 12:50:00 +0300
commitd6bbccdd71b99ecc1c5588ae30233189ce4c5d90 (patch)
tree646df70bdda1380beef369c8d3a9f474be86ad6d /src/components/tab_switcher
parent913749739ff4ae543433cc051485b0d572fc22f9 (diff)
parentfd77c583bf18be81b628d92b1f95cc14a2d9c09d (diff)
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 (limited to 'src/components/tab_switcher')
-rw-r--r--src/components/tab_switcher/tab_switcher.jsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/components/tab_switcher/tab_switcher.jsx b/src/components/tab_switcher/tab_switcher.jsx
index a5c6cd2b..59ff98df 100644
--- 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
})