mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-21 10:27:45 +02:00
Rename widget type
This commit is contained in:
parent
baaf306ebf
commit
ae409768ac
@ -1827,12 +1827,12 @@ Greenville, United States
|
|||||||
|
|
||||||
### Todo
|
### 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:
|
Example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- type: todo
|
- type: to-do
|
||||||
```
|
```
|
||||||
|
|
||||||
Preview:
|
Preview:
|
||||||
|
@ -13,7 +13,7 @@ type todoWidget struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (widget *todoWidget) initialize() error {
|
func (widget *todoWidget) initialize() error {
|
||||||
widget.withTitle("Todo").withError(nil)
|
widget.withTitle("To-do").withError(nil)
|
||||||
|
|
||||||
widget.cachedHTML = widget.renderTemplate(widget, todoWidgetTemplate)
|
widget.cachedHTML = widget.renderTemplate(widget, todoWidgetTemplate)
|
||||||
return nil
|
return nil
|
||||||
|
@ -79,7 +79,7 @@ func newWidget(widgetType string) (widget, error) {
|
|||||||
w = &dockerContainersWidget{}
|
w = &dockerContainersWidget{}
|
||||||
case "server-stats":
|
case "server-stats":
|
||||||
w = &serverStatsWidget{}
|
w = &serverStatsWidget{}
|
||||||
case "todo":
|
case "to-do":
|
||||||
w = &todoWidget{}
|
w = &todoWidget{}
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unknown widget type: %s", widgetType)
|
return nil, fmt.Errorf("unknown widget type: %s", widgetType)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user