mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-24 02:51:20 -08:00
fix after merge
This commit is contained in:
14 files changed
+325
-317
No files matched your search
@@ -103,6 +103,7 @@ export const gui = [
|
||||
// stuff that should be enabled again later
|
||||
eqeqeq: 'off',
|
||||
'no-nested-ternary': 'off',
|
||||
'no-await-in-loop': 'off',
|
||||
'@typescript-eslint/no-use-before-define': 'off',
|
||||
'@typescript-eslint/no-shadow': 'off',
|
||||
'import-x/prefer-default-export': 'off',
|
||||
|
||||
@@ -6,12 +6,12 @@ import {
|
||||
RpcMessage,
|
||||
} from 'solarxr-protocol';
|
||||
import { useWebsocketAPI } from '@/hooks/websocket-api';
|
||||
import { BigButton } from './commons/BigButton';
|
||||
import { RecordIcon } from './commons/icon/RecordIcon';
|
||||
import classNames from 'classnames';
|
||||
import { isTauri } from '@tauri-apps/api/core';
|
||||
import { save } from '@tauri-apps/plugin-dialog';
|
||||
import { useConfig } from '@/hooks/config';
|
||||
import { RecordIcon } from './commons/icon/RecordIcon';
|
||||
import { BigButton } from './commons/BigButton';
|
||||
|
||||
export function BVHButton({
|
||||
className,
|
||||
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
RefCallBack,
|
||||
UseControllerProps,
|
||||
} from 'react-hook-form';
|
||||
import { FileInputContentBlank, FileInputContentFile } from './FileInput';
|
||||
import { open } from '@tauri-apps/plugin-dialog';
|
||||
import { FileInputContentBlank, FileInputContentFile } from './FileInput';
|
||||
|
||||
export function InnerTauriFileInput({
|
||||
label,
|
||||
@@ -43,7 +43,7 @@ export function TauriFileInput({
|
||||
control: Control<any>;
|
||||
/**
|
||||
* Use a translation key!
|
||||
**/
|
||||
* */
|
||||
label: string;
|
||||
name: string;
|
||||
directory?: boolean;
|
||||
|
||||
@@ -237,72 +237,71 @@ export function AddImusStep({
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col w-full">
|
||||
<div className="flex flex-col gap-4">
|
||||
<Typography color="secondary">
|
||||
{l10n.getString('firmware_tool-add_imus_step-description')}
|
||||
</Typography>
|
||||
</div>
|
||||
<div className="my-4 flex flex-col gap-4">
|
||||
{!isAckchuallyLoading && imuTypes && newConfig && (
|
||||
<>
|
||||
<div className="flex flex-col gap-3">
|
||||
<div
|
||||
className={classNames(
|
||||
'grid gap-2 px-2',
|
||||
form.imus.length > 1
|
||||
? 'md:grid-cols-2 mobile-settings:grid-cols-1'
|
||||
: 'grid-cols-1'
|
||||
)}
|
||||
>
|
||||
{form.imus.map((imu, index) => (
|
||||
<IMUCard
|
||||
control={control}
|
||||
imuTypes={imuTypes}
|
||||
key={`${index}:${imu.type}`}
|
||||
hasIntPin={
|
||||
imuTypes?.find(({ type: t }) => t == imu.type)
|
||||
?.hasIntPin ?? false
|
||||
}
|
||||
index={index}
|
||||
onDelete={() => deleteImu(index)}
|
||||
></IMUCard>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex justify-center">
|
||||
<Localized id="firmware_tool-add_imus_step-add_more">
|
||||
<Button variant="primary" onClick={addImu}></Button>
|
||||
</Localized>
|
||||
</div>
|
||||
<div className="flex flex-col w-full">
|
||||
<div className="flex flex-col gap-4">
|
||||
<Typography color="secondary">
|
||||
{l10n.getString('firmware_tool-add_imus_step-description')}
|
||||
</Typography>
|
||||
</div>
|
||||
<div className="my-4 flex flex-col gap-4">
|
||||
{!isAckchuallyLoading && imuTypes && newConfig && (
|
||||
<>
|
||||
<div className="flex flex-col gap-3">
|
||||
<div
|
||||
className={classNames(
|
||||
'grid gap-2 px-2',
|
||||
form.imus.length > 1
|
||||
? 'md:grid-cols-2 mobile-settings:grid-cols-1'
|
||||
: 'grid-cols-1'
|
||||
)}
|
||||
>
|
||||
{form.imus.map((imu, index) => (
|
||||
<IMUCard
|
||||
control={control}
|
||||
imuTypes={imuTypes}
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
key={`${index}:${imu.type}`}
|
||||
hasIntPin={
|
||||
imuTypes?.find(({ type: t }) => t == imu.type)
|
||||
?.hasIntPin ?? false
|
||||
}
|
||||
index={index}
|
||||
onDelete={() => deleteImu(index)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<Localized id="firmware_tool-previous_step">
|
||||
<Button variant="tertiary" onClick={prevStep}></Button>
|
||||
</Localized>
|
||||
<Localized id="firmware_tool-next_step">
|
||||
<Button
|
||||
variant="primary"
|
||||
disabled={!isValidState || form.imus.length === 0}
|
||||
onClick={() => {
|
||||
updateImus(form.imus);
|
||||
nextStep();
|
||||
}}
|
||||
></Button>
|
||||
<div className="flex justify-center">
|
||||
<Localized id="firmware_tool-add_imus_step-add_more">
|
||||
<Button variant="primary" onClick={addImu} />
|
||||
</Localized>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{isAckchuallyLoading && (
|
||||
<div className="flex justify-center flex-col items-center gap-3 h-44">
|
||||
<LoaderIcon slimeState={SlimeState.JUMPY}></LoaderIcon>
|
||||
<Localized id="firmware_tool-loading">
|
||||
<Typography color="secondary"></Typography>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<Localized id="firmware_tool-previous_step">
|
||||
<Button variant="tertiary" onClick={prevStep} />
|
||||
</Localized>
|
||||
<Localized id="firmware_tool-next_step">
|
||||
<Button
|
||||
variant="primary"
|
||||
disabled={!isValidState || form.imus.length === 0}
|
||||
onClick={() => {
|
||||
updateImus(form.imus);
|
||||
nextStep();
|
||||
}}
|
||||
/>
|
||||
</Localized>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{isAckchuallyLoading && (
|
||||
<div className="flex justify-center flex-col items-center gap-3 h-44">
|
||||
<LoaderIcon slimeState={SlimeState.JUMPY} />
|
||||
<Localized id="firmware_tool-loading">
|
||||
<Typography color="secondary" />
|
||||
</Localized>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -117,102 +117,100 @@ export function CalibrationTutorialPage() {
|
||||
applyProgress(0.43);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col gap-5 h-full items-center w-full justify-center relative">
|
||||
<div className="flex w-full h-full justify-center xs:px-20 mobile:px-5 pb-5 gap-14">
|
||||
<div className="flex gap-4 self-center mobile:z-10">
|
||||
<div className="flex flex-col max-w-md gap-3">
|
||||
<div>
|
||||
<Typography variant="mobile-title">
|
||||
{l10n.getString('onboarding-calibration_tutorial')}
|
||||
</Typography>
|
||||
<Typography variant="vr-accessible" italic>
|
||||
{l10n.getString('onboarding-calibration_tutorial-subtitle')}
|
||||
</Typography>
|
||||
</div>
|
||||
<Localized
|
||||
id="onboarding-calibration_tutorial-description-v1"
|
||||
elems={{ b: <b></b> }}
|
||||
>
|
||||
<Typography color="secondary">
|
||||
Description on calibration of IMU
|
||||
</Typography>
|
||||
</Localized>
|
||||
<div>
|
||||
<div className="xs:hidden flex flex-row justify-center">
|
||||
<div className="stroke-none fill-background-10 ">
|
||||
<TaybolIcon width="220"></TaybolIcon>
|
||||
</div>
|
||||
<div className="flex flex-col gap-5 h-full items-center w-full justify-center relative">
|
||||
<div className="flex w-full h-full justify-center xs:px-20 mobile:px-5 pb-5 gap-14">
|
||||
<div className="flex gap-4 self-center mobile:z-10">
|
||||
<div className="flex flex-col max-w-md gap-3">
|
||||
<div>
|
||||
<Typography variant="mobile-title">
|
||||
{l10n.getString('onboarding-calibration_tutorial')}
|
||||
</Typography>
|
||||
<Typography variant="vr-accessible" italic>
|
||||
{l10n.getString('onboarding-calibration_tutorial-subtitle')}
|
||||
</Typography>
|
||||
</div>
|
||||
<Localized
|
||||
id="onboarding-calibration_tutorial-description-v1"
|
||||
elems={{ b: <b /> }}
|
||||
>
|
||||
<Typography color="secondary">
|
||||
Description on calibration of IMU
|
||||
</Typography>
|
||||
</Localized>
|
||||
<div>
|
||||
<div className="xs:hidden flex flex-row justify-center">
|
||||
<div className="stroke-none fill-background-10 ">
|
||||
<TaybolIcon width="220" />
|
||||
</div>
|
||||
<div className="flex justify-center">
|
||||
<LoaderIcon slimeState={slimeStatus}></LoaderIcon>
|
||||
</div>
|
||||
<ProgressBar
|
||||
progress={
|
||||
isCounting
|
||||
? (IMU_CALIBRATION_TIME - timer) / IMU_CALIBRATION_TIME
|
||||
: calibrationStatus === CalibrationStatus.SUCCESS ||
|
||||
calibrationStatus === CalibrationStatus.ERROR
|
||||
? 1
|
||||
: 0
|
||||
}
|
||||
height={14}
|
||||
animated={true}
|
||||
colorClass={progressBarClass}
|
||||
></ProgressBar>
|
||||
</div>
|
||||
<div className="flex justify-center">
|
||||
<Typography variant="section-title">{progressText}</Typography>
|
||||
</div>
|
||||
<div className="flex gap-3 mobile:flex-col">
|
||||
<Button
|
||||
variant="secondary"
|
||||
to="/onboarding/wifi-creds"
|
||||
className="xs:mr-auto"
|
||||
>
|
||||
{l10n.getString('onboarding-previous_step')}
|
||||
</Button>
|
||||
<Button
|
||||
variant="primary"
|
||||
onClick={() => {
|
||||
setCalibrationStatus(CalibrationStatus.CALIBRATING);
|
||||
startCountdown();
|
||||
}}
|
||||
disabled={isCounting || !rested}
|
||||
className={classNames(
|
||||
'xs:ml-auto',
|
||||
CalibrationStatus.SUCCESS === calibrationStatus && 'hidden'
|
||||
)}
|
||||
>
|
||||
{l10n.getString('onboarding-calibration_tutorial-calibrate')}
|
||||
</Button>
|
||||
<Button
|
||||
variant="primary"
|
||||
to="/onboarding/assign-tutorial"
|
||||
className={classNames(
|
||||
'xs:ml-auto',
|
||||
CalibrationStatus.SUCCESS !== calibrationStatus && 'hidden'
|
||||
)}
|
||||
>
|
||||
{l10n.getString('onboarding-continue')}
|
||||
</Button>
|
||||
<LoaderIcon slimeState={slimeStatus} />
|
||||
</div>
|
||||
<ProgressBar
|
||||
progress={
|
||||
isCounting
|
||||
? (IMU_CALIBRATION_TIME - timer) / IMU_CALIBRATION_TIME
|
||||
: calibrationStatus === CalibrationStatus.SUCCESS ||
|
||||
calibrationStatus === CalibrationStatus.ERROR
|
||||
? 1
|
||||
: 0
|
||||
}
|
||||
height={14}
|
||||
animated
|
||||
colorClass={progressBarClass}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex justify-center">
|
||||
<Typography variant="section-title">{progressText}</Typography>
|
||||
</div>
|
||||
<div className="flex gap-3 mobile:flex-col">
|
||||
<Button
|
||||
variant="secondary"
|
||||
to="/onboarding/assign-tutorial"
|
||||
className={classNames('xs:ml-auto', !skipButton && 'hidden')}
|
||||
to="/onboarding/wifi-creds"
|
||||
className="xs:mr-auto"
|
||||
>
|
||||
{l10n.getString('onboarding-calibration_tutorial-skip')}
|
||||
{l10n.getString('onboarding-previous_step')}
|
||||
</Button>
|
||||
<Button
|
||||
variant="primary"
|
||||
onClick={() => {
|
||||
setCalibrationStatus(CalibrationStatus.CALIBRATING);
|
||||
startCountdown();
|
||||
}}
|
||||
disabled={isCounting || !rested}
|
||||
className={classNames(
|
||||
'xs:ml-auto',
|
||||
CalibrationStatus.SUCCESS === calibrationStatus && 'hidden'
|
||||
)}
|
||||
>
|
||||
{l10n.getString('onboarding-calibration_tutorial-calibrate')}
|
||||
</Button>
|
||||
<Button
|
||||
variant="primary"
|
||||
to="/onboarding/assign-tutorial"
|
||||
className={classNames(
|
||||
'xs:ml-auto',
|
||||
CalibrationStatus.SUCCESS !== calibrationStatus && 'hidden'
|
||||
)}
|
||||
>
|
||||
{l10n.getString('onboarding-continue')}
|
||||
</Button>
|
||||
</div>
|
||||
<Button
|
||||
variant="secondary"
|
||||
to="/onboarding/assign-tutorial"
|
||||
className={classNames('xs:ml-auto', !skipButton && 'hidden')}
|
||||
>
|
||||
{l10n.getString('onboarding-calibration_tutorial-skip')}
|
||||
</Button>
|
||||
</div>
|
||||
<div className="mobile:hidden flex self-center w-[32rem] mobile:absolute">
|
||||
<div className="stroke-none xs:fill-background-10 mobile:fill-background-50 mobile:blur-sm">
|
||||
<TaybolIcon width="450"></TaybolIcon>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mobile:hidden flex self-center w-[32rem] mobile:absolute">
|
||||
<div className="stroke-none xs:fill-background-10 mobile:fill-background-50 mobile:blur-sm">
|
||||
<TaybolIcon width="450" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -33,9 +33,9 @@ import { Typography } from '@/components/commons/Typography';
|
||||
import { useLocaleConfig } from '@/i18n/config';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { ResetButton } from '@/components/home/ResetButton';
|
||||
import { Vector3 } from 'three';
|
||||
import { ProportionsResetModal } from './ProportionsResetModal';
|
||||
import { BodyProportions } from './BodyProportions';
|
||||
import { Vector3 } from 'three';
|
||||
|
||||
function IconButton({
|
||||
onClick,
|
||||
@@ -443,62 +443,60 @@ export function ManualProportionsPage() {
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex w-full h-full gap-2 bg-background-70 p-2">
|
||||
<div className="flex flex-col flex-grow gap-2">
|
||||
<ButtonsControl control={control}></ButtonsControl>
|
||||
<div className="bg-background-60 h-20 rounded-md flex-grow overflow-y-auto">
|
||||
<BodyProportions
|
||||
precise={precise ?? defaultValues.precise}
|
||||
type={ratio ? 'ratio' : 'linear'}
|
||||
variant={state.alonePage ? 'alone' : 'onboarding'}
|
||||
></BodyProportions>
|
||||
</div>
|
||||
</div>
|
||||
<div className="rounded-md overflow-clip w-1/3 bg-background-60 hidden mobile:hidden sm:flex relative">
|
||||
<SkeletonVisualizerWidget
|
||||
onInit={(context) => {
|
||||
context.addView({
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
width: 1,
|
||||
height: 1,
|
||||
position: new Vector3(3, 2.5, -3),
|
||||
onHeightChange(v, newHeight) {
|
||||
// retouch the target and scale settings so the height element doesnt hide the head
|
||||
v.controls.target.set(0, newHeight / 1.7, 0);
|
||||
const scale = Math.max(1, newHeight) / 1.2;
|
||||
v.camera.zoom = 1 / scale;
|
||||
},
|
||||
});
|
||||
}}
|
||||
<div className="flex w-full h-full gap-2 bg-background-70 p-2">
|
||||
<div className="flex flex-col flex-grow gap-2">
|
||||
<ButtonsControl control={control} />
|
||||
<div className="bg-background-60 h-20 rounded-md flex-grow overflow-y-auto">
|
||||
<BodyProportions
|
||||
precise={precise ?? defaultValues.precise}
|
||||
type={ratio ? 'ratio' : 'linear'}
|
||||
variant={state.alonePage ? 'alone' : 'onboarding'}
|
||||
/>
|
||||
|
||||
<div className="top-4 w-full px-4 absolute flex gap-2 flex-col lg:flex-row md:flex-wrap">
|
||||
<div className="h-14 flex flex-grow items-center">
|
||||
<ResetButton
|
||||
type={ResetType.Full}
|
||||
size="small"
|
||||
className="w-full h-full bg-background-50 hover:bg-background-40 text-background-10"
|
||||
></ResetButton>
|
||||
</div>
|
||||
<Tooltip
|
||||
preferedDirection="bottom"
|
||||
content={
|
||||
<Localized id="onboarding-manual_proportions-estimated_height">
|
||||
<Typography></Typography>
|
||||
</Localized>
|
||||
}
|
||||
>
|
||||
<div className="h-14 bg-background-50 p-4 flex items-center rounded-lg min-w-36 justify-center">
|
||||
<Typography variant="main-title">
|
||||
{cmFormat.format((userHeight * 100) / 0.936)}
|
||||
</Typography>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
<div className="rounded-md overflow-clip w-1/3 bg-background-60 hidden mobile:hidden sm:flex relative">
|
||||
<SkeletonVisualizerWidget
|
||||
onInit={(context) => {
|
||||
context.addView({
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
width: 1,
|
||||
height: 1,
|
||||
position: new Vector3(3, 2.5, -3),
|
||||
onHeightChange(v, newHeight) {
|
||||
// retouch the target and scale settings so the height element doesnt hide the head
|
||||
v.controls.target.set(0, newHeight / 1.7, 0);
|
||||
const scale = Math.max(1, newHeight) / 1.2;
|
||||
v.camera.zoom = 1 / scale;
|
||||
},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="top-4 w-full px-4 absolute flex gap-2 flex-col lg:flex-row md:flex-wrap">
|
||||
<div className="h-14 flex flex-grow items-center">
|
||||
<ResetButton
|
||||
type={ResetType.Full}
|
||||
size="small"
|
||||
className="w-full h-full bg-background-50 hover:bg-background-40 text-background-10"
|
||||
/>
|
||||
</div>
|
||||
<Tooltip
|
||||
preferedDirection="bottom"
|
||||
content={
|
||||
<Localized id="onboarding-manual_proportions-estimated_height">
|
||||
<Typography />
|
||||
</Localized>
|
||||
}
|
||||
>
|
||||
<div className="h-14 bg-background-50 p-4 flex items-center rounded-lg min-w-36 justify-center">
|
||||
<Typography variant="main-title">
|
||||
{cmFormat.format((userHeight * 100) / 0.936)}
|
||||
</Typography>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+58
-52
@@ -70,60 +70,66 @@ function PosePage({
|
||||
);
|
||||
}
|
||||
|
||||
export const StandingRelaxedPoseStep = (
|
||||
export function StandingRelaxedPoseStep(
|
||||
verticalStepProps: VerticalStepComponentProps
|
||||
) => (
|
||||
<PosePage
|
||||
{...verticalStepProps}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-standing-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-standing-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.STANDING}
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedStanding.webp'}
|
||||
width={300}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</PosePage>
|
||||
);
|
||||
) {
|
||||
return (
|
||||
<PosePage
|
||||
{...verticalStepProps}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-standing-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-standing-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.STANDING}
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedStanding.webp'}
|
||||
width={300}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</PosePage>
|
||||
);
|
||||
}
|
||||
|
||||
export const SittingRelaxedPoseStep = (
|
||||
export function SittingRelaxedPoseStep(
|
||||
verticalStepProps: VerticalStepComponentProps
|
||||
) => (
|
||||
<PosePage
|
||||
{...verticalStepProps}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-sitting-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-sitting-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.SITTING}
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedSitting.webp'}
|
||||
width={300}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</PosePage>
|
||||
);
|
||||
) {
|
||||
return (
|
||||
<PosePage
|
||||
{...verticalStepProps}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-sitting-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-sitting-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.SITTING}
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedSitting.webp'}
|
||||
width={300}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</PosePage>
|
||||
);
|
||||
}
|
||||
|
||||
export const FlatRelaxedPoseStep = (
|
||||
export function FlatRelaxedPoseStep(
|
||||
verticalStepProps: VerticalStepComponentProps
|
||||
) => (
|
||||
<PosePage
|
||||
{...verticalStepProps}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-flat-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-flat-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.FLAT}
|
||||
lastStep
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedFloor.webp'}
|
||||
width={600}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</PosePage>
|
||||
);
|
||||
) {
|
||||
return (
|
||||
<PosePage
|
||||
{...verticalStepProps}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-flat-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-flat-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.FLAT}
|
||||
lastStep
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedFloor.webp'}
|
||||
width={600}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</PosePage>
|
||||
);
|
||||
}
|
||||
@@ -326,7 +326,7 @@ export function InterfaceSettings() {
|
||||
<Localized
|
||||
id={'settings-interface-behavior-bvh_directory-description'}
|
||||
>
|
||||
<Typography color="secondary"></Typography>
|
||||
<Typography color="secondary" />
|
||||
</Localized>
|
||||
</div>
|
||||
<div className="grid gap-3 pb-5">
|
||||
|
||||
@@ -351,7 +351,7 @@ function getVRMName(json: string): string | null {
|
||||
const data = JSON.parse(json);
|
||||
|
||||
if (typeof data?.extensions?.VRMC_vrm?.specVersion === 'string') {
|
||||
const name = data.extensions.VRMC_vrm.meta.name;
|
||||
const { name } = data.extensions.VRMC_vrm.meta;
|
||||
|
||||
if (typeof name !== 'string') {
|
||||
error(
|
||||
@@ -361,9 +361,8 @@ function getVRMName(json: string): string | null {
|
||||
}
|
||||
|
||||
return name;
|
||||
} else {
|
||||
return data?.extensions?.VRM?.meta?.title || '';
|
||||
}
|
||||
return data?.extensions?.VRM?.meta?.title || '';
|
||||
} catch (e) {
|
||||
error(e);
|
||||
return null;
|
||||
|
||||
@@ -75,68 +75,74 @@ function StaAlignedPoseModal({
|
||||
);
|
||||
}
|
||||
|
||||
export const StandingRelaxedPoseModal = ({
|
||||
export function StandingRelaxedPoseModal({
|
||||
open,
|
||||
}: {
|
||||
open: [boolean, Dispatch<SetStateAction<boolean>>];
|
||||
}) => (
|
||||
<StaAlignedPoseModal
|
||||
open={open}
|
||||
title={'onboarding-stay_aligned-relaxed_poses-standing-title'}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-standing-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-standing-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.STANDING}
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedStanding.webp'}
|
||||
width={260}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</StaAlignedPoseModal>
|
||||
);
|
||||
}) {
|
||||
return (
|
||||
<StaAlignedPoseModal
|
||||
open={open}
|
||||
title={'onboarding-stay_aligned-relaxed_poses-standing-title'}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-standing-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-standing-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.STANDING}
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedStanding.webp'}
|
||||
width={260}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</StaAlignedPoseModal>
|
||||
);
|
||||
}
|
||||
|
||||
export const SittingRelaxedPoseModal = ({
|
||||
export function SittingRelaxedPoseModal({
|
||||
open,
|
||||
}: {
|
||||
open: [boolean, Dispatch<SetStateAction<boolean>>];
|
||||
}) => (
|
||||
<StaAlignedPoseModal
|
||||
open={open}
|
||||
title={'onboarding-stay_aligned-relaxed_poses-sitting-title'}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-sitting-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-sitting-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.SITTING}
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedSitting.webp'}
|
||||
width={260}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</StaAlignedPoseModal>
|
||||
);
|
||||
}) {
|
||||
return (
|
||||
<StaAlignedPoseModal
|
||||
open={open}
|
||||
title={'onboarding-stay_aligned-relaxed_poses-sitting-title'}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-sitting-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-sitting-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.SITTING}
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedSitting.webp'}
|
||||
width={260}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</StaAlignedPoseModal>
|
||||
);
|
||||
}
|
||||
|
||||
export const FlatRelaxedPoseModal = ({
|
||||
export function FlatRelaxedPoseModal({
|
||||
open,
|
||||
}: {
|
||||
open: [boolean, Dispatch<SetStateAction<boolean>>];
|
||||
}) => (
|
||||
<StaAlignedPoseModal
|
||||
open={open}
|
||||
title={'onboarding-stay_aligned-relaxed_poses-flat-title'}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-flat-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-flat-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.FLAT}
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedFloor.webp'}
|
||||
width={560}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</StaAlignedPoseModal>
|
||||
);
|
||||
}) {
|
||||
return (
|
||||
<StaAlignedPoseModal
|
||||
open={open}
|
||||
title={'onboarding-stay_aligned-relaxed_poses-flat-title'}
|
||||
descriptionKeys={[
|
||||
'onboarding-stay_aligned-relaxed_poses-flat-step-0',
|
||||
'onboarding-stay_aligned-relaxed_poses-flat-step-1-v2',
|
||||
]}
|
||||
relaxedPose={StayAlignedRelaxedPose.FLAT}
|
||||
>
|
||||
<img
|
||||
src={'/images/stay-aligned/StayAlignedFloor.webp'}
|
||||
width={560}
|
||||
alt="Reset position"
|
||||
/>
|
||||
</StaAlignedPoseModal>
|
||||
);
|
||||
}
|
||||
@@ -14,10 +14,10 @@ import { Link } from 'react-router-dom';
|
||||
import { useAppContext } from '@/hooks/app';
|
||||
import { Tooltip } from '@/components/commons/Tooltip';
|
||||
import { Localized } from '@fluent/react';
|
||||
import { checkForUpdate } from '@/hooks/firmware-update';
|
||||
import { TrackerStatus } from './TrackerStatus';
|
||||
import { TrackerWifi } from './TrackerWifi';
|
||||
import { TrackerBattery } from './TrackerBattery';
|
||||
import { checkForUpdate } from '@/hooks/firmware-update';
|
||||
|
||||
function UpdateIcon({
|
||||
showUpdate,
|
||||
|
||||
@@ -37,9 +37,9 @@ import { MagnetometerToggleSetting } from '@/components/settings/pages/Magnetome
|
||||
import semver from 'semver';
|
||||
import { useSetAtom } from 'jotai';
|
||||
import { ignoredTrackersAtom } from '@/store/app-store';
|
||||
import { checkForUpdate } from '@/hooks/firmware-update';
|
||||
import { TrackerCard } from './TrackerCard';
|
||||
import { SingleTrackerBodyAssignmentMenu } from './SingleTrackerBodyAssignmentMenu';
|
||||
import { checkForUpdate } from '@/hooks/firmware-update';
|
||||
|
||||
const rotationsLabels: [Quaternion, string][] = [
|
||||
[rotationToQuatMap.BACK, 'tracker-rotation-back'],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { BoardType, DeviceDataT } from 'solarxr-protocol';
|
||||
import { cacheWrap } from './cache';
|
||||
import semver from 'semver';
|
||||
import { hostname, locale, platform, version } from '@tauri-apps/plugin-os';
|
||||
import { cacheWrap } from './cache';
|
||||
|
||||
type DeployDataJson = Map<string, string>;
|
||||
type DeployData = Map<number, Date>;
|
||||
|
||||
Vendored
+1
@@ -7,6 +7,7 @@ declare const __COMMIT_HASH__: string;
|
||||
declare const __VERSION_TAG__: string;
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
declare const __GIT_CLEAN__: boolean;
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
declare const __ANDROID__:
|
||||
| {
|
||||
isThere: () => boolean;
|
||||
|
||||
Reference in new issue
Block a user