Merge branch 'develop' into show_console_in_ui_options

This commit is contained in:
Vadym Vikulin 2022-12-11 19:43:56 +02:00 committed by GitHub
commit c23cff9373
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 841 additions and 568 deletions

File diff suppressed because it is too large Load diff

6
contrib/ui/mesh-ui/webview.go Executable file → Normal file
View file

@ -21,7 +21,6 @@ import (
"github.com/RiV-chain/RiV-mesh/src/admin"
"github.com/docopt/docopt-go"
)
var usage = `Graphical interface for RiV mesh.
Usage:
@ -39,9 +38,11 @@ var confui struct {
IndexHtml string `docopt:"<index>"`
Console bool `docopt:"-c,--console"`
}
=======
var uiVersion = "0.0.1"
func main() {
opts, _ := docopt.ParseArgs(usage, os.Args[1:], "0.0.1")
opts, _ := docopt.ParseArgs(usage, os.Args[1:], uiVersion)
opts.Bind(&confui)
if !confui.Console {
Console(false)
@ -220,6 +221,7 @@ func get_self(w webview.WebView) {
go setFieldValue(w, "ipv6", res.IPAddress)
go setFieldValue(w, "pub_key", res.PublicKey)
go setFieldValue(w, "priv_key", res.PrivateKey)
go setFieldValue(w, "version", fmt.Sprintf("v%v/%v", res.BuildVersion, uiVersion))
//found subnet
fmt.Printf("Subnet: %s\n", res.Subnet)
go setFieldValue(w, "subnet", res.Subnet)