Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

type App struct {
AutomaticWindowOpening bool `toml:"automatic_window_opening"`
AutomaticWindowOpening string `toml:"automatic_window_opening"`
}

type Adj struct {
Expand Down
7 changes: 6 additions & 1 deletion backend/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,12 @@ func main() {
}

// Open browser tabs
if config.App.AutomaticWindowOpening {
switch config.App.AutomaticWindowOpening {
case "ethernet-view":
browser.OpenURL("http://" + config.Server["ethernet-view"].Addr)
case "control-station":
browser.OpenURL("http://" + config.Server["control-station"].Addr)
case "both":
browser.OpenURL("http://" + config.Server["ethernet-view"].Addr)
browser.OpenURL("http://" + config.Server["control-station"].Addr)
}
Expand Down
Loading