Clean up task editor and time editor
This commit is contained in:
@@ -106,13 +106,13 @@ func NewKeymap() *Keymap {
|
||||
),
|
||||
|
||||
NextPage: key.NewBinding(
|
||||
key.WithKeys("]"),
|
||||
key.WithHelp("[", "Next page"),
|
||||
key.WithKeys("]", "L"),
|
||||
key.WithHelp("]/L", "Next page"),
|
||||
),
|
||||
|
||||
PrevPage: key.NewBinding(
|
||||
key.WithKeys("["),
|
||||
key.WithHelp("]", "Previous page"),
|
||||
key.WithKeys("[", "H"),
|
||||
key.WithHelp("[/H", "Previous page"),
|
||||
),
|
||||
|
||||
SetReport: key.NewBinding(
|
||||
|
||||
@@ -178,7 +178,7 @@ func (t *Task) GetString(fieldWFormat string) string {
|
||||
return t.Recur
|
||||
|
||||
default:
|
||||
slog.Error(fmt.Sprintf("Field not implemented: %s", field))
|
||||
slog.Error("Field not implemented", "field", field)
|
||||
return ""
|
||||
}
|
||||
}
|
||||
@@ -214,7 +214,7 @@ func formatDate(date string, format string) string {
|
||||
dtformat := "20060102T150405Z"
|
||||
dt, err := time.Parse(dtformat, date)
|
||||
if err != nil {
|
||||
slog.Error("Failed to parse time:", err)
|
||||
slog.Error("Failed to parse time", "error", err)
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ func formatDate(date string, format string) string {
|
||||
case "countdown":
|
||||
return parseCountdown(time.Since(dt))
|
||||
default:
|
||||
slog.Error(fmt.Sprintf("Date format not implemented: %s", format))
|
||||
slog.Error("Date format not implemented", "format", format)
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user