mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-21 17:41:28 -08:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
baa82a3683 | ||
|
|
ee58f3d5f4 | ||
|
|
a8e4006b34 |
No files matched your search
@@ -1188,6 +1188,7 @@ onboarding-quiz-slimeset-answer-regular = SlimeVR V1.0 & V1.2
|
||||
onboarding-quiz-slimeset-answer-butterfly = Butterfly
|
||||
onboarding-quiz-slimeset-answer-wifi = Wi-Fi-based Slime
|
||||
onboarding-quiz-slimeset-answer-dongle = Dongle-based Slime
|
||||
onboarding-quiz-slimeset-answer-middleware = External software
|
||||
|
||||
onboarding-quiz-usage-title = What are you using your trackers for?
|
||||
onboarding-quiz-usage-description = If you plan on using SlimeVR for multiple purposes, you can change the affected settings later.
|
||||
@@ -1262,17 +1263,24 @@ onboarding-home-start = Let's get set up!
|
||||
## Tracker connection setup
|
||||
onboarding-connect_tracker-title = Let's connect your trackers
|
||||
onboarding-connect_tracker-description = Enter your Wi-Fi network below and submit once. Every tracker you connect via USB, now or later, will automatically use those credentials.
|
||||
onboarding-connect_tracker-description-middleware =
|
||||
Follow the instructions of the external software you are using to connect your trackers.
|
||||
|
||||
This page is for connecting non-SlimeVR trackers via external software, which interprets devices to act like SlimeVR trackers.
|
||||
onboarding-connect_tracker-learn_more = Learn more
|
||||
onboarding-connect_tracker-issue-serial = I'm having trouble connecting!
|
||||
onboarding-connect_tracker-issue-middleware = I'm having trouble connecting!
|
||||
onboarding-connect_tracker-usb = USB Tracker
|
||||
onboarding-connect_tracker-tracker_mac_name = SlimeVR Tracker ({ $suffix })
|
||||
onboarding-connect_tracker-tracker_port_name = USB Tracker ({ $port })
|
||||
onboarding-connect_tracker-network_profile-ignore = I configured my firewall and know what I'm doing
|
||||
onboarding-connect_tracker-waiting_first_title = Waiting for your first tracker
|
||||
onboarding-connect_tracker-waiting_first_desc = Plug one in over USB to get started.
|
||||
onboarding-connect_tracker-waiting_first_desc-middleware = Follow the instructions of the external software you are using to connect your trackers.
|
||||
onboarding-connect_tracker-scan_results_title = Select network & enter password
|
||||
onboarding-connect_tracker-scan_results_desc = Enter your Wi-Fi credentials on the left to connect your trackers.
|
||||
onboarding-connect_tracker-all_caught_up = All caught up. Plug in more any time
|
||||
onboarding-connect_tracker-all_caught_up-middleware = All caught up. Connect more from the external software any time.
|
||||
onboarding-connect_tracker-shake_tip = Not sure which tracker is which? Shake a tracker to see it light up in the list.
|
||||
onboarding-connect_tracker-close = Close
|
||||
onboarding-connect_tracker-connection_status-serial_init = Connecting to serial device
|
||||
@@ -1301,7 +1309,6 @@ onboarding-connect_tracker-connected_trackers = { $amount ->
|
||||
} connected
|
||||
onboarding-connect_tracker-setting_up = Setting up ({ $amount })
|
||||
onboarding-connect_tracker-next = I connected all my trackers
|
||||
|
||||
## Tracker assignment setup
|
||||
onboarding-assign_trackers-title = Assign trackers
|
||||
onboarding-assign_trackers-description = Let's choose which tracker goes where. Click on a location where you want to place a tracker.
|
||||
|
||||
+8
-1
@@ -192,7 +192,14 @@ function AppRoutes() {
|
||||
<Route path="dongle" element={<DonglePage />} />
|
||||
<Route path="firmware-tool" element={<FirmwareToolSettings />} />
|
||||
<Route path="add-trackers" element={<AddTrackersPage />} />
|
||||
<Route path="connect-trackers" element={<ConnectTrackersPage />} />
|
||||
<Route
|
||||
path="connect-trackers"
|
||||
element={<ConnectTrackersPage type="slimevr" />}
|
||||
/>
|
||||
<Route
|
||||
path="connect-middleware"
|
||||
element={<ConnectTrackersPage type="middleware" />}
|
||||
/>
|
||||
<Route path="trackers-assign" element={<TrackersAssignPage />} />
|
||||
<Route path="mounting/choose" element={<MountingChoose />} />
|
||||
<Route path="mounting/auto" element={<AutomaticMountingPage />} />
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
export function LinkIcon({ size = 24 }) {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
height={size}
|
||||
width={size}
|
||||
>
|
||||
<path d="M7.95,21q-2.05,0-3.5-1.45T3,16.05q0-1 0.38-1.9t1.08-1.6L7.8,9.23l1.4,1.4L5.85,13.98Q5.43,14.4 5.21,14.94T5,16.05q0,1.22 0.86,2.09T7.95,19q0.58,0 1.13-0.21t0.97-0.64l3.32-3.35l1.43,1.43l-3.35,3.32q-0.7,0.7-1.6,1.07T7.95,21Zm1.98-5.5L8.5,14.08L14.08,8.5L15.5,9.92L9.93,15.5Zm6.27-0.7l-1.4-1.42l3.35-3.33q0.42-0.42 0.63-0.95T18.98,8q0-1.25-0.85-2.13Q17.28,5 16.03,5q-0.58,0-1.11,0.21q-0.54,0.21-0.96,0.64L10.63,9.2L9.2,7.8l3.35-3.35q0.7-0.7 1.6-1.07T16.05,3q2.05,0 3.49,1.45t1.44,3.52q0,0.98-0.36,1.88t-1.06,1.6L16.2,14.8Z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -3,9 +3,7 @@ import { A } from '@/components/commons/A';
|
||||
import { Button } from '@/components/commons/Button';
|
||||
import { Typography } from '@/components/commons/Typography';
|
||||
import { LoaderIcon, SlimeState } from '@/components/commons/icon/LoaderIcon';
|
||||
|
||||
export const DOCS_TROUBLESHOOTING_URL =
|
||||
'https://docs.slimevr.dev/common-issues.html';
|
||||
import { DOCS_TROUBLESHOOTING_URL } from './TrackerList';
|
||||
|
||||
export function ErrorDetailModal({
|
||||
isOpen,
|
||||
|
||||
@@ -16,7 +16,10 @@ import {
|
||||
} from '@/hooks/wifi-form';
|
||||
import { useTrackingChecklist } from '@/hooks/tracking-checklist';
|
||||
import { useBreakpoint } from '@/hooks/breakpoint';
|
||||
import { connectedIMUTrackersAtom } from '@/store/app-store';
|
||||
import {
|
||||
connectedIMUTrackersAtom,
|
||||
unknownDevicesAtom,
|
||||
} from '@/store/app-store';
|
||||
import { A } from '@/components/commons/A';
|
||||
import { Button } from '@/components/commons/Button';
|
||||
import { Dropdown } from '@/components/commons/Dropdown';
|
||||
@@ -32,11 +35,18 @@ import {
|
||||
} from '@/components/commons/icon/ArrowIcons';
|
||||
import { MoreSetsConfirm } from '@/components/onboarding/pages/quiz/MoreSetsConfirm';
|
||||
import {
|
||||
DOCS_TROUBLESHOOTING_URL,
|
||||
MIDDLEWARE_DOCS_URL,
|
||||
mergeTrackerList,
|
||||
NoSerialLogsModal,
|
||||
normalizeMac,
|
||||
TrackerList,
|
||||
DOCS_TROUBLESHOOTING_URL,
|
||||
TrackerType,
|
||||
} from './TrackerList';
|
||||
import {
|
||||
PendingTrackerCard,
|
||||
PendingTrackersDivider,
|
||||
} from '@/components/tracker/PendingTrackers';
|
||||
|
||||
export function FloatingWifiForm({
|
||||
summary,
|
||||
@@ -326,6 +336,16 @@ function WifiFormFields({
|
||||
);
|
||||
}
|
||||
|
||||
function MiddlewareLinks() {
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<ArrowLink to={MIDDLEWARE_DOCS_URL} direction="right" variant="boxed-2">
|
||||
<Typography id="onboarding-connect_tracker-issue-middleware" />
|
||||
</ArrowLink>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function TroubleshootingLinks({
|
||||
networkProfileBanner,
|
||||
}: {
|
||||
@@ -348,13 +368,126 @@ function TroubleshootingLinks({
|
||||
);
|
||||
}
|
||||
|
||||
export function ConnectTrackersPage() {
|
||||
export function ConnectTrackersPage({ type }: { type: TrackerType }) {
|
||||
return type === 'middleware' ? (
|
||||
<MiddlewareConnectTrackersPage />
|
||||
) : (
|
||||
<SlimeVRConnectTrackersPage />
|
||||
);
|
||||
}
|
||||
|
||||
function MiddlewareConnectTrackersPage() {
|
||||
const { applyProgress, state } = useOnboarding();
|
||||
const connectedIMUTrackers = useAtomValue(connectedIMUTrackersAtom);
|
||||
const unknownDevices = useAtomValue(unknownDevicesAtom);
|
||||
const { isMobile } = useBreakpoint('mobile');
|
||||
const rows = useMemo(
|
||||
() => mergeTrackerList([], connectedIMUTrackers),
|
||||
[connectedIMUTrackers]
|
||||
);
|
||||
const pendingDevices = useMemo(() => {
|
||||
const liveHardwareIds = new Set(
|
||||
connectedIMUTrackers
|
||||
.map(({ device }) =>
|
||||
normalizeMac(device?.hardwareInfo?.hardwareIdentifier)
|
||||
)
|
||||
.filter((hardwareId): hardwareId is string => !!hardwareId)
|
||||
);
|
||||
|
||||
return unknownDevices.filter((device) => {
|
||||
const hardwareId = normalizeMac(device.hardwareId);
|
||||
return hardwareId && !liveHardwareIds.has(hardwareId);
|
||||
});
|
||||
}, [connectedIMUTrackers, unknownDevices]);
|
||||
|
||||
applyProgress(0.4);
|
||||
|
||||
return (
|
||||
<div className="w-full h-full flex flex-col xs:flex-row overflow-hidden min-h-0">
|
||||
<div className="w-full xs:w-[340px] sm:w-[380px] lg:w-[400px] xl:w-[440px] p-5 mobile:pt-0 flex flex-col gap-4 shrink-0 overflow-y-auto border-b xs:border-b-0 xs:border-r border-background-60 justify-between">
|
||||
<div className="flex flex-col gap-1">
|
||||
<Typography
|
||||
variant="mobile-title"
|
||||
id="onboarding-connect_tracker-title"
|
||||
/>
|
||||
<Typography
|
||||
variant="standard"
|
||||
whitespace="whitespace-pre-wrap"
|
||||
id="onboarding-connect_tracker-description-middleware"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{!isMobile && (
|
||||
<div className="flex flex-col gap-2">
|
||||
<TipBox>
|
||||
<Typography
|
||||
variant="standard"
|
||||
color="text-accent-background-10"
|
||||
id="onboarding-connect_tracker-shake_tip"
|
||||
/>
|
||||
</TipBox>
|
||||
<MiddlewareLinks />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex-1 flex flex-col gap-4 px-4 pt-4 min-h-0 overflow-hidden justify-between">
|
||||
<TrackerList
|
||||
rows={rows}
|
||||
isMiddleware
|
||||
hideEmptyState={pendingDevices.length > 0}
|
||||
>
|
||||
{pendingDevices.length > 0 && (
|
||||
<div className="flex flex-col gap-3">
|
||||
<PendingTrackersDivider devices={pendingDevices} />
|
||||
<div className="grid sm:grid-cols-1 md:grid-cols-2 gap-4">
|
||||
{pendingDevices.map((device) => (
|
||||
<PendingTrackerCard
|
||||
key={device.hardwareId as string}
|
||||
device={device}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{isMobile && (
|
||||
<div className="pt-2 shrink-0">
|
||||
<MiddlewareLinks />
|
||||
</div>
|
||||
)}
|
||||
</TrackerList>
|
||||
<div className="flex flex-row justify-between items-center shrink-0 py-4 border-t border-background-60">
|
||||
<Button
|
||||
variant="secondary"
|
||||
state={{ alonePage: state.alonePage }}
|
||||
to={
|
||||
state.alonePage
|
||||
? '/onboarding/add-trackers'
|
||||
: '/onboarding/quiz/slime-set'
|
||||
}
|
||||
id="onboarding-wifi_creds-back-v2"
|
||||
/>
|
||||
{state.alonePage ? (
|
||||
<Button
|
||||
variant="primary"
|
||||
to="/"
|
||||
id="onboarding-connect_tracker-next"
|
||||
/>
|
||||
) : (
|
||||
<MoreSetsConfirm />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function SlimeVRConnectTrackersPage() {
|
||||
const { l10n } = useLocalization();
|
||||
const { visibleSteps, toggleSession } = useTrackingChecklist();
|
||||
const { applyProgress, state } = useOnboarding();
|
||||
const connectedIMUTrackers = useAtomValue(connectedIMUTrackersAtom);
|
||||
const { isMobile } = useBreakpoint('mobile');
|
||||
|
||||
const credsForm = useWifiCredsForm();
|
||||
const scan = useWifiScan();
|
||||
const session = useWifiProvisioningSession(credsForm.control);
|
||||
@@ -430,7 +563,9 @@ export function ConnectTrackersPage() {
|
||||
id="tracking_checklist-NETWORK_PROFILE_PUBLIC-desc"
|
||||
elems={{
|
||||
PublicFixLink: (
|
||||
<A href="https://docs.slimevr.dev/common-issues.html#network-profile-is-currently-set-to-public" />
|
||||
<A
|
||||
href={`${DOCS_TROUBLESHOOTING_URL}#network-profile-is-currently-set-to-public`}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
vars={{
|
||||
@@ -467,7 +602,7 @@ export function ConnectTrackersPage() {
|
||||
return (
|
||||
<>
|
||||
<div className="w-full h-full flex flex-col xs:flex-row overflow-hidden min-h-0">
|
||||
<div className="w-full xs:w-[340px] sm:w-[380px] lg:w-[400px] xl:w-[440px] p-5 flex flex-col gap-4 shrink-0 overflow-y-auto border-b xs:border-b-0 xs:border-r border-background-60 justify-between">
|
||||
<div className="w-full xs:w-[340px] sm:w-[380px] lg:w-[400px] xl:w-[440px] p-5 mobile:pt-0 flex flex-col gap-4 shrink-0 overflow-y-auto border-b xs:border-b-0 xs:border-r border-background-60 justify-between">
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex flex-col gap-1">
|
||||
<Typography
|
||||
@@ -499,7 +634,7 @@ export function ConnectTrackersPage() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex-1 flex flex-col gap-4 px-4 pt-4 min-h-0 overflow-hidden justify-between mobile:pb-14">
|
||||
<div className="flex-1 flex flex-col gap-4 px-4 pt-4 min-h-0 overflow-hidden justify-between mobile:pb-[76px]">
|
||||
<div className="flex flex-col gap-4 min-h-0 flex-1">
|
||||
<TrackerList
|
||||
rows={rows}
|
||||
|
||||
@@ -24,6 +24,9 @@ import { TrackerWifi } from '@/components/tracker/TrackerWifi';
|
||||
|
||||
export const DOCS_TROUBLESHOOTING_URL =
|
||||
'https://docs.slimevr.dev/common-issues.html';
|
||||
export const MIDDLEWARE_DOCS_URL = 'https://docs.slimevr.dev/tools/index.html';
|
||||
|
||||
export type TrackerType = 'slimevr' | 'middleware';
|
||||
|
||||
export const trackerStatusLabelMap: Record<TrackerProvisioningStatus, string> =
|
||||
{
|
||||
@@ -401,9 +404,11 @@ export function NoSerialLogsModal({
|
||||
export function StatusBar({
|
||||
connectedCount,
|
||||
connectingCount,
|
||||
isMiddleware,
|
||||
}: {
|
||||
connectedCount: number;
|
||||
connectingCount: number;
|
||||
isMiddleware?: boolean;
|
||||
}) {
|
||||
return (
|
||||
<div className="hidden sm:flex rounded-lg bg-background-60 p-4 items-center gap-3 shrink-0">
|
||||
@@ -430,7 +435,7 @@ export function StatusBar({
|
||||
id={
|
||||
connectingCount > 0
|
||||
? 'onboarding-connect_tracker-setting_up'
|
||||
: 'onboarding-connect_tracker-all_caught_up'
|
||||
: `onboarding-connect_tracker-all_caught_up${isMiddleware ? '-middleware' : ''}`
|
||||
}
|
||||
vars={{ amount: connectingCount }}
|
||||
/>
|
||||
@@ -443,20 +448,23 @@ function EmptyTrackerListIllustration({
|
||||
scanStatus,
|
||||
hasNetworks = false,
|
||||
onOpenNoSerialLogsModal,
|
||||
isMiddleware = false,
|
||||
}: {
|
||||
scanStatus: WifiScanStatus;
|
||||
hasNetworks?: boolean;
|
||||
onOpenNoSerialLogsModal?: () => void;
|
||||
isMiddleware?: boolean;
|
||||
}) {
|
||||
const isError =
|
||||
scanStatus === WifiScanStatus.CONNECTION_ERROR ||
|
||||
scanStatus === WifiScanStatus.NO_SERIAL_LOGS_ERROR ||
|
||||
scanStatus === WifiScanStatus.NO_SERIAL_DEVICE_FOUND ||
|
||||
scanStatus === WifiScanStatus.UNSUPPORTED;
|
||||
!isMiddleware &&
|
||||
(scanStatus === WifiScanStatus.CONNECTION_ERROR ||
|
||||
scanStatus === WifiScanStatus.NO_SERIAL_LOGS_ERROR ||
|
||||
scanStatus === WifiScanStatus.NO_SERIAL_DEVICE_FOUND ||
|
||||
scanStatus === WifiScanStatus.UNSUPPORTED);
|
||||
|
||||
const hasScanResults = scanStatus === WifiScanStatus.RESULTS || hasNetworks;
|
||||
|
||||
const titleId =
|
||||
const slimevrTitleId =
|
||||
scanStatus === WifiScanStatus.NO_SERIAL_DEVICE_FOUND
|
||||
? 'onboarding-connect_tracker-connection_status-no_serial_device_found'
|
||||
: scanStatus === WifiScanStatus.NO_SERIAL_LOGS_ERROR
|
||||
@@ -468,8 +476,7 @@ function EmptyTrackerListIllustration({
|
||||
: hasScanResults
|
||||
? 'onboarding-connect_tracker-scan_results_title'
|
||||
: 'onboarding-connect_tracker-waiting_first_title';
|
||||
|
||||
const descId =
|
||||
const slimevrDescId =
|
||||
scanStatus === WifiScanStatus.NO_SERIAL_DEVICE_FOUND
|
||||
? 'onboarding-wifi_creds-scan_error_no_device'
|
||||
: scanStatus === WifiScanStatus.NO_SERIAL_LOGS_ERROR
|
||||
@@ -482,13 +489,17 @@ function EmptyTrackerListIllustration({
|
||||
? 'onboarding-connect_tracker-scan_results_desc'
|
||||
: 'onboarding-connect_tracker-waiting_first_desc';
|
||||
|
||||
const middlewareTitleId = 'onboarding-connect_tracker-waiting_first_title';
|
||||
const middlewareDescId =
|
||||
'onboarding-connect_tracker-waiting_first_desc-middleware';
|
||||
|
||||
return (
|
||||
<EmptyState
|
||||
className="flex-1 h-full min-h-[220px] !gap-3 my-auto"
|
||||
slimeState={isError ? SlimeState.SAD : SlimeState.JUMPY}
|
||||
titleColor={isError ? 'text-status-critical' : undefined}
|
||||
titleId={titleId}
|
||||
descriptionId={descId}
|
||||
titleId={isMiddleware ? middlewareTitleId : slimevrTitleId}
|
||||
descriptionId={isMiddleware ? middlewareDescId : slimevrDescId}
|
||||
action={
|
||||
isError && (
|
||||
<button
|
||||
@@ -558,8 +569,7 @@ export function mergeTrackerList(
|
||||
|
||||
for (const ct of connectedIMUTrackers) {
|
||||
if (claimedConnected.has(ct)) continue;
|
||||
const mac = normalizeMac(ct.device?.hardwareInfo?.hardwareIdentifier);
|
||||
const key = mac || `connected-${ct.device?.id}`;
|
||||
const key = `connected-${ct.tracker.trackerId}`;
|
||||
rows.push({ kind: 'connected', key, tracker: ct });
|
||||
}
|
||||
|
||||
@@ -568,16 +578,20 @@ export function mergeTrackerList(
|
||||
|
||||
export function TrackerList({
|
||||
rows,
|
||||
scanStatus,
|
||||
networks,
|
||||
scanStatus = WifiScanStatus.NONE,
|
||||
networks = [],
|
||||
onOpenNoSerialLogsModal,
|
||||
children,
|
||||
isMiddleware = false,
|
||||
hideEmptyState = false,
|
||||
}: {
|
||||
rows: TrackerRow[];
|
||||
scanStatus: WifiScanStatus;
|
||||
networks: WifiNetworkT[];
|
||||
onOpenNoSerialLogsModal: () => void;
|
||||
children: ReactNode;
|
||||
scanStatus?: WifiScanStatus;
|
||||
networks?: WifiNetworkT[];
|
||||
onOpenNoSerialLogsModal?: () => void;
|
||||
children?: ReactNode;
|
||||
isMiddleware?: boolean;
|
||||
hideEmptyState?: boolean;
|
||||
}) {
|
||||
const { isMobile } = useBreakpoint('mobile');
|
||||
const connectedCount = useMemo(
|
||||
@@ -597,6 +611,7 @@ export function TrackerList({
|
||||
<StatusBar
|
||||
connectedCount={connectedCount}
|
||||
connectingCount={connectingCount}
|
||||
isMiddleware={isMiddleware}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -623,13 +638,14 @@ export function TrackerList({
|
||||
/>
|
||||
)
|
||||
)
|
||||
) : (
|
||||
) : !hideEmptyState ? (
|
||||
<EmptyTrackerListIllustration
|
||||
scanStatus={scanStatus}
|
||||
hasNetworks={networks.length > 0}
|
||||
onOpenNoSerialLogsModal={onOpenNoSerialLogsModal}
|
||||
isMiddleware={isMiddleware}
|
||||
/>
|
||||
)}
|
||||
) : null}
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,17 +5,21 @@ import { Typography } from '@/components/commons/Typography';
|
||||
import classNames from 'classnames';
|
||||
import { USBIcon } from '@/components/commons/icon/UsbIcon';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { LinkIcon } from '@/components/commons/icon/LinkIcon';
|
||||
import { useBreakpoint } from '@/hooks/breakpoint';
|
||||
|
||||
export function QuizButton({
|
||||
name,
|
||||
active,
|
||||
icon,
|
||||
onClick,
|
||||
textVariant = 'section-title',
|
||||
}: {
|
||||
active?: boolean;
|
||||
name: string;
|
||||
icon: ReactNode;
|
||||
onClick: () => void;
|
||||
textVariant?: 'section-title' | 'standard';
|
||||
}) {
|
||||
return (
|
||||
<Clickable
|
||||
@@ -23,7 +27,7 @@ export function QuizButton({
|
||||
pressed={active}
|
||||
className={classNames(
|
||||
'flex rounded-lg bg-background-60 hover:bg-background-50 cursor-pointer',
|
||||
'p-4 outline outline-2 flex-col gap-4 items-center justify-between fill-background-20',
|
||||
'p-4 outline outline-2 flex-col gap-4 items-center justify-between fill-background-20 text-center',
|
||||
{
|
||||
'outline-accent-background-30': active,
|
||||
'outline-transparent': !active,
|
||||
@@ -31,12 +35,13 @@ export function QuizButton({
|
||||
)}
|
||||
>
|
||||
{icon}
|
||||
<Typography id={name} variant="section-title" />
|
||||
<Typography id={name} variant={textVariant} bold />
|
||||
</Clickable>
|
||||
);
|
||||
}
|
||||
|
||||
export function QuizSlimeSetQuestion() {
|
||||
const { isMobile } = useBreakpoint('mobile');
|
||||
const { applyProgress, setSlimeSet, slimeSet } = useOnboarding();
|
||||
const nav = useNavigate();
|
||||
|
||||
@@ -49,6 +54,9 @@ export function QuizSlimeSetQuestion() {
|
||||
case 'dongle-slime':
|
||||
nav('/onboarding/dongle');
|
||||
break;
|
||||
case 'middleware':
|
||||
nav('/onboarding/connect-middleware');
|
||||
break;
|
||||
case 'slime-v1':
|
||||
case 'wifi-slime':
|
||||
nav('/onboarding/connect-trackers');
|
||||
@@ -103,7 +111,7 @@ export function QuizSlimeSetQuestion() {
|
||||
variant="section-title"
|
||||
id="onboarding-quiz-slimeset-thirdparty-sets"
|
||||
/>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)_minmax(0,0.45fr)] mobile:grid-cols-3 gap-4">
|
||||
<QuizButton
|
||||
onClick={() => next('wifi-slime')}
|
||||
icon={
|
||||
@@ -129,6 +137,16 @@ export function QuizSlimeSetQuestion() {
|
||||
}
|
||||
name="onboarding-quiz-slimeset-answer-dongle"
|
||||
/>
|
||||
<QuizButton
|
||||
onClick={() => next('middleware')}
|
||||
textVariant={isMobile ? 'section-title' : 'standard'}
|
||||
icon={
|
||||
<div className="fill-background-20">
|
||||
<LinkIcon size={isMobile ? 50 : 40} />
|
||||
</div>
|
||||
}
|
||||
name="onboarding-quiz-slimeset-answer-middleware"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -48,6 +48,7 @@ import { NavLink, useNavigate } from 'react-router-dom';
|
||||
import { useBreakpoint } from '@/hooks/breakpoint';
|
||||
import { openUrl } from '@/hooks/crossplatform';
|
||||
import { useWebsocketAPI } from '@/hooks/websocket-api';
|
||||
import { DOCS_TROUBLESHOOTING_URL } from '@/components/onboarding/pages/connect-trackers/TrackerList';
|
||||
|
||||
function Step({
|
||||
step: { status, id, optional, firstRequired },
|
||||
@@ -345,7 +346,7 @@ const stepContentLookup: Record<
|
||||
PublicFixLink: (
|
||||
<A
|
||||
className="text-background-20"
|
||||
href="https://docs.slimevr.dev/common-issues.html#network-profile-is-currently-set-to-public"
|
||||
href={`${DOCS_TROUBLESHOOTING_URL}#network-profile-is-currently-set-to-public`}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
|
||||
@@ -59,7 +59,7 @@ export type OnboardingContext = ReturnType<typeof useProvideOnboarding>;
|
||||
export function useProvideOnboarding() {
|
||||
const { setConfig } = useConfig();
|
||||
const [slimeSet, setSlimeSet] = useState<
|
||||
'butterfly' | 'slime-v1' | 'dongle-slime' | 'wifi-slime'
|
||||
'butterfly' | 'slime-v1' | 'dongle-slime' | 'wifi-slime' | 'middleware'
|
||||
>();
|
||||
const [usage, setUsage] = useState<'vr-gaming' | 'mocap' | 'vtubing'>();
|
||||
const [vrcOsc, setVrcOSC] = useState<boolean>();
|
||||
|
||||
Reference in new issue
Block a user