62 lines
2.0 KiB
Go
62 lines
2.0 KiB
Go
|
|
package ui
|
||
|
|
|
||
|
|
import "html/template"
|
||
|
|
|
||
|
|
// UI represents user interface translations and configuration
|
||
|
|
type UI struct {
|
||
|
|
InfoModal InfoModal `json:"infoModal"`
|
||
|
|
ShortcutsModal ShortcutsModal `json:"shortcutsModal"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type InfoModal struct {
|
||
|
|
Title string `json:"title"`
|
||
|
|
Description template.HTML `json:"description"`
|
||
|
|
TechStack TechStack `json:"techStack"`
|
||
|
|
ViewSource string `json:"viewSource"`
|
||
|
|
ViewSourceSubtext string `json:"viewSourceSubtext"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type TechStack struct {
|
||
|
|
GoHono string `json:"goHono"`
|
||
|
|
HTMX string `json:"htmx"`
|
||
|
|
HTML5 string `json:"html5"`
|
||
|
|
CSS3 string `json:"css3"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type ShortcutsModal struct {
|
||
|
|
Title string `json:"title"`
|
||
|
|
Description string `json:"description"`
|
||
|
|
Sections ShortcutsSections `json:"sections"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type ShortcutsSections struct {
|
||
|
|
Zoom ShortcutGroup `json:"zoom"`
|
||
|
|
ViewControls ShortcutGroup `json:"viewControls"`
|
||
|
|
Navigation ShortcutGroup `json:"navigation"`
|
||
|
|
Actions ShortcutGroup `json:"actions"`
|
||
|
|
Browser ShortcutGroup `json:"browser"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type ShortcutGroup struct {
|
||
|
|
Title string `json:"title"`
|
||
|
|
ZoomIn *ShortcutItem `json:"zoomIn,omitempty"`
|
||
|
|
ZoomOut *ShortcutItem `json:"zoomOut,omitempty"`
|
||
|
|
ZoomReset *ShortcutItem `json:"zoomReset,omitempty"`
|
||
|
|
ToggleLength *ShortcutItem `json:"toggleLength,omitempty"`
|
||
|
|
ToggleIcons *ShortcutItem `json:"toggleIcons,omitempty"`
|
||
|
|
ToggleTheme *ShortcutItem `json:"toggleTheme,omitempty"`
|
||
|
|
ExpandAll *ShortcutItem `json:"expandAll,omitempty"`
|
||
|
|
CollapseAll *ShortcutItem `json:"collapseAll,omitempty"`
|
||
|
|
ScrollToTop *ShortcutItem `json:"scrollToTop,omitempty"`
|
||
|
|
Print *ShortcutItem `json:"print,omitempty"`
|
||
|
|
CloseModal *ShortcutItem `json:"closeModal,omitempty"`
|
||
|
|
ShowHelp *ShortcutItem `json:"showHelp,omitempty"`
|
||
|
|
Tab *ShortcutItem `json:"tab,omitempty"`
|
||
|
|
Enter *ShortcutItem `json:"enter,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type ShortcutItem struct {
|
||
|
|
Key string `json:"key"`
|
||
|
|
Description string `json:"description"`
|
||
|
|
}
|