Reverse init order (#227)

This commit is contained in:
Chenlei Hu
2024-07-25 22:20:38 -04:00
committed by GitHub
parent 9d56bb4e0e
commit dc13ed102b
5 changed files with 36 additions and 44 deletions

View File

@@ -38,8 +38,7 @@
import SideBarIcon from './SideBarIcon.vue'
import SideBarThemeToggleIcon from './SideBarThemeToggleIcon.vue'
import SideBarSettingsToggleIcon from './SideBarSettingsToggleIcon.vue'
import { computed, onBeforeUnmount, watch } from 'vue'
import { useSettingStore } from '@/stores/settingStore'
import { computed, onBeforeUnmount } from 'vue'
import { app } from '@/scripts/app'
import { useWorkspaceStore } from '@/stores/workspaceStateStore'
import {
@@ -61,15 +60,6 @@ const onTabClick = (item: SidebarTabExtension) => {
workspaceStateStore.activeSidebarTab === item.id ? null : item.id
)
}
const betaMenuEnabled = computed(
() => useSettingStore().get('Comfy.UseNewMenu') !== 'Disabled'
)
watch(betaMenuEnabled, (newValue) => {
if (!newValue) {
workspaceStateStore.updateActiveSidebarTab(null)
}
})
onBeforeUnmount(() => {
tabs.value.forEach((tab) => {
if (tab.type === 'custom' && tab.destroy) {