UPDATE: Add self update

This commit is contained in:
2025-07-26 20:59:35 +07:00
parent 95f8ed357d
commit 461dfd93ba
28 changed files with 597 additions and 173 deletions

22
internal/app-serrvice.go Normal file
View File

@@ -0,0 +1,22 @@
package internal
import (
"firefly-launcher/pkg/constant"
"time"
"github.com/wailsapp/wails/v3/pkg/application"
)
type AppService struct{}
func (a *AppService) GetCurrentLauncherVersion() (bool, string) {
return true, constant.CurrentLauncherVersion
}
func (a *AppService) CloseAppAfterTimeout(timeout int) (bool, string) {
go func() {
time.Sleep(time.Duration(timeout) * time.Second)
application.Get().Quit()
}()
return true, ""
}