mirror of
https://gitee.com/konyshe/goodlink.git
synced 2025-09-26 20:51:22 +08:00
optimize version number and icon display
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Website = "https://goodlink.kony.vip"
|
||||
|
||||
[Details]
|
||||
Icon = "assert/favicon.png"
|
||||
Icon = "assert/favicon.ico"
|
||||
Name = "goodlink-windows-amd64-ui"
|
||||
ID = "goodlink.kony.vip"
|
||||
Version = "2.1.2"
|
||||
|
BIN
assert/favicon.ico
Normal file
BIN
assert/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
@@ -4,6 +4,7 @@ package main
|
||||
|
||||
import (
|
||||
"goodlink/config"
|
||||
"goodlink/pro"
|
||||
_ "goodlink/pro"
|
||||
"goodlink/theme"
|
||||
"goodlink/ui2"
|
||||
@@ -25,12 +26,10 @@ func main() {
|
||||
|
||||
myApp := app.New()
|
||||
myApp.Settings().SetTheme(&theme.MyTheme{})
|
||||
icon, _ := fyne.LoadResourceFromPath("./theme/favicon.png")
|
||||
myApp.SetIcon(icon)
|
||||
myWindow := myApp.NewWindow(M_APP_TITLE + " v" + myApp.Metadata().Version)
|
||||
myWindow := myApp.NewWindow(M_APP_TITLE + " v" + pro.GetVersion()) //myApp.Metadata().Version)
|
||||
|
||||
if desk, ok := myApp.(desktop.App); ok {
|
||||
m := fyne.NewMenu(M_APP_TITLE+" v"+myApp.Metadata().Version,
|
||||
m := fyne.NewMenu(M_APP_TITLE,
|
||||
fyne.NewMenuItem("打开主程序", func() {
|
||||
myWindow.Show()
|
||||
}))
|
||||
|
@@ -23,9 +23,9 @@ var (
|
||||
m_md5_tun_key string
|
||||
)
|
||||
|
||||
const (
|
||||
m_version = "2.1.2"
|
||||
)
|
||||
func GetVersion() string {
|
||||
return "2.1.2"
|
||||
}
|
||||
|
||||
func Init() error {
|
||||
utils.Log().Debug("初始化配置中")
|
||||
|
@@ -27,7 +27,7 @@ func GetLocalQuicConn(conn *net.UDPConn, addr *tun.AddrType, count int) (*tun.Tu
|
||||
utils.Log().DebugF("会话ID: %s", SessionID)
|
||||
|
||||
redisJson := RedisJsonType{
|
||||
LocalVersion: m_version,
|
||||
LocalVersion: GetVersion(),
|
||||
State: 0,
|
||||
SessionID: SessionID,
|
||||
ConnectCount: count,
|
||||
@@ -68,7 +68,7 @@ func GetLocalQuicConn(conn *net.UDPConn, addr *tun.AddrType, count int) (*tun.Tu
|
||||
|
||||
switch redisJson.State {
|
||||
case 1:
|
||||
if redisJson.RemoteVersion != m_version {
|
||||
if redisJson.RemoteVersion != GetVersion() {
|
||||
utils.Log().DebugF("两端版本不兼容: %v", redisJson)
|
||||
RedisDel()
|
||||
return tun_active, tun_passive, nil, nil, errors.New("两端版本不兼容")
|
||||
|
@@ -35,7 +35,7 @@ func GetRemoteQuicConn() (*net.UDPConn, *tun.TunActive, *tun.TunPassive, quic.Co
|
||||
time.Sleep(5 * time.Second)
|
||||
}
|
||||
|
||||
redisJson.RemoteVersion = m_version
|
||||
redisJson.RemoteVersion = GetVersion()
|
||||
|
||||
SessionID := redisJson.SessionID
|
||||
log.Printf("会话ID: %s", SessionID)
|
||||
@@ -47,7 +47,7 @@ func GetRemoteQuicConn() (*net.UDPConn, *tun.TunActive, *tun.TunPassive, quic.Co
|
||||
log.Println("会话超时")
|
||||
return udp_conn, tun_active, tun_passive, nil, nil
|
||||
}
|
||||
redisJson.RemoteVersion = m_version
|
||||
redisJson.RemoteVersion = GetVersion()
|
||||
|
||||
//log.Printf("状态消息: %v", redisJson)
|
||||
|
||||
@@ -79,7 +79,7 @@ func GetRemoteQuicConn() (*net.UDPConn, *tun.TunActive, *tun.TunPassive, quic.Co
|
||||
|
||||
redisJson.State = 1
|
||||
|
||||
if redisJson.LocalVersion != m_version {
|
||||
if redisJson.LocalVersion != GetVersion() {
|
||||
utils.Log().DebugF("两端版本不兼容: %v", redisJson)
|
||||
RedisSet(redisJson.SocketTimeOut*3, &redisJson)
|
||||
return udp_conn, tun_active, tun_passive, nil, nil
|
||||
|
Reference in New Issue
Block a user