mirror of https://github.com/jetkvm/kvm.git
chore(ui): rename custom update query parameters
This commit is contained in:
parent
9372afed6b
commit
a246ef1213
|
|
@ -216,12 +216,12 @@ export default function SettingsAdvancedRoute() {
|
||||||
|
|
||||||
const pageParams = new URLSearchParams();
|
const pageParams = new URLSearchParams();
|
||||||
if (components.includes("app") && versionInfo.remote?.appVersion && versionInfo.appDowngradeAvailable) {
|
if (components.includes("app") && versionInfo.remote?.appVersion && versionInfo.appDowngradeAvailable) {
|
||||||
pageParams.set("app", versionInfo.remote?.appVersion);
|
pageParams.set("custom_app_version", versionInfo.remote?.appVersion);
|
||||||
}
|
}
|
||||||
if (components.includes("system") && versionInfo.remote?.systemVersion && versionInfo.systemDowngradeAvailable) {
|
if (components.includes("system") && versionInfo.remote?.systemVersion && versionInfo.systemDowngradeAvailable) {
|
||||||
pageParams.set("system", versionInfo.remote?.systemVersion);
|
pageParams.set("custom_system_version", versionInfo.remote?.systemVersion);
|
||||||
}
|
}
|
||||||
pageParams.set("resetConfig", resetConfig.toString());
|
pageParams.set("reset_config", resetConfig.toString());
|
||||||
|
|
||||||
// Navigate to update page
|
// Navigate to update page
|
||||||
navigateTo(`/settings/general/update?${pageParams.toString()}`);
|
navigateTo(`/settings/general/update?${pageParams.toString()}`);
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ export default function SettingsGeneralUpdateRoute() {
|
||||||
const { setModalView, otaState } = useUpdateStore();
|
const { setModalView, otaState } = useUpdateStore();
|
||||||
const { send } = useJsonRpc();
|
const { send } = useJsonRpc();
|
||||||
|
|
||||||
const customAppVersion = useMemo(() => searchParams.get("app") || "", [searchParams]);
|
const customAppVersion = useMemo(() => searchParams.get("custom_app_version") || "", [searchParams]);
|
||||||
const customSystemVersion = useMemo(() => searchParams.get("system") || "", [searchParams]);
|
const customSystemVersion = useMemo(() => searchParams.get("custom_system_version") || "", [searchParams]);
|
||||||
const resetConfig = useMemo(() => searchParams.get("resetConfig") === "true", [searchParams]);
|
const resetConfig = useMemo(() => searchParams.get("reset_config") === "true", [searchParams]);
|
||||||
|
|
||||||
const onClose = useCallback(async () => {
|
const onClose = useCallback(async () => {
|
||||||
navigate(".."); // back to the devices.$id.settings page
|
navigate(".."); // back to the devices.$id.settings page
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue