mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-17 06:30:50 +01:00
fix launcher
This commit is contained in:
@ -123,7 +123,7 @@
|
||||
const props = defineProps<{
|
||||
id: string
|
||||
title: string
|
||||
icon?: string
|
||||
icon?: string | null
|
||||
initialX?: number
|
||||
initialY?: number
|
||||
initialWidth?: number
|
||||
|
||||
@ -51,13 +51,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { SystemWindowDefinition } from '@/stores/desktop/windowManager'
|
||||
|
||||
const extensionStore = useExtensionsStore()
|
||||
const windowManagerStore = useWindowManagerStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const localePath = useLocalePath()
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const open = ref(false)
|
||||
@ -107,35 +103,21 @@ const disabledExtensions = computed(() => {
|
||||
return extensionStore.availableExtensions.filter((ext) => !ext.enabled)
|
||||
})
|
||||
|
||||
const { currentWorkspace } = storeToRefs(useWorkspaceStore())
|
||||
// Open launcher item (system window or extension)
|
||||
const openItem = async (item: LauncherItem) => {
|
||||
// Check if we're on the desktop page
|
||||
const isOnDesktop = route.name === 'desktop'
|
||||
try {
|
||||
// Open the window with correct type and sourceId
|
||||
await windowManagerStore.openWindowAsync({
|
||||
sourceId: item.id,
|
||||
type: item.type,
|
||||
icon: item.icon,
|
||||
title: item.name,
|
||||
})
|
||||
|
||||
console.log('currentWorkspace', currentWorkspace.value, route.name)
|
||||
/* if (!isOnDesktop) {
|
||||
// Navigate to desktop first
|
||||
await router.push(
|
||||
localePath({
|
||||
name: 'desktop',
|
||||
}),
|
||||
)
|
||||
|
||||
// Wait for navigation and DOM update
|
||||
await nextTick()
|
||||
} */
|
||||
|
||||
// Open the window with correct type and sourceId
|
||||
windowManagerStore.openWindow({
|
||||
sourceId: item.id,
|
||||
type: item.type, // 'system' or 'extension'
|
||||
icon: item.icon, // systemWindowId or extensionId
|
||||
title: item.name,
|
||||
workspaceId: currentWorkspace.value?.id,
|
||||
})
|
||||
|
||||
open.value = false
|
||||
open.value = false
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="w-full h-full flex flex-col bg-white dark:bg-gray-900">
|
||||
<!-- Settings Header -->
|
||||
<div class="flex-shrink-0 border-b border-gray-200 dark:border-gray-700 p-6">
|
||||
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
Settings
|
||||
</h1>
|
||||
<div
|
||||
class="flex-shrink-0 border-b border-gray-200 dark:border-gray-700 p-6"
|
||||
>
|
||||
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">Settings</h1>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400 mt-1">
|
||||
Manage your HaexHub preferences and configuration
|
||||
</p>
|
||||
@ -21,9 +21,7 @@
|
||||
<div class="space-y-4 bg-gray-50 dark:bg-gray-800 rounded-lg p-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<p class="font-medium text-gray-900 dark:text-white">
|
||||
Theme
|
||||
</p>
|
||||
<p class="font-medium text-gray-900 dark:text-white">Theme</p>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">
|
||||
Choose your preferred theme
|
||||
</p>
|
||||
@ -65,7 +63,6 @@
|
||||
Lock vault after inactivity
|
||||
</p>
|
||||
</div>
|
||||
<UToggle />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -77,12 +74,20 @@
|
||||
</h2>
|
||||
<div class="space-y-2 bg-gray-50 dark:bg-gray-800 rounded-lg p-4">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-sm text-gray-600 dark:text-gray-400">Version</span>
|
||||
<span class="text-sm font-medium text-gray-900 dark:text-white">0.1.0</span>
|
||||
<span class="text-sm text-gray-600 dark:text-gray-400"
|
||||
>Version</span
|
||||
>
|
||||
<span class="text-sm font-medium text-gray-900 dark:text-white"
|
||||
>0.1.0</span
|
||||
>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<span class="text-sm text-gray-600 dark:text-gray-400">Platform</span>
|
||||
<span class="text-sm font-medium text-gray-900 dark:text-white">Tauri + Vue</span>
|
||||
<span class="text-sm text-gray-600 dark:text-gray-400"
|
||||
>Platform</span
|
||||
>
|
||||
<span class="text-sm font-medium text-gray-900 dark:text-white"
|
||||
>Tauri + Vue</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user