26 lines
1.1 KiB
Python
26 lines
1.1 KiB
Python
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class WidgetType:
|
|
id: str
|
|
title: str
|
|
description: str
|
|
icon: str
|
|
template: str
|
|
default_span: int = 1
|
|
multiple: bool = False
|
|
settings_keys: tuple = ()
|
|
|
|
|
|
WIDGETS = {
|
|
widget.id: widget for widget in (
|
|
WidgetType("welcome", "Welcome", "A starting point for your space", "bi-sun", "dashboard/widgets/welcome.html", 2),
|
|
WidgetType("notes", "Quick notes", "A short personal note", "bi-sticky", "dashboard/widgets/notes.html", 1, True, ("text",)),
|
|
WidgetType("shortcuts", "Shortcuts", "Links to useful pages", "bi-grid", "dashboard/widgets/shortcuts.html"),
|
|
WidgetType("open_meteo", "Weather forecast", "Current weather and hourly outlook from Open-Meteo", "bi-cloud-sun", "dashboard/widgets/open_meteo.html", 2),
|
|
WidgetType("buienradar", "Rain radar", "Netherlands radar and local rain forecast from Buienradar", "bi-cloud-rain", "dashboard/widgets/buienradar.html", 2),
|
|
WidgetType("codex_usage", "Codex usage", "Remaining five-hour and weekly capacity", "bi-speedometer2", "dashboard/widgets/codex_usage.html", 2),
|
|
)
|
|
}
|