mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-22 23:39:45 +00:00
feat: new settings
This commit is contained in:
24
src/platform/workspace/composables/useWorkspace.ts
Normal file
24
src/platform/workspace/composables/useWorkspace.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
// Shared state for workspace
|
||||
const _workspaceName = ref<string | null>(null)
|
||||
const _activeTab = ref<string>('general')
|
||||
|
||||
/**
|
||||
* Composable for handling workspace data
|
||||
* TODO: Replace stubbed data with actual API call
|
||||
*/
|
||||
export function useWorkspace() {
|
||||
const workspaceName = computed(() => _workspaceName.value)
|
||||
const activeTab = computed(() => _activeTab.value)
|
||||
|
||||
function setActiveTab(tab: string | number) {
|
||||
_activeTab.value = String(tab)
|
||||
}
|
||||
|
||||
return {
|
||||
workspaceName,
|
||||
activeTab,
|
||||
setActiveTab
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user