From ae409768acf588aa8b4f9bec47188be04129abad Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Tue, 13 May 2025 17:10:28 +0100 Subject: [PATCH] Rename widget type --- docs/configuration.md | 4 ++-- internal/glance/widget-todo.go | 2 +- internal/glance/widget.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index c1b99d8..ea564e6 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1827,12 +1827,12 @@ Greenville, United States ### Todo -A simple todo list that allows you to add, edit and delete tasks. The tasks are stored in the browser's local storage. +A simple to-do list that allows you to add, edit and delete tasks. The tasks are stored in the browser's local storage. Example: ```yaml -- type: todo +- type: to-do ``` Preview: diff --git a/internal/glance/widget-todo.go b/internal/glance/widget-todo.go index ce03423..a261e5d 100644 --- a/internal/glance/widget-todo.go +++ b/internal/glance/widget-todo.go @@ -13,7 +13,7 @@ type todoWidget struct { } func (widget *todoWidget) initialize() error { - widget.withTitle("Todo").withError(nil) + widget.withTitle("To-do").withError(nil) widget.cachedHTML = widget.renderTemplate(widget, todoWidgetTemplate) return nil diff --git a/internal/glance/widget.go b/internal/glance/widget.go index 01a1dfc..50dc3cb 100644 --- a/internal/glance/widget.go +++ b/internal/glance/widget.go @@ -79,7 +79,7 @@ func newWidget(widgetType string) (widget, error) { w = &dockerContainersWidget{} case "server-stats": w = &serverStatsWidget{} - case "todo": + case "to-do": w = &todoWidget{} default: return nil, fmt.Errorf("unknown widget type: %s", widgetType)