Merge pull request #534 from ButterscotchV/remove-mounting-button

Remove the mounting reset button on the homepage
This commit is contained in:
Eiren Rain
2023-02-09 17:50:14 +02:00
committed by GitHub
2 changed files with 11 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ import { useWebsocketAPI } from '../hooks/websocket-api';
import { BigButton } from './commons/BigButton';
import { RecordIcon } from './commons/icon/RecordIcon';
export function BVHButton() {
export function BVHButton(props: React.HTMLAttributes<HTMLButtonElement>) {
const { l10n } = useLocalization();
const { useRPCPacket, sendRPCPacket } = useWebsocketAPI();
const [recording, setRecording] = useState(false);
@@ -29,6 +29,7 @@ export function BVHButton() {
text={l10n.getString(recording ? 'bvh-recording' : 'bvh-start_recording')}
icon={<RecordIcon width={20} />}
onClick={toggleBVH}
className={props.className}
></BigButton>
);
}

View File

@@ -72,11 +72,15 @@ export function MainLayoutRoute({
type={ResetType.Full}
variant="big"
></ResetButton>
<ResetButton
type={ResetType.Mounting}
variant="big"
></ResetButton>
<BVHButton></BVHButton>
{config?.debug && (
<ResetButton
type={ResetType.Mounting}
variant="big"
></ResetButton>
)}
<BVHButton
className={config?.debug ? 'col-span-1' : 'col-span-2'}
></BVHButton>
</div>
{driftCompensationEnabled && (
<ClearDriftCompensationButton></ClearDriftCompensationButton>