fix(ui): correct custom update components order

This commit is contained in:
Siyuan 2025-11-07 16:16:58 +00:00
parent ba76d5bbc9
commit 9372afed6b
1 changed files with 3 additions and 2 deletions

View File

@ -40,8 +40,8 @@ export default function SettingsGeneralUpdateRoute() {
const onConfirmCustomUpdate = useCallback((appTargetVersion?: string, systemTargetVersion?: string) => { const onConfirmCustomUpdate = useCallback((appTargetVersion?: string, systemTargetVersion?: string) => {
const components = []; const components = [];
if (appTargetVersion) components.push("system"); if (appTargetVersion) components.push("app");
if (systemTargetVersion) components.push("app"); if (systemTargetVersion) components.push("system");
send("tryUpdateComponents", { send("tryUpdateComponents", {
params: { params: {
@ -97,6 +97,7 @@ export function Dialog({
const { modalView, setModalView, otaState } = useUpdateStore(); const { modalView, setModalView, otaState } = useUpdateStore();
const forceCustomUpdate = customSystemVersion !== undefined || customAppVersion !== undefined; const forceCustomUpdate = customSystemVersion !== undefined || customAppVersion !== undefined;
const onConfirmCustomUpdate = useCallback(() => { const onConfirmCustomUpdate = useCallback(() => {
console.debug("onConfirmCustomUpdate", customAppVersion, customSystemVersion, versionInfo);
onConfirmCustomUpdateCallback( onConfirmCustomUpdateCallback(
customAppVersion !== undefined ? customAppVersion : versionInfo?.remote?.appVersion, customAppVersion !== undefined ? customAppVersion : versionInfo?.remote?.appVersion,
customSystemVersion !== undefined ? customSystemVersion : versionInfo?.remote?.systemVersion, customSystemVersion !== undefined ? customSystemVersion : versionInfo?.remote?.systemVersion,