Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronya0 committed Oct 20, 2024
1 parent 171acd7 commit 5a923c3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package main

import (
"app/backend/common"
"context"
"crypto/tls"
"fmt"
"github.com/go-resty/resty/v2"
"runtime"
)

// App struct
Expand All @@ -24,6 +28,16 @@ func (a *App) Start(ctx context.Context) {
// domReady is called after front-end resources have been loaded
func (a *App) domReady(ctx context.Context) {
// Add your action here

// 统计版本使用情况
client := resty.New().SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
body := map[string]interface{}{
"name": "ES-King",
"version": common.Version,
"platform": runtime.GOOS,
}
_, _ = client.R().SetBody(body).Post(common.PingUrl)

}

// beforeClose is called when the application is about to quit,
Expand Down
1 change: 1 addition & 0 deletions app/backend/common/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const (
Theme = "dark"
ConfigPath = "config.yaml"
Language = "zh-CN"
PingUrl = "https://ysboke.cn/api/kingTool/ping"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>wails-naive-demo</title>
<script type="module" crossorigin src="/assets/index-DushsheG.js"></script>
<script type="module" crossorigin src="/assets/index-SlV8krIg.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-D0jh2OTe.css">
</head>
<body>
Expand Down
1 change: 1 addition & 0 deletions app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func main() {
WebviewIsTransparent: false,
WindowIsTranslucent: false,
DisableFramelessWindowDecorations: false,
ResizeDebounceMS: 2,
},
Linux: &linux.Options{
ProgramName: common.AppName,
Expand Down

0 comments on commit 5a923c3

Please sign in to comment.