Skip to content

Commit

Permalink
Open NodeUI after first install
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Litvinov <jnashicq@gmail.com>
  • Loading branch information
Zensey committed Oct 30, 2023
1 parent 557ce3a commit ac2b09c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
7 changes: 6 additions & 1 deletion controller/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@ func (c *Controller) startContainer() {
mdl.Config.InitialState = model_.InitialStateNormalRun
mdl.Config.Save()

ui.ShowNotificationInstalled()
if ui != nil {
ui.ShowNotificationInstalled()
ui.OpenNodeUI()
} else {
c.lg.Println("node installed!")
}
}
}
12 changes: 7 additions & 5 deletions controller/native/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,13 @@ func (c *Controller) startContainer() {
case model_.InitialStateFirstRunAfterInstall, model_.InitialStateUndefined:
cfg.InitialState = model_.InitialStateNormalRun
cfg.Save()
if ui != nil {
ui.ShowNotificationInstalled()
} else {
c.lg.Println("node installed!")
}

if ui != nil {
ui.ShowNotificationInstalled()
ui.OpenNodeUI()
} else {
c.lg.Println("node installed!")
}
}
}
}
4 changes: 4 additions & 0 deletions gui-win32/notifyicon.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ func (g *Gui) CreateNotifyIcon(ui *model.UIModel) {
g.ni.SetVisible(true)
}

func (g *Gui) OpenNodeUI() {
OpenNodeUI()
}

func (g *Gui) ShowNotificationInstalled() {
g.lastNotificationID = NotificationContainerStarted
if g.ni == nil {
Expand Down
1 change: 1 addition & 0 deletions model/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type Gui_ interface {
ShowMain()
ShowNotificationInstalled()
ShowNotificationUpgrade()
OpenNodeUI()

ConfirmModal(title, message string) int
YesNoModal(title, message string) int
Expand Down

0 comments on commit ac2b09c

Please sign in to comment.