feat: add internal USB recovery and initialize picoclaw token

This commit is contained in:
wenjie
2026-04-16 17:00:16 +08:00
parent aa0546ff37
commit cefe0f9ab2
6 changed files with 62 additions and 11 deletions

View File

@@ -5,6 +5,8 @@ import { useTranslation } from 'react-i18next';
import * as api from '@/api/vm.ts';
const DEFAULT_POWER_LONG_DURATION_SECONDS = 12;
type PowerLongProps = {
showConfirm: boolean;
isLoading: boolean;
@@ -14,7 +16,7 @@ type PowerLongProps = {
export const PowerLong = ({ showConfirm, isLoading, setIsLoading }: PowerLongProps) => {
const { t } = useTranslation();
const [duration, setDuration] = useState(8);
const [duration, setDuration] = useState(DEFAULT_POWER_LONG_DURATION_SECONDS);
function power() {
if (isLoading) return;
@@ -55,7 +57,7 @@ export const PowerLong = ({ showConfirm, isLoading, setIsLoading }: PowerLongPro
<div className="px-3">
<Slider
defaultValue={8}
defaultValue={DEFAULT_POWER_LONG_DURATION_SECONDS}
min={1}
max={30}
tooltip={{ placement: 'bottom' }}