level 2 collapse

This commit is contained in:
Henry Jameson 2025-11-20 18:29:09 +02:00
commit 8e6800fd1e
6 changed files with 42 additions and 3 deletions

View file

@ -73,6 +73,11 @@ const SettingsModalContent = {
return useInterfaceStore().layoutType === 'mobile'
}
},
data () {
return {
navCollapsed: false
}
},
methods: {
onOpen () {
const targetTab = useInterfaceStore().settingsModalTargetTab
@ -90,9 +95,11 @@ const SettingsModalContent = {
useInterfaceStore().clearSettingsModalTargetTab()
},
nestedTooBig () {
this.navCollapsed = false
this.$refs.tabSwitcher.showNav()
},
nestedTooSmall () {
this.navCollapsed = true
this.$refs.tabSwitcher.hideNav()
}
},

View file

@ -13,6 +13,7 @@
>
<GeneralTab
class="inner-tab -middle"
:parent-collapsed="navCollapsed"
@too-small="() => nestedTooSmall()"
@too-big="() => nestedTooBig()"
/>

View file

@ -35,6 +35,12 @@ library.add(
)
const GeneralTab = {
props: {
parentCollapsed: {
required: true,
type: Boolean
}
},
data () {
return {
subjectLineOptions: ['email', 'noop', 'masto'].map(mode => ({

View file

@ -3,6 +3,7 @@
:label="$t('settings.general')"
ref="tabSwitcher"
class="settings_tab-switcher"
:parent-collapsed="parentCollapsed"
@too-small="() => $emit('tooSmall')"
@too-big="() => $emit('tooBig')"
>