reorganized window

This commit is contained in:
2025-10-21 13:49:29 +02:00
parent df97a3cb8b
commit e268947593
11 changed files with 1547 additions and 248 deletions

View File

@ -41,6 +41,18 @@ export const useWindowManagerStore = defineStore('windowManager', () => {
// System Windows Registry
const systemWindows: Record<string, SystemWindowDefinition> = {
developer: {
id: 'developer',
name: 'Developer',
icon: 'i-hugeicons-developer',
component: defineAsyncComponent(
() => import('@/components/haex/system/developer.vue'),
) as Component,
defaultWidth: 800,
defaultHeight: 600,
resizable: true,
singleton: true,
},
settings: {
id: 'settings',
name: 'Settings',
@ -169,8 +181,15 @@ export const useWindowManagerStore = defineStore('windowManager', () => {
const viewportWidth = window.innerWidth
const viewportHeight = window.innerHeight
const windowWidth = width > viewportWidth ? viewportWidth : width
const windowHeight = height > viewportHeight ? viewportHeight : height
const windowHeight = Math.min(height, viewportHeight)
// Adjust width proportionally if needed (optional)
const aspectRatio = width / height
const windowWidth = Math.min(
width,
viewportWidth,
windowHeight * aspectRatio,
)
// Calculate centered position with cascading offset (only count windows in current workspace)
const offset = currentWorkspaceWindows.value.length * 30