mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
After an update the restarted app opens what the new version brought as an editor tab, and Help > What's New reopens it at any time. Its checkbox turns the automatic opening off for later updates; the same switch sits on System Settings > Updates next to the update checks. The update balloon keeps a one-paragraph summary. The release workflow fills the updater manifest's notes from the release body without its Download section, the install records them, and a version installed outside the app reads them from the manifest. The first start of a different version is recognised from the last run version kept in settings.
12 lines
538 B
TypeScript
12 lines
538 B
TypeScript
import { resolveLocale } from "@/platform/i18n";
|
|
import type { UpdateSource } from "@/platform/ipc";
|
|
import { useProject } from "@/platform/project";
|
|
|
|
/** System Settings > Updates > Update source; `auto` picks the CNB mirror for the Chinese UI. */
|
|
export function updateSource(): UpdateSource {
|
|
const { settings } = useProject.getState();
|
|
const chosen = settings?.general?.updateSource;
|
|
if (chosen === "github" || chosen === "cnb") return chosen;
|
|
return resolveLocale(settings?.appearance?.locale) === "zh" ? "cnb" : "github";
|
|
}
|