Refactor core sidebar tab registration (#1158)

* Refactor sidebar tab register

* Register core tabs
This commit is contained in:
Chenlei Hu
2024-10-07 21:23:52 -04:00
committed by GitHub
parent 23952d9751
commit 50a6ee27a0
6 changed files with 103 additions and 59 deletions

View File

@@ -0,0 +1,16 @@
import { markRaw } from 'vue'
import { useI18n } from 'vue-i18n'
import ModelLibrarySidebarTab from '@/components/sidebar/tabs/ModelLibrarySidebarTab.vue'
import type { SidebarTabExtension } from '@/types/extensionTypes'
export const useModelLibrarySidebarTab = (): SidebarTabExtension => {
const { t } = useI18n()
return {
id: 'model-library',
icon: 'pi pi-box',
title: t('sideToolbar.modelLibrary'),
tooltip: t('sideToolbar.modelLibrary'),
component: markRaw(ModelLibrarySidebarTab),
type: 'vue'
}
}