fix: create useKbxRegistry composable and fix home page imports
- Add useKbxRegistry.ts composable with registry/permission/density logic - Update HomePage.vue to use getAllScreens() directly - Fix import path from @shared/composables to @/registry/screens - Resolve dev server import resolution error TypeScript: ✅ PASS Dev Server: ✅ READY Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue'
|
||||
import { RouterLink } from 'vue-router'
|
||||
import { useKbxRegistry } from '@shared/composables/useKbxRegistry'
|
||||
import { getAllScreens } from '@/registry/screens'
|
||||
import { useScreenPreferenceStore } from '../../../shared/shell/screenPreferenceStore'
|
||||
|
||||
interface AttentionItem {
|
||||
@@ -19,17 +19,16 @@ interface ModuleGroup {
|
||||
count: number
|
||||
}
|
||||
|
||||
const registry = useKbxRegistry()
|
||||
const preference = useScreenPreferenceStore()
|
||||
|
||||
// Get screen definition
|
||||
const screenDef = computed(() => registry.getScreen('home.dashboard'))
|
||||
const homeScreenDef = getAllScreens().find(s => s.screenId === 'home.dashboard')
|
||||
const screenDef = computed(() => homeScreenDef)
|
||||
|
||||
// Get all screens from registry (excluding internal-only and home)
|
||||
const allScreens = computed(() =>
|
||||
registry
|
||||
.getAllScreens()
|
||||
.filter(s => s.screenId !== 'home.dashboard' && !s.telemetry?.enabled === false),
|
||||
getAllScreens()
|
||||
.filter(s => s.screenId !== 'home.dashboard' && s.telemetry?.enabled !== false),
|
||||
)
|
||||
|
||||
// Build screen index for quick lookup
|
||||
|
||||
Reference in New Issue
Block a user