new tab flow (#60)

* init

* init

* error handling

* use css

* minor improvements

* fix some issues and tabicon init

* show error indicator when empty and is required

* debounce input

* fix decorator linting issue

* icon system init

* fix bugs

* color custom icons and fix regression

* remove debugging code

* remove @tab-magenta. fix formatting.

* swap magenta for mint

* change tab color order
This commit is contained in:
Red J Adaya
2023-11-07 00:04:25 -08:00
committed by GitHub
parent f8d3c0c19c
commit 847de1fc60
16 changed files with 600 additions and 89 deletions
+5
View File
@@ -1709,6 +1709,7 @@ const (
ScreenField_SelectedLine = "selectedline" // int
ScreenField_Focus = "focustype" // string
ScreenField_TabColor = "tabcolor" // string
ScreenField_TabIcon = "tabicon" // string
ScreenField_PTerm = "pterm" // string
ScreenField_Name = "name" // string
ScreenField_ShareName = "sharename" // string
@@ -1743,6 +1744,10 @@ func UpdateScreen(ctx context.Context, screenId string, editMap map[string]inter
query = `UPDATE screen SET screenopts = json_set(screenopts, '$.tabcolor', ?) WHERE screenid = ?`
tx.Exec(query, tabColor, screenId)
}
if tabIcon, found := editMap[ScreenField_TabIcon]; found {
query = `UPDATE screen SET screenopts = json_set(screenopts, '$.tabicon', ?) WHERE screenid = ?`
tx.Exec(query, tabIcon, screenId)
}
if pterm, found := editMap[ScreenField_PTerm]; found {
query = `UPDATE screen SET screenopts = json_set(screenopts, '$.pterm', ?) WHERE screenid = ?`
tx.Exec(query, pterm, screenId)
+1
View File
@@ -433,6 +433,7 @@ func (h *HistoryItemType) FromMap(m map[string]interface{}) bool {
type ScreenOptsType struct {
TabColor string `json:"tabcolor,omitempty"`
TabIcon string `json:"tabicon,omitempty"`
PTerm string `json:"pterm,omitempty"`
}