mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-17 06:30:50 +01:00
Add device management and database-backed desktop settings
This update migrates desktop grid settings from localStorage to the database and introduces a comprehensive device management system. Features: - New haex_devices table for device identification and naming - Device-specific settings with foreign key relationships - Preset-based icon sizes (Small, Medium, Large, Extra Large) - Grid positioning improvements to prevent dragging behind PageHeader - Dynamic icon sizing based on database settings Database Changes: - Created haex_devices table with deviceId (UUID) and name columns - Modified haex_settings to include device_id FK and updated unique constraint - Migration 0002_loose_quasimodo.sql for schema changes Technical Improvements: - Replaced arbitrary icon size slider (60-200px) with preset system - Icons use actual measured dimensions for proper grid centering - Settings sync on vault mount for cross-device consistency - Proper bounds checking during icon drag operations Bump version to 0.1.7
This commit is contained in:
@ -59,47 +59,7 @@
|
||||
</main>
|
||||
|
||||
<!-- Workspace Drawer -->
|
||||
<UDrawer
|
||||
v-model:open="isOverviewMode"
|
||||
direction="left"
|
||||
:dismissible="false"
|
||||
:overlay="false"
|
||||
:modal="false"
|
||||
title="Workspaces"
|
||||
description="Workspaces"
|
||||
>
|
||||
<template #content>
|
||||
<div class="p-6 h-full overflow-y-auto">
|
||||
<UButton
|
||||
block
|
||||
trailing-icon="mdi-close"
|
||||
class="text-2xl font-bold ext-gray-900 dark:text-white mb-4"
|
||||
@click="isOverviewMode = false"
|
||||
>
|
||||
Workspaces
|
||||
</UButton>
|
||||
|
||||
<!-- Workspace Cards -->
|
||||
<div class="flex flex-col gap-3">
|
||||
<HaexWorkspaceCard
|
||||
v-for="workspace in workspaces"
|
||||
:key="workspace.id"
|
||||
:workspace
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Add New Workspace Button -->
|
||||
<UButton
|
||||
block
|
||||
variant="outline"
|
||||
class="mt-6"
|
||||
@click="handleAddWorkspace"
|
||||
icon="i-heroicons-plus"
|
||||
:label="t('workspaces.add')"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</UDrawer>
|
||||
<HaexWorkspaceDrawer />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -116,15 +76,7 @@ const { showWindowOverview, openWindowsCount } = storeToRefs(
|
||||
useWindowManagerStore(),
|
||||
)
|
||||
|
||||
const workspaceStore = useWorkspaceStore()
|
||||
const { workspaces, isOverviewMode } = storeToRefs(workspaceStore)
|
||||
|
||||
const handleAddWorkspace = async () => {
|
||||
const workspace = await workspaceStore.addWorkspaceAsync()
|
||||
nextTick(() => {
|
||||
workspaceStore.slideToWorkspace(workspace?.id)
|
||||
})
|
||||
}
|
||||
const { isOverviewMode } = storeToRefs(useWorkspaceStore())
|
||||
|
||||
// Measure header height and store it in UI store
|
||||
const headerEl = useTemplateRef('headerEl')
|
||||
@ -140,15 +92,11 @@ watch(height, (newHeight) => {
|
||||
de:
|
||||
search:
|
||||
label: Suche
|
||||
|
||||
workspaces:
|
||||
label: Workspaces
|
||||
add: Workspace hinzufügen
|
||||
en:
|
||||
search:
|
||||
label: Search
|
||||
|
||||
workspaces:
|
||||
label: Workspaces
|
||||
add: Add Workspace
|
||||
</i18n>
|
||||
|
||||
Reference in New Issue
Block a user