2023-01-03 16:58:49 -05:00
|
|
|
package msgerror
|
|
|
|
|
|
|
|
func (m Model) View() string {
|
|
|
|
return m.tk.View(&m, true)
|
|
|
|
}
|
|
|
|
|
|
|
|
func buildView(mi interface{}, cached bool) string {
|
|
|
|
var m *Model = mi.(*Model)
|
|
|
|
|
2023-01-04 15:28:25 -05:00
|
|
|
if vcache := m.tk.DefaultCaching(cached); vcache != "" {
|
|
|
|
m.ctx.Logger.Debugln("Cached View()")
|
|
|
|
return vcache
|
2023-01-03 16:58:49 -05:00
|
|
|
}
|
2023-01-04 15:28:25 -05:00
|
|
|
|
2023-01-03 16:58:49 -05:00
|
|
|
m.ctx.Logger.Debugln("View()")
|
|
|
|
m.ctx.Logger.Debugf("IsFocused: %v\n", m.tk.IsFocused())
|
|
|
|
|
2023-01-04 19:13:04 -05:00
|
|
|
return m.tk.ErrorDialog(
|
|
|
|
"Error",
|
2023-01-03 16:58:49 -05:00
|
|
|
viewportStyle.Render(m.viewport.View()),
|
|
|
|
)
|
|
|
|
}
|