Open in browser

Most containers expose some http port. We can open it in browser.
For simplicity we can just open first container's published port.
We'll determine the ip:port on container creation and store to meta "Web Port".
To open browser on any platform was added a new dependency github.com/pkg/browser which is very small
This commit is contained in:
Sergey Ponomarev
2020-12-12 21:21:53 +02:00
parent b562c923b3
commit dd92e85d45
5 changed files with 50 additions and 0 deletions

View File

@@ -162,6 +162,9 @@ func Display() bool {
menu = ExecShell
ui.StopLoop()
})
ui.Handle("/sys/kbd/w", func(ui.Event) {
menu = OpenInBrowser()
})
ui.Handle("/sys/kbd/o", func(ui.Event) {
menu = SingleView
ui.StopLoop()