fix: add a widget registry and "add widget" picker (#21)
CI / build-and-test (pull_request) Successful in 2m25s
CI / build-and-test (pull_request) Successful in 2m25s
"Widget hinzufügen" appended an empty placeholder card, so a widget closed via its X was gone until a page reload. Widget types now live in a WidgetRegistry (WidgetDefinition: type id, title key, default size, content factory); the toolbar button opens a picker dialog over the registry, and the dashboard builds its initial widgets from it too. Chart construction moves from DashboardView into the registry factories, which resolve translation keys through the chart component so they follow the UI locale. Added widgets get an id of "<type>-<n>" from a monotonically growing counter, so a closed widget's id is never handed to a new one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0124BiJikbhbiEsNfJxdWM69
This commit is contained in:
@@ -27,8 +27,7 @@ gridstack.addWidget=Añadir widget
|
||||
gridstack.reset=Restablecer diseño
|
||||
gridstack.status=Diseño modificado – {0} widgets
|
||||
gridstack.statusInitial=Diseño sin cambios
|
||||
gridstack.widget=Widget {0}
|
||||
gridstack.widgetText=Tarjeta de colocación libre.
|
||||
gridstack.pickerTitle=Elegir un widget
|
||||
gridstack.dragHandle=Mover
|
||||
gridstack.close=Cerrar
|
||||
|
||||
|
||||
Reference in New Issue
Block a user