(ns *docker.Namespace, installImageRef string)
| 265 | } |
| 266 | |
| 267 | func Run(ns *docker.Namespace, installImageRef string) error { |
| 268 | slog.Info("Starting ONCE UI", "version", version.Version) |
| 269 | defer func() { slog.Info("Stopping ONCE UI") }() |
| 270 | |
| 271 | detected := DetectTerminalColors(100 * time.Millisecond) |
| 272 | ApplyPalette(NewPalette(detected)) |
| 273 | |
| 274 | app := NewApp(ns, installImageRef) |
| 275 | |
| 276 | var opts []tea.ProgramOption |
| 277 | if detected.SupportsTrueColor() { |
| 278 | opts = append(opts, tea.WithColorProfile(colorprofile.TrueColor)) |
| 279 | } |
| 280 | |
| 281 | _, err := tea.NewProgram(app, opts...).Run() |
| 282 | return err |
| 283 | } |
| 284 | |
| 285 | // Private |
| 286 |
no test coverage detected