initial framework for additional screens
This commit is contained in:
@@ -20,7 +20,10 @@ type App struct {
|
|||||||
|
|
||||||
help *help.Help
|
help *help.Help
|
||||||
assets *assets.Assets
|
assets *assets.Assets
|
||||||
menu *tview.TextView
|
// shelves *shelves.Shelves
|
||||||
|
// categories *categories.Categories
|
||||||
|
// buildings *buildings.Buildings
|
||||||
|
menu *tview.TextView
|
||||||
|
|
||||||
currentPage string
|
currentPage string
|
||||||
needInitUI bool
|
needInitUI bool
|
||||||
@@ -45,6 +48,9 @@ func NewApp(name, version, host string, logger *zap.Logger) *App {
|
|||||||
menuItems := [][]string{
|
menuItems := [][]string{
|
||||||
{utils.HelpScreenKey.Label(), app.help.GetTitle()},
|
{utils.HelpScreenKey.Label(), app.help.GetTitle()},
|
||||||
{utils.AssetsScreenKey.Label(), app.assets.GetTitle()},
|
{utils.AssetsScreenKey.Label(), app.assets.GetTitle()},
|
||||||
|
//{utils.ShelvesScreenKey.Label(), app.shelves.GetTitle()},
|
||||||
|
//{utils.CategoriesScreenKey.Label(), app.categories.GetTitle()},
|
||||||
|
//{utils.BuildingsScreenKey.Label(), app.buildings.GetTitle()},
|
||||||
}
|
}
|
||||||
|
|
||||||
app.menu = makeMenu(menuItems)
|
app.menu = makeMenu(menuItems)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func (a *Assets) cdelete() {
|
|||||||
title := "delete asset"
|
title := "delete asset"
|
||||||
a.confirmDialog.SetTitle(title)
|
a.confirmDialog.SetTitle(title)
|
||||||
a.confirmData = status_CONFIRM_DELETE_ASSET
|
a.confirmData = status_CONFIRM_DELETE_ASSET
|
||||||
bgColor := style.GetColorHex(style.DialogBorderColor)
|
bgColor := style.GetColorHex(style.DialogSubBoxBorderColor)
|
||||||
fgColor := style.GetColorHex(style.DialogFgColor)
|
fgColor := style.GetColorHex(style.DialogFgColor)
|
||||||
|
|
||||||
assetName := fmt.Sprintf("[%s:%s:b]ASSET NAME:[:-:-] %s", fgColor, bgColor, selectedItem.item)
|
assetName := fmt.Sprintf("[%s:%s:b]ASSET NAME:[:-:-] %s", fgColor, bgColor, selectedItem.item)
|
||||||
|
|||||||
@@ -81,6 +81,21 @@ var (
|
|||||||
KeyLabel: "F2",
|
KeyLabel: "F2",
|
||||||
KeyDesc: "display assets screen",
|
KeyDesc: "display assets screen",
|
||||||
}
|
}
|
||||||
|
ShelvesScreenKey = uiKeyInfo{
|
||||||
|
Key: tcell.KeyF3,
|
||||||
|
KeyLabel: "F3",
|
||||||
|
KeyDesc: "display shelves screen",
|
||||||
|
}
|
||||||
|
CategoriesScreenKey = uiKeyInfo{
|
||||||
|
Key: tcell.KeyF4,
|
||||||
|
KeyLabel: "F4",
|
||||||
|
KeyDesc: "display categories screen",
|
||||||
|
}
|
||||||
|
BuildingsScreenKey = uiKeyInfo{
|
||||||
|
Key: tcell.KeyF5,
|
||||||
|
KeyLabel: "F5",
|
||||||
|
KeyDesc: "display buildings screen",
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
var UIKeyBindings = []uiKeyInfo{
|
var UIKeyBindings = []uiKeyInfo{
|
||||||
@@ -98,6 +113,9 @@ var UIKeyBindings = []uiKeyInfo{
|
|||||||
AppExitKey,
|
AppExitKey,
|
||||||
HelpScreenKey,
|
HelpScreenKey,
|
||||||
AssetsScreenKey,
|
AssetsScreenKey,
|
||||||
|
ShelvesScreenKey,
|
||||||
|
CategoriesScreenKey,
|
||||||
|
BuildingsScreenKey,
|
||||||
}
|
}
|
||||||
|
|
||||||
type uiKeyInfo struct {
|
type uiKeyInfo struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user