Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
修订gui,修复listen无法正确加载的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
e1732a364fed committed Dec 28, 2022
1 parent 1c1a221 commit ff93818
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions cmd/verysimple/gui_conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,13 +661,13 @@ func addConfControls(sc proxy.StandardConf, vb *ui.Box, isDial bool) {
shouldStart = true
}

mainM.RemoveAllClient()

mainM.LoadDialConf(sc.Dial)

mainM.RemoveAllServer()

mainM.LoadListenConf(sc.Listen, false)
if isDial {
mainM.RemoveAllClient()
mainM.LoadDialConf(sc.Dial)
} else {
mainM.RemoveAllServer()
mainM.LoadListenConf(sc.Listen, false)
}

if shouldStart {
mainM.Start()
Expand All @@ -679,13 +679,11 @@ func addConfControls(sc proxy.StandardConf, vb *ui.Box, isDial bool) {
}
update(false)

if isDial {
applyBtn := ui.NewButton("提交修改")
vb.Append(ui.NewHorizontalBox(), true)
vb.Append(applyBtn, false)
applyBtn.OnClicked(func(b *ui.Button) {
update(true)
})
applyBtn := ui.NewButton("提交修改")
vb.Append(ui.NewHorizontalBox(), true)
vb.Append(applyBtn, false)
applyBtn.OnClicked(func(b *ui.Button) {
update(true)
})

}
}

0 comments on commit ff93818

Please sign in to comment.