From 82b5275ad76fef240238e9886126f31e66aedfe4 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Sun, 25 Oct 2026 14:17:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=BD=AF=E4=BB=B6=E6=A0=87=E8=AF=86):=20?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=8F=8C=E7=AB=AF=E5=BA=94=E7=94=A8=E6=A0=87?= =?UTF-8?q?=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/webview/webview.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/internal/webview/webview.go b/internal/webview/webview.go index 673e56e..a767427 100644 --- a/internal/webview/webview.go +++ b/internal/webview/webview.go @@ -43,9 +43,6 @@ import ( "github.com/xiaoqidun/ofdgo/internal/webui" ) -// applicationID 标识原生应用,与版本及可执行文件路径无关 -const applicationID = "me.aite.ofdgo" - const applicationVersionURL = "https://ofdgo.aite.me/" const applicationDownloadURL = "https://ofdgo.aite.me/releases/" @@ -977,16 +974,16 @@ func (h *Host) close() { // 入参: dataDir 自定义浏览器数据目录 // 返回: guigo.Options 窗口配置, error 配置错误 func windowOptions(dataDir string) (guigo.Options, error) { + appID := "ofdgo" + if runtime.GOOS == "windows" { + appID = "OFDGo" + } if dataDir == "" { cache, err := os.UserCacheDir() if err != nil { return guigo.Options{}, err } - name := "ofdgo" - if runtime.GOOS == "windows" { - name = "OFDGo" - } - dataDir = filepath.Join(cache, name) + dataDir = filepath.Join(cache, appID) } dataDir, err := filepath.Abs(dataDir) if err != nil { @@ -997,7 +994,7 @@ func windowOptions(dataDir string) (guigo.Options, error) { return guigo.Options{}, err } return guigo.Options{ - AppID: applicationID, + AppID: appID, Title: "OFDGo - OFD编辑器", TitleBar: guigo.TitleBarContent, TitleBarColors: guigo.TitleBarColors{