Add Store MSIX packaging and dark/light theme for 2.9.0.

EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Navis
2026-08-01 14:12:30 +03:00
co-authored by Cursor
parent 93017e2076
commit d42202a1cf
17 changed files with 706 additions and 63 deletions
+16
View File
@@ -56,6 +56,7 @@ type uiState struct {
Pings []netcheck.Result `json:"pings"`
Subscription string `json:"subscription_url"`
Hy2 core.Hy2Options `json:"hy2"`
StorePackaged bool `json:"store_packaged,omitempty"`
}
func main() {
@@ -209,6 +210,7 @@ func (a *app) getState() (uiState, error) {
Pings: append([]netcheck.Result(nil), a.pings...),
Subscription: cfg.SubscriptionURL,
Hy2: a.mgr.ActiveHy2Options(),
StorePackaged: update.IsStorePackaged(),
}
if out.Protocol == "" {
if p, err := cfg.ActiveProfile(); err == nil {
@@ -428,6 +430,9 @@ func (a *app) checkUpdate() (update.Status, error) {
}
func (a *app) applyUpdate() (string, error) {
if update.IsStorePackaged() {
return "", fmt.Errorf("обновления устанавливаются через Microsoft Store")
}
// Explicit user action only — never called from autoCheckUpdate.
st, err := a.checkUpdate()
if err != nil {
@@ -455,6 +460,17 @@ func (a *app) autoCheckUpdate() {
// Only refresh update status for the UI banner — never auto-install.
// (Previously auto-apply caused an infinite update loop when the feed version
// stayed ahead of the shipped CurrentVersion in the downloaded binary.)
if update.IsStorePackaged() {
a.mu.Lock()
a.updateStatus = update.Status{
Current: update.DisplayVersion(),
ManifestURL: update.DefaultManifestURL,
StoreManaged: true,
Notes: "Обновления через Microsoft Store",
}
a.mu.Unlock()
return
}
time.Sleep(3 * time.Second)
_, _ = a.checkUpdate()
}