Skip to content

Commit

Permalink
fix(gui): create Entry and password Entry from struct, thus there is …
Browse files Browse the repository at this point in the history
…option to show password as plain text
  • Loading branch information
genshen committed May 1, 2020
1 parent fabd124 commit 227ebc5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions client-ui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func main() {
//w.Resize(fyne.NewSize(100, 100))

// basic input
uiLocalAddr := newEntryWithText("127.0.0.1:1080")
uiRemoteAddr := newEntryWithText("ws://proxy.gensh.me")
uiLocalAddr := &widget.Entry{Text: "127.0.0.1:1080"}
uiRemoteAddr := &widget.Entry{Text: "ws://proxy.gensh.me"}
uiHttpEnable := newCheckbox("", false, nil)
uiHttpLocalAddr := newEntryWithText("127.0.0.1:1086")

Expand All @@ -64,10 +64,9 @@ func main() {
uiVpnEnable := newCheckbox("enable ustb vpn", true, nil)
uiVpnForceLogout := newCheckbox("", true, nil)
uiVpnHostEncrypt := newCheckbox("", true, nil)
uiVpnHostInput := newEntryWithText("n.ustb.edu.cn")
uiVpnUsername := newEntryWithText("")
uiVpnPassword := newEntryWithText("")
uiVpnPassword.Password = true
uiVpnHostInput := &widget.Entry{Text: "n.ustb.edu.cn"}
uiVpnUsername := &widget.Entry{Text: ""}
uiVpnPassword := &widget.Entry{Text: "", Password: true}

loadVPNPreference(wssApp.Preferences(), uiVpnEnable, uiVpnForceLogout,
uiVpnHostEncrypt, uiVpnHostInput, uiVpnUsername, uiVpnPassword)
Expand Down

0 comments on commit 227ebc5

Please sign in to comment.