small refactoring to uncouple tab-switcher from settings modal
This commit is contained in:
parent
b0789fd6fd
commit
33777fab47
@ -53,6 +53,9 @@ const SettingsModalContent = {
|
||||
},
|
||||
open () {
|
||||
return this.$store.state.interface.settingsModalState !== 'hidden'
|
||||
},
|
||||
bodyLock () {
|
||||
return this.$store.state.interface.settingsModalState === 'visible'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -4,6 +4,7 @@
|
||||
class="settings_tab-switcher"
|
||||
:side-tab-bar="true"
|
||||
:scrollable-tabs="true"
|
||||
:body-scroll-lock="bodyLock"
|
||||
>
|
||||
<div
|
||||
:label="$t('settings.general')"
|
||||
|
@ -33,6 +33,11 @@ export default {
|
||||
required: false,
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bodyScrollLock: {
|
||||
required: false,
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@ -50,9 +55,6 @@ export default {
|
||||
return this.active
|
||||
}
|
||||
},
|
||||
settingsModalVisible () {
|
||||
return this.settingsModalState === 'visible'
|
||||
},
|
||||
...mapState({
|
||||
settingsModalState: state => state.interface.settingsModalState
|
||||
})
|
||||
@ -161,7 +163,11 @@ export default {
|
||||
<div class="tabs">
|
||||
{tabs}
|
||||
</div>
|
||||
<div ref="contents" class={'contents' + (this.scrollableTabs ? ' scrollable-tabs' : '')} v-body-scroll-lock={this.settingsModalVisible}>
|
||||
<div
|
||||
ref="contents"
|
||||
class={'contents' + (this.scrollableTabs ? ' scrollable-tabs' : '')}
|
||||
v-body-scroll-lock={this.bodyScrollLock}
|
||||
>
|
||||
{contents}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user