Split app UI layout packages

This commit is contained in:
Joe Julian
2026-04-09 09:20:57 -07:00
parent c442a20d3e
commit ccaee9fa34
10 changed files with 4230 additions and 4130 deletions
+26
View File
@@ -0,0 +1,26 @@
package detail
type Mode string
const (
ModeLocked Mode = "locked"
ModeStatic Mode = "static"
ModeEmpty Mode = "empty"
ModeEditor Mode = "editor"
ModeView Mode = "view"
)
func Resolve(isLocked bool, hasStaticPanel bool, hasSelectedEntry bool, editing bool) Mode {
switch {
case isLocked:
return ModeLocked
case hasStaticPanel:
return ModeStatic
case !hasSelectedEntry && !editing:
return ModeEmpty
case editing:
return ModeEditor
default:
return ModeView
}
}