fix(dashboard): noCompactor + note edit/preview toggle + widget border
- dashboard-grid: add noCompactor to prevent auto-compaction on drag - note-widget: edit/preview toggle button (pencil icon), isEditing state, hideToolbar in preview mode - widget-wrapper: border-primary/20 accent border - dashboard-store: console.error on widget add/remove/layout-save failures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -81,8 +81,8 @@ export const useDashboardStore = create<DashboardState>()((set, get) => ({
|
||||
isDirty: true,
|
||||
};
|
||||
});
|
||||
} catch {
|
||||
set({ error: 'Failed to add widget' });
|
||||
} catch (err) {
|
||||
console.error('Failed to add widget:', err);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -100,8 +100,8 @@ export const useDashboardStore = create<DashboardState>()((set, get) => ({
|
||||
isDirty: true,
|
||||
};
|
||||
});
|
||||
} catch {
|
||||
set({ error: 'Failed to remove widget' });
|
||||
} catch (err) {
|
||||
console.error('Failed to remove widget:', err);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -129,8 +129,8 @@ export const useDashboardStore = create<DashboardState>()((set, get) => ({
|
||||
try {
|
||||
await api.saveLayout(get().layouts);
|
||||
set({ isDirty: false });
|
||||
} catch {
|
||||
set({ error: 'Failed to save layout' });
|
||||
} catch (err) {
|
||||
console.error('Failed to save layout:', err);
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user