mirror of
https://github.com/boolean-maybe/tiki
synced 2026-04-21 13:37:20 +00:00
missing type default
This commit is contained in:
parent
2a50feb6fb
commit
936942d7b5
6 changed files with 29 additions and 6 deletions
|
|
@ -48,6 +48,12 @@ views:
|
|||
- key: "Y"
|
||||
label: "Copy content"
|
||||
action: select title, description where id = id() | clipboard()
|
||||
- key: "+"
|
||||
label: "Priority up"
|
||||
action: update where id = id() set priority = priority - 1
|
||||
- key: "-"
|
||||
label: "Priority down"
|
||||
action: update where id = id() set priority = priority + 1
|
||||
plugins:
|
||||
- name: Kanban
|
||||
description: "Move tiki to new status, search, create or delete"
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ func DefaultGlobalActions() *ActionRegistry {
|
|||
r.Register(Action{ID: ActionQuit, Key: tcell.KeyRune, Rune: 'q', Label: "Quit", ShowInHeader: true})
|
||||
r.Register(Action{ID: ActionRefresh, Key: tcell.KeyRune, Rune: 'r', Label: "Refresh", ShowInHeader: true})
|
||||
r.Register(Action{ID: ActionToggleHeader, Key: tcell.KeyF10, Label: "Toggle Header", ShowInHeader: true})
|
||||
r.Register(Action{ID: ActionOpenPalette, Key: tcell.KeyRune, Rune: '?', Label: "Actions", ShowInHeader: false, HideFromPalette: true})
|
||||
r.Register(Action{ID: ActionOpenPalette, Key: tcell.KeyRune, Rune: '?', Label: "All", ShowInHeader: true, HideFromPalette: true})
|
||||
return r
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -419,11 +419,14 @@ func TestDefaultGlobalActions(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// ActionOpenPalette should NOT show in header
|
||||
// ActionOpenPalette should show in header with label "All"
|
||||
for _, a := range actions {
|
||||
if a.ID == ActionOpenPalette {
|
||||
if a.ShowInHeader {
|
||||
t.Error("ActionOpenPalette should have ShowInHeader=false")
|
||||
if !a.ShowInHeader {
|
||||
t.Error("ActionOpenPalette should have ShowInHeader=true")
|
||||
}
|
||||
if a.Label != "All" {
|
||||
t.Errorf("ActionOpenPalette label = %q, want %q", a.Label, "All")
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,10 +121,12 @@ func (s *TikiStore) loadTaskFile(path string, authorMap map[string]*git.AuthorIn
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// validate type strictly — missing or unknown types are load errors
|
||||
taskType, typeOK := taskpkg.ParseType(fm.Type)
|
||||
if !typeOK {
|
||||
return nil, fmt.Errorf("invalid or missing type %q", fm.Type)
|
||||
if fm.Type != "" {
|
||||
return nil, fmt.Errorf("unknown type %q", fm.Type)
|
||||
}
|
||||
taskType = taskpkg.DefaultType()
|
||||
}
|
||||
|
||||
task := &taskpkg.Task{
|
||||
|
|
|
|||
|
|
@ -68,6 +68,12 @@ views:
|
|||
- key: "Y"
|
||||
label: "Copy content"
|
||||
action: select title, description where id = id() | clipboard()
|
||||
- key: "+"
|
||||
label: "Priority up"
|
||||
action: update where id = id() set priority = priority - 1
|
||||
- key: "-"
|
||||
label: "Priority down"
|
||||
action: update where id = id() set priority = priority + 1
|
||||
- key: "R"
|
||||
label: "Mark regression"
|
||||
action: update where id = id() set regression=true
|
||||
|
|
|
|||
|
|
@ -49,6 +49,12 @@ views:
|
|||
- key: "Y"
|
||||
label: "Copy content"
|
||||
action: select title, description where id = id() | clipboard()
|
||||
- key: "+"
|
||||
label: "Priority up"
|
||||
action: update where id = id() set priority = priority - 1
|
||||
- key: "-"
|
||||
label: "Priority down"
|
||||
action: update where id = id() set priority = priority + 1
|
||||
plugins:
|
||||
- name: Kanban
|
||||
description: "Move tiki to new status, search, create or delete"
|
||||
|
|
|
|||
Loading…
Reference in a new issue