Compare commits

..

No commits in common. "bbbea617236ad516953192682d2ab7d90e7b3b4e" and "502cd4ecc279a1c720816e27946e8968f67aa075" have entirely different histories.

3 changed files with 8 additions and 15 deletions

View File

@ -10,12 +10,9 @@ import { useDeviceUiNavigation } from "@/hooks/useAppNavigation";
import { useVersion } from "@/hooks/useVersion";
import { useDeviceStore } from "@/hooks/stores";
import notifications from "@/notifications";
import { DOWNGRADE_VERSION } from "@/ui.config";
import { GitHubIcon } from "./Icons";
interface FailSafeModeOverlayProps {
reason: string;
}
@ -89,7 +86,7 @@ export function FailSafeModeOverlay({ reason }: FailSafeModeOverlayProps) {
const handleReportAndDownloadLogs = () => {
setIsDownloadingLogs(true);
send("getFailSafeLogs", {}, async (resp: JsonRpcResponse) => {
send("getFailSafeLogs", {}, (resp: JsonRpcResponse) => {
setIsDownloadingLogs(false);
if ("error" in resp) {
@ -108,9 +105,7 @@ export function FailSafeModeOverlay({ reason }: FailSafeModeOverlayProps) {
a.href = url;
a.download = filename;
document.body.appendChild(a);
await new Promise(resolve => setTimeout(resolve, 1000));
a.click();
await new Promise(resolve => setTimeout(resolve, 1000));
document.body.removeChild(a);
URL.revokeObjectURL(url);
@ -131,7 +126,7 @@ Please attach the recovery logs file that was downloaded to your computer:
\`${filename}\`
> [!NOTE]
> Please remove any sensitive information from the logs. The reports are public and can be viewed by anyone.
> Please omit any sensitive information from the logs.
## Additional Context
[Please describe what you were doing when this occurred]`;
@ -146,7 +141,7 @@ Please attach the recovery logs file that was downloaded to your computer:
};
const handleDowngrade = () => {
navigateTo(`/settings/general/update?app=${DOWNGRADE_VERSION}`);
navigateTo("/settings/general/update?app=0.4.8");
};
return (
@ -182,7 +177,7 @@ Please attach the recovery logs file that was downloaded to your computer:
/>
<div className="h-8 w-px bg-slate-200 dark:bg-slate-700 block" />
<Tooltip text="Download logs first" show={!hasDownloadedLogs}>
<Tooltip text="Download logs first to unlock" show={!hasDownloadedLogs}>
<Button
onClick={() => navigateTo("/settings/general/reboot")}
theme="light"
@ -192,12 +187,12 @@ Please attach the recovery logs file that was downloaded to your computer:
/>
</Tooltip>
<Tooltip text="Download logs first" show={!hasDownloadedLogs}>
<Tooltip text="Download logs first to unlock" show={!hasDownloadedLogs}>
<Button
size="SM"
onClick={handleDowngrade}
theme="light"
text={`Downgrade to v${DOWNGRADE_VERSION}`}
text="Downgrade to v0.4.8"
disabled={!hasDownloadedLogs}
/>
</Tooltip>

View File

@ -853,7 +853,7 @@ export default function KvmIdRoute() {
/>
<div className="relative flex h-full w-full overflow-hidden">
{!isFailsafeMode && failsafeReason === "video" && <WebRTCVideo />}
{!isFailsafeMode && <WebRTCVideo />}
<div
style={{ animationDuration: "500ms" }}
className="animate-slideUpFade pointer-events-none absolute inset-0 flex items-center justify-center p-4"

View File

@ -1,6 +1,4 @@
export const CLOUD_API = import.meta.env.VITE_CLOUD_API;
export const DOWNGRADE_VERSION = import.meta.env.VITE_DOWNGRADE_VERSION || "0.4.8";
// In device mode, an empty string uses the current hostname (the JetKVM device's IP) as the API endpoint
export const DEVICE_API = "";