mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-04-10 19:15:52 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5bfaffd86 |
@@ -6,6 +6,7 @@ import { CheckCircleIcon } from "@heroicons/react/20/solid";
|
||||
import { isMobile } from "react-device-detect";
|
||||
|
||||
import { useJsonRpc } from "@/hooks/useJsonRpc";
|
||||
import { useBootStorageType } from "@/hooks/useBootStorage";
|
||||
import { SettingsPageHeader } from "@components/Settings/SettingsPageheader";
|
||||
import { SettingsItem } from "@components/Settings/SettingsView";
|
||||
import Card from "@components/Card";
|
||||
@@ -34,6 +35,8 @@ export default function SettingsVersion() {
|
||||
const [autoUpdate, setAutoUpdate] = useState(true);
|
||||
const { $at } = useReactAt();
|
||||
const { setModalView, otaState } = useUpdateStore();
|
||||
const { bootStorageType } = useBootStorageType();
|
||||
const isBootFromSD = bootStorageType === "sd";
|
||||
const [isUpdateDialogOpen, setIsUpdateDialogOpen] = useState(false);
|
||||
const updatePanelRef = useRef<HTMLDivElement | null>(null);
|
||||
const [updateSource, setUpdateSource] = useState("github");
|
||||
@@ -202,19 +205,23 @@ export default function SettingsVersion() {
|
||||
}
|
||||
/>
|
||||
|
||||
<UpdateSourceSettings
|
||||
updateSource={updateSource}
|
||||
onUpdateSourceChange={applyUpdateSource}
|
||||
customUpdateBaseURL={customUpdateBaseURL}
|
||||
onCustomUpdateBaseURLChange={setCustomUpdateBaseURL}
|
||||
onSaveCustomUpdateBaseURL={applyCustomUpdateBaseURL}
|
||||
/>
|
||||
{!isBootFromSD && (
|
||||
<>
|
||||
<UpdateSourceSettings
|
||||
updateSource={updateSource}
|
||||
onUpdateSourceChange={applyUpdateSource}
|
||||
customUpdateBaseURL={customUpdateBaseURL}
|
||||
onCustomUpdateBaseURLChange={setCustomUpdateBaseURL}
|
||||
onSaveCustomUpdateBaseURL={applyCustomUpdateBaseURL}
|
||||
/>
|
||||
|
||||
<div className="flex items-center justify-start">
|
||||
<AntdButton type="primary" onClick={checkForUpdates} className={isMobile ? "w-full" : ""}>
|
||||
{$at("Check for Updates")}
|
||||
</AntdButton>
|
||||
</div>
|
||||
<div className="flex items-center justify-start">
|
||||
<AntdButton type="primary" onClick={checkForUpdates} className={isMobile ? "w-full" : ""}>
|
||||
{$at("Check for Updates")}
|
||||
</AntdButton>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
<div className="hidden">
|
||||
<SettingsItem
|
||||
|
||||
Reference in New Issue
Block a user