refactor(frontend): migracion a Mantine y limpieza de widgets
- Migra el frontend a Mantine v9 siguiendo la regla de theming del registry (@fn_library, sin Tailwind/cn/CVA). - Reescribe DashboardShell, FilterBar, Section, WidgetRenderer y todos los widgets (Area/Bar/Line/Pie/KPI/Sparkline/Table) con componentes y props de Mantine. - Ajusta vite.config, main.tsx, App.tsx, app.css y env.d.ts. - Añade postcss.config.cjs requerido por Mantine. - Actualiza package.json y pnpm-lock. - Ajusta config.go, main.go y los ejemplos (fn_registry_apps/overview) para el nuevo esquema de tipos en frontend/src/types.ts.
This commit is contained in:
@@ -25,6 +25,7 @@ type Settings struct {
|
||||
Width int `yaml:"width" json:"width"`
|
||||
Height int `yaml:"height" json:"height"`
|
||||
Columns int `yaml:"columns" json:"columns"`
|
||||
Layout string `yaml:"layout" json:"layout"` // "scrollable" (default) or "single_view"
|
||||
}
|
||||
|
||||
type ConnConfig struct {
|
||||
@@ -127,6 +128,12 @@ func (c *DashboardConfig) validate() error {
|
||||
if c.Theme == "" {
|
||||
c.Theme = "dark"
|
||||
}
|
||||
if c.Settings.Layout == "" {
|
||||
c.Settings.Layout = "scrollable"
|
||||
}
|
||||
if c.Settings.Layout != "scrollable" && c.Settings.Layout != "single_view" {
|
||||
return fmt.Errorf("settings.layout must be 'scrollable' or 'single_view', got %q", c.Settings.Layout)
|
||||
}
|
||||
|
||||
if len(c.Connections) == 0 {
|
||||
return fmt.Errorf("at least one connection is required")
|
||||
|
||||
Reference in New Issue
Block a user