Remove widget resizing and edit mode from dashboard
Some checks failed
Build Frontend / build (push) Failing after 7s

Eliminated the ability to resize dashboard widgets by removing colSpan from WidgetConfig, related UI, and logic. Removed edit mode functionality and the EditDashboardButton, simplifying the dashboard layout and widget management. Updated drag-and-drop strategy to vertical list and incremented the storage key version.
This commit is contained in:
g
2026-01-12 11:13:25 +00:00
parent 9acd18955e
commit a6e6cd0757
5 changed files with 23 additions and 103 deletions

View File

@@ -1,6 +1,6 @@
"use client"
import React from "react"
import React, { useState, useEffect, useRef } from "react"
import { useSortable } from "@dnd-kit/sortable"
import { CSS } from "@dnd-kit/utilities"
import { GripVertical, Settings, X, Eye, EyeOff } from "lucide-react"
@@ -41,21 +41,12 @@ export function DraggableWidget({
zIndex: isDragging ? 1000 : 1,
}
const colSpanClasses = {
1: "lg:col-span-1",
2: "lg:col-span-2",
3: "lg:col-span-3",
4: "lg:col-span-4",
}[widget.colSpan || 4] || "lg:col-span-4"
return (
<div
ref={setNodeRef}
style={style}
className={cn(
"relative group",
colSpanClasses,
"md:col-span-2", // Default to 2 columns on tablet
isEditMode && "ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg",
isDragging && "z-50 shadow-2xl"
)}