Compare commits

..
Author SHA1 Message Date
gorbit99 61065eba7f Apply round of suggestions 2025-09-30 22:48:51 +02:00
gorbit99 0e750fd1de Merge branch 'main' into tracker-graph 2025-09-30 01:30:32 +02:00
gorbit99 7aabdbe724 Add tracker graph to tracker settings page 2025-09-30 01:25:44 +02:00
Eiren Rain de16acbcf4 New Pontoon translations (#1512) 2025-09-30 00:24:22 +03:00
ErimelandSlimePuppy 486cb295ac Pontoon: Update French (fr) localization of GUI
Co-Authored-By: Erimel <[email protected]>
Co-Authored-By: SlimePuppy <[email protected]>
2025-09-23 21:00:09 +00:00
nekomona dd3fe24294 Pontoon: Update Simplified Chinese (zh-Hans) localization of GUI
Co-authored-by: nekomona <[email protected]>
2025-09-23 21:00:09 +00:00
Alejandro 59bdedecbb Pontoon: Update Latinamerican Spanish (es-419) localization of GUI
Co-authored-by: Alejandro <[email protected]>
2025-09-23 21:00:09 +00:00
fc3d049019 Pontoon: Update Thai (th) localization of GUI
Co-Authored-By: YumeTomo <[email protected]>
Co-Authored-By: Cusmo84 <[email protected]>
Co-Authored-By: Kaiera huzu <[email protected]>
2025-09-23 21:00:09 +00:00
ReDoX de150e7349 Pontoon: Update Polish (pl) localization of GUI
Co-authored-by: ReDoX <[email protected]>
2025-09-23 21:00:09 +00:00
Meow Wei 06b3f61d37 Pontoon: Update Traditional Chinese (zh-Hant) localization of GUI
Co-authored-by: Meow Wei <[email protected]>
2025-09-23 21:00:09 +00:00
BaderandFennT 82b96d5ebe Pontoon: Update Arabic (ar) localization of GUI
Co-Authored-By: Bader <[email protected]>
Co-Authored-By: FennT <[email protected]>
2025-09-23 21:00:09 +00:00
Aed f2b4d468c2 Added Done button to end of mounting calibration (#1557) 2025-09-23 22:59:22 +02:00
Eiren Rain 1c0f5c381b Update CODEOWNERS (#1558) 2025-09-23 23:54:01 +03:00
lucas lelievre fb25421ab0 OOPS 2025-09-23 20:23:51 +00:00
lucas lelievre 4890b4a71c Update CODEOWNERS 2025-09-23 22:17:57 +02:00
lucas lelievre e38732a81c Remove secondary colors usage + improve spacing (#1554) 2025-09-22 21:27:07 +02:00
Eiren Rain 2a78354b17 Disable update prompt on Android (#1547) 2025-09-19 19:55:27 +03:00
Eiren Rain 3fb4347277 Fix Stagered fw update detection (#1544) 2025-09-19 19:55:17 +03:00
Eiren RainandButterscotch! 081e88ead4 Update gui/src/hooks/firmware-update.ts
Co-authored-by: Butterscotch! <[email protected]>
2025-09-18 15:34:56 +03:00
Uriel 73f41f8fc6 Disable update prompt on Android 2025-09-17 19:32:30 -03:00
loucass003 f233f59079 Fix Stagered fw update detection 2025-09-16 23:24:53 +02:00
Eiren Rain 9644b00690 fix: use transaction id in RPC reponses (#1527) 2025-09-16 18:54:12 +03:00
Eiren Rain 543e319c25 HID support on Android (#1532) 2025-09-16 14:57:24 +03:00
Eiren Rain b7ef70f5c6 Bump actions/setup-java from 4 to 5 (#1522) 2025-09-16 14:25:42 +03:00
Eiren Rain af171f8812 Fix Android serial support (#1533) 2025-09-16 14:25:11 +03:00
dependabot[bot] 8ec3cade06 Bump actions/setup-java from 4 to 5
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4 to 5.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-16 11:23:12 +00:00
Eiren Rain bec8be46ca Add folder icon option for the file input (#1536) 2025-09-16 14:22:47 +03:00
Eiren Rain ac7f809132 Bump actions/setup-node from 4 to 5 (#1540) 2025-09-16 14:22:10 +03:00
Eiren Rain fcb241fab8 Bump actions/labeler from 5 to 6 (#1541) 2025-09-16 14:21:55 +03:00
Eiren Rain fbdcf2fa2d Race condition patch for constraints (#1535) 2025-09-16 14:21:13 +03:00
Butterscotch! 73c821e07b Merge remote-tracking branch 'upstream/main' into bscotch/android-serial-fix 2025-09-11 16:07:57 -04:00
Butterscotch! 422ddd7ee8 Write serial directly on Android 2025-09-11 16:07:49 -04:00
Butterscotch! 943ad974ec Limit Android serial buffer to 1024 chars 2025-09-11 16:03:57 -04:00
dependabot[bot] 12a5d59e89 Bump actions/labeler from 5 to 6
Bumps [actions/labeler](https://github.com/actions/labeler) from 5 to 6.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-08 14:22:53 +00:00
dependabot[bot] 85286651dd Bump actions/setup-node from 4 to 5
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-08 14:22:49 +00:00
Uriel e9b3efe3d5 Add folder icon option for the file input 2025-09-05 14:13:54 -04:00
Butterscotch! 75fa1aa1e2 Messy race condition patch for constraints 2025-09-04 06:50:34 -04:00
Butterscotch! 7d642a21f5 Use a read buffer for Android serial
The serial reader on Android does not have a big enough buffer for our serial output, causing issues when parsing it. We can buffer until we reach a newline character to make parsing work.
2025-09-04 06:35:30 -04:00
Butterscotch! 4e1421180c Ensure serial port closure 2025-09-04 04:33:39 -04:00
Butterscotch! f0a72645d7 Clear request more & update usbReceiver comment 2025-09-04 04:27:20 -04:00
Butterscotch! 86b8e0a904 Fix serial staying open after disconnect 2025-09-04 04:18:52 -04:00
Butterscotch! 789e6a6962 Make ACTION_USB_PERMISSION const 2025-09-04 02:37:52 -04:00
Butterscotch! f03b300d72 Use val for usbReceiver 2025-09-04 02:26:36 -04:00
Butterscotch! 6b0822c0f6 Rename HID "Service" to "Manager" 2025-09-04 02:26:08 -04:00
Butterscotch! d9774cab87 Extra requestingPermission handling for new device 2025-09-04 02:24:21 -04:00
Butterscotch! f07f9f3718 Add comments for USB attach/detach events 2025-09-04 02:22:23 -04:00
Butterscotch! 486be0973b Use USB events for serial & re-request permission 2025-09-04 02:17:28 -04:00
Butterscotch! 9246dd00d3 Additional comments 2025-09-04 01:41:01 -04:00
Butterscotch! baf515791d Fix HID service comments 2025-09-04 01:37:15 -04:00
Butterscotch! 876450d764 Make Android USB host mode optional 2025-09-04 01:34:22 -04:00
Butterscotch! 44e90e255b Rename HID classes for clarity 2025-09-04 01:34:06 -04:00
Butterscotch! 41026ab851 Move deviceIdLookup to HIDCommon 2025-09-04 01:28:26 -04:00
Butterscotch! d8509c431d Remove device reattach handling
Events should be good enough :3
2025-09-04 01:05:35 -04:00
Butterscotch! 66df65eb80 Use Android USB events for HID instead of polling 2025-09-04 00:31:43 -04:00
Butterscotch! 30641a5809 Reconnect HID 2025-09-04 00:31:43 -04:00
Butterscotch! 574523daec Persist UsbDeviceConnection 2025-09-04 00:31:43 -04:00
Butterscotch! 1913605d16 De-duplicate HID code 2025-09-04 00:31:42 -04:00
Butterscotch! 8aeecab51f Implement awful reading 2025-09-04 00:29:45 -04:00
Butterscotch! 9fd5d6a187 Initial Android USB HID support 2025-09-04 00:29:45 -04:00
peelz 0c09c22306 fix: use transaction id in RPC reponses 2025-09-01 13:46:48 -04:00
221 changed files with 6175 additions and 6104 deletions

No files matched your search

+16 -16
View File
@@ -2,23 +2,23 @@
* @Eirenliel
# Make everyone be able to approve SolarXR submodule changes
/solarxr-protocol @ButterscotchV @Erimelowo @ImUrX @loucass003
/solarxr-protocol @ButterscotchV @Erimelowo @loucass003
# Make Loucas and Uriel the owners of all GUI stuff
/gui/ @ImUrX @loucass003
/pnpm-lock.yaml @ImUrX @loucass003
/pnpm-workspace.yaml @ImUrX @loucass003
# Make Loucass the owner of all GUI stuff
/gui/ @loucass003
/pnpm-lock.yaml @loucass003
/pnpm-workspace.yaml @loucass003
# Uriel and Erimel responsible for i18n
/gui/public/i18n/ @ImUrX @Erimelowo
/gui/src/i18n/ @ImUrX @Erimelowo
/l10n.toml @ImUrX @Erimelowo
# loucass003 and Erimel responsible for i18n
/gui/public/i18n/ @loucass003 @Erimelowo
/gui/src/i18n/ @loucass003 @Erimelowo
/l10n.toml @loucass003 @Erimelowo
/gui/src/components/settings/ @Erimelowo @ImUrX @loucass003
/gui/src/components/settings/ @Erimelowo @loucass003
# Rust part of the GUI
/gui/src-tauri/ @ImUrX
/Cargo.lock @ImUrX
/gui/src-tauri/ @loucass003
/Cargo.lock @loucass003
# Some server code~
/server/ @ButterscotchV @Eirenliel @Erimelowo
@@ -32,7 +32,7 @@
/server/src/main/java/dev/slimevr/filtering/ @Erimelowo
# Linux files
*.nix @ImUrX
/flake.lock @ImUrX
/dev.slimevr.SlimeVR.metainfo.xml @ImUrX
/.envrc @ImUrX
*.nix @loucass003
/flake.lock @loucass003
/dev.slimevr.SlimeVR.metainfo.xml @loucass003
/.envrc @loucass003
+2 -2
View File
@@ -27,7 +27,7 @@ jobs:
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: '.node-version'
cache: 'pnpm'
@@ -85,7 +85,7 @@ jobs:
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: '.node-version'
cache: 'pnpm'
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: '22.x'
+7 -7
View File
@@ -27,7 +27,7 @@ jobs:
run: git fetch --tags origin --recurse-submodules=no --force
- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'adopt'
@@ -56,7 +56,7 @@ jobs:
run: git fetch --tags origin --recurse-submodules=no --force
- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'adopt'
@@ -95,7 +95,7 @@ jobs:
run: git fetch --tags origin --recurse-submodules=no --force
- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'adopt'
@@ -105,7 +105,7 @@ jobs:
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: '.node-version'
cache: 'pnpm'
@@ -190,7 +190,7 @@ jobs:
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: '.node-version'
cache: 'pnpm'
@@ -266,7 +266,7 @@ jobs:
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: '.node-version'
cache: 'pnpm'
@@ -351,7 +351,7 @@ jobs:
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: '.node-version'
cache: 'pnpm'
+1 -1
View File
@@ -17,6 +17,6 @@ jobs:
pull-requests: write
steps:
- uses: actions/labeler@v5
- uses: actions/labeler@v6
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
+31 -119
View File
@@ -1,74 +1,28 @@
import { FlatCompat } from '@eslint/eslintrc';
import eslint from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import js from '@eslint/js';
import importAlias from '@dword-design/eslint-plugin-import-alias';
import { configs, plugins } from 'eslint-config-airbnb-extended';
import { rules as prettierConfigRules } from 'eslint-config-prettier';
import prettierPlugin from 'eslint-plugin-prettier';
const jsConfig = [
// ESLint Recommended Rules
{
name: 'js/config',
...js.configs.recommended,
},
// Stylistic Plugin
plugins.stylistic,
// Import X Plugin
plugins.importX,
// Airbnb Base Recommended Config
...configs.base.recommended,
];
const reactConfig = [
// React Plugin
plugins.react,
// React Hooks Plugin
plugins.reactHooks,
// React JSX A11y Plugin
plugins.reactA11y,
// Airbnb React Recommended Config
...configs.react.recommended,
];
const typescriptConfig = [
// TypeScript ESLint Plugin
plugins.typescriptEslint,
// Airbnb Base TypeScript Config
...configs.base.typescript,
// Airbnb React TypeScript Config
...configs.react.typescript,
];
const prettierConfig = [
// Prettier Plugin
{
name: 'prettier/plugin/config',
plugins: {
prettier: prettierPlugin,
},
},
// Prettier Config
{
name: 'prettier/config',
rules: {
...prettierConfigRules,
// remove errors with prettier, use prettier for that pls
// 'prettier/prettier': 'error',
},
},
];
const compat = new FlatCompat();
export const gui = [
// Javascript Config
...jsConfig,
// React Config
...reactConfig,
// TypeScript Config
...typescriptConfig,
// Prettier Config
...prettierConfig,
importAlias.configs.recommended,
eslint.configs.recommended,
...tseslint.configs.recommended,
...compat.extends('plugin:@dword-design/import-alias/recommended'),
...compat.plugins('eslint-plugin-react-hooks'),
// Add import-alias rule inside compat because plugin doesn't like flat configs
...compat.config({
rules: {
'@dword-design/import-alias/prefer-alias': [
'error',
{
alias: {
'@': './src/',
},
},
],
},
}),
{
languageOptions: {
ecmaVersion: 'latest',
@@ -85,52 +39,10 @@ export const gui = [
},
},
files: ['src/**/*.{js,jsx,ts,tsx,json}'],
plugins: {
'@typescript-eslint': tseslint.plugin,
},
rules: {
// fixes for airbnb
'max-classes-per-file': 'off',
'no-underscore-dangle': 'off',
'no-plusplus': 'off',
'consistent-return': 'off',
'no-bitwise': 'off',
eqeqeq: ['error', 'smart'],
'no-restricted-syntax': 'off',
'no-param-reassign': 'off',
'no-return-assign': ['error', 'except-parens'],
'default-case': 'off',
'no-continue': 'off',
'react/forbid-prop-types': 'off',
'no-script-url': 'off',
// stuff that should be enabled again later
eqeqeq: 'off',
'no-nested-ternary': 'off',
// FIXME: Remove after merge of https://github.com/SlimeVR/SlimeVR-Server/pull/1494
'no-await-in-loop': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-shadow': 'off',
'import-x/prefer-default-export': 'off',
'import-x/no-cycle': 'off',
'import-x/no-rename-default': 'off',
'jsx-a11y/heading-has-content': 'off',
'jsx-a11y/alt-text': 'off',
'jsx-a11y/media-has-caption': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/no-noninteractive-element-to-interactive-role': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'react/require-default-props': 'off',
'react/no-unstable-nested-components': 'off',
'react/no-unused-prop-types': 'off',
'react-hooks/rules-of-hooks': 'off',
'react-hooks/exhaustive-deps': 'off',
// end
'@typescript-eslint/switch-exhaustiveness-check': [
'error',
{
considerDefaultExhaustiveForUnions: true,
},
],
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'spaced-comment': 'error',
@@ -148,14 +60,14 @@ export const gui = [
ignoreRestSiblings: true,
},
],
'@dword-design/import-alias/prefer-alias': [
'error',
{
alias: {
'@': './src/',
},
},
],
},
settings: {
'import/resolver': {
typescript: {},
},
react: {
version: 'detect',
},
},
},
// Global ignore
+14 -17
View File
@@ -26,6 +26,7 @@
"@tweenjs/tween.js": "^25.0.0",
"@twemoji/svg": "^15.0.0",
"browser-fs-access": "^0.35.0",
"chart.js": "^4.5.0",
"classnames": "^2.5.1",
"flatbuffers": "22.10.26",
"intl-pluralrules": "^2.0.1",
@@ -33,6 +34,7 @@
"jotai": "^2.12.2",
"prompts": "^2.4.2",
"react": "^18.3.1",
"react-chartjs-2": "^5.3.0",
"react-dom": "^18.3.1",
"react-error-boundary": "^4.0.13",
"react-helmet": "^6.1.0",
@@ -66,12 +68,9 @@
"gen:icons": "tauri icon --ios-color '#663499' src-tauri/icons/icon.svg"
},
"devDependencies": {
"@dword-design/eslint-plugin-import-alias": "^6.0.3",
"@eslint/compat": "^1.3.0",
"@eslint/js": "^9.29.0",
"@dword-design/eslint-plugin-import-alias": "^4.0.9",
"@openapi-codegen/cli": "^2.0.2",
"@openapi-codegen/typescript": "^8.0.2",
"@stylistic/eslint-plugin": "^3.1.0",
"@tailwindcss/forms": "^0.5.9",
"@tauri-apps/cli": "^2.0.2",
"@types/file-saver": "^2.0.7",
@@ -81,29 +80,27 @@
"@types/react-modal": "3.16.3",
"@types/semver": "^7.5.8",
"@types/three": "^0.163.0",
"@typescript-eslint/eslint-plugin": "^8.34.0",
"@typescript-eslint/parser": "^8.34.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitejs/plugin-react": "^4.3.2",
"autoprefixer": "^10.4.20",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"eslint": "^9.29.0",
"eslint-config-airbnb-extended": "^2.1.0",
"eslint-config-prettier": "^10.1.5",
"eslint-import-resolver-typescript": "^4.4.3",
"eslint-plugin-import-x": "^4.15.2",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint": "^8.57.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react-hooks": "^4.6.2",
"globals": "^15.10.0",
"prettier": "^3.5.3",
"prettier": "^3.3.3",
"rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.79.4",
"spdx-satisfies": "^5.0.1",
"tailwind-gradient-mask-image": "^1.2.0",
"tailwindcss": "^3.4.13",
"typescript-eslint": "^8.34.0",
"typescript-eslint": "^8.8.0",
"vite": "^5.4.8"
}
}
+22 -2
View File
@@ -497,8 +497,6 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = يمكن أن ي
settings-general-fk_settings-leg_tweak-toe_snap-description = الانجذاب إلى أصابع القدم يحاول تخمين دوران قدميك إذا لم تكن أجهزة تعقب القدم قيد الاستخدام.
settings-general-fk_settings-leg_tweak-foot_plant-description = تثبيت اصبع القدم يحاول تخمين دوران قدميك إذا لم تكن أجهزة تعقب القدم قيد الاستخدام.
settings-general-fk_settings-leg_fk = تعقب الساق
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = تمكين إعادة ضبط تركيب القدمين عن طريق المشي على رؤوس الأصابع.
settings-general-fk_settings-leg_fk-reset_mounting_feet = إعادة تعيين تركيب القدمين
settings-general-fk_settings-enforce_joint_constraints = حدود الهيكل العظمي
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints = فرض القيود
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints-description = منع المفاصل من الدوران إلى ما بعد الحد الأقصى
@@ -637,6 +635,14 @@ settings-general-interface-discord_presence-message =
[many] كثيرة
*[other] أخرى
}
settings-interface-behavior-error_tracking = جمع الأخطاء عبر Sentry.io
settings-interface-behavior-error_tracking-description_v2 =
<h1>هل توافق على جمع بيانات الخطأ مجهولة المصدر؟</h1>
<b>نحن لا نجمع معلومات شخصية</b> مثل عنوان IP الخاص بك أو بيانات الاعتماد اللاسلكية. يقدر SlimeVR خصوصيتك!
لتوفير أفضل تجربة للمستخدم، نقوم بجمع تقارير الأخطاء ومقاييس الأداء ومعلومات نظام التشغيل مجهولة المصدر. يساعدنا هذا في اكتشاف الأخطاء والمشكلات المتعلقة ب SlimeVR. يتم جمع هذه المقاييس عبر Sentry.io.
settings-interface-behavior-error_tracking-label = إرسال الأخطاء إلى المطورين
## Serial settings
@@ -659,6 +665,8 @@ settings-serial-get_infos = احصل على معلومات
settings-serial-serial_select = اختر منفذ تسلسلي
settings-serial-auto_dropdown_item = تلقائي
settings-serial-get_wifi_scan = احصل على فحص WiFi
settings-serial-file_type = نص عادي
settings-serial-save_logs = حفظ في ملف
## OSC router settings
@@ -688,9 +696,21 @@ settings-osc-router-network-address-placeholder = عنوان آي بي في 4
## OSC VRChat settings
settings-osc-vrchat = أجهزة تعقب "في ار تشات أوه أس سي"
# This cares about multilines
settings-osc-vrchat-description-v1 =
تغيير الإعدادات الخاصة بمعيار أجهزة تعقب OSC المستخدم لإرسال
بيانات التعقب إلى التطبيقات التي لا تحتوي على SteamVR (مثل Quest المستقل).
تأكد من تمكين OSC في VRChat عبر قائمة الإجراءات ضمن OSC > ممكن.
settings-osc-vrchat-enable = تمكين
settings-osc-vrchat-enable-description = بتبديل إرسال واستقبال البيانات.
settings-osc-vrchat-enable-label = تمكين
settings-osc-vrchat-oscqueryEnabled = تمكين OSCQuery
settings-osc-vrchat-oscqueryEnabled-description =
يكتشف OSCQuery تلقائيا مثيلات VRChat قيد التشغيل ويرسل البيانات إليها.
يمكنه أيضا الإعلان عن نفسه لهم من أجل تلقي بيانات HMD ووحدة التحكم.
للسماح بتلقي بيانات HMD ووحدة التحكم من VRChat ، انتقل إلى إعدادات القائمة الرئيسية
ضمن "التتبع و IK (الحركة العكسية)" وتمكين "السماح بإرسال بيانات OSC لتتبع الرأس والمعصم".
settings-osc-vrchat-oscqueryEnabled-label = تمكين OSCQuery
settings-osc-vrchat-network = منافذ الشبكة
settings-osc-vrchat-network-port_in =
.label = منفذ الدخول
+5
View File
@@ -390,6 +390,10 @@ tracker-settings-update-blocked = Update not available. No other releases availa
tracker-settings-update-available = { $versionName } is now available
tracker-settings-update = Update now
tracker-settings-update-title = Firmware version
tracker-settings-graph-acceleration-title = Tracker Acceleration
tracker-settings-graph-position-title = Tracker Position
tracker-settings-graph-show-title = Show Tracker Graph
tracker-settings-graph-hide-title = Hide Tracker Graph
## Tracker part card info
tracker-part_card-no_name = No name
@@ -1125,6 +1129,7 @@ onboarding-automatic_mounting-preparation-v2-step-2 = 3. Hold the position until
onboarding-automatic_mounting-put_trackers_on-title = Put on your trackers
onboarding-automatic_mounting-put_trackers_on-description = To calibrate mounting orientations, we're gonna use the trackers you just assigned. Put on all your trackers, you can see which are which in the figure to the right.
onboarding-automatic_mounting-put_trackers_on-next = I have all my trackers on
onboarding-automatic_mounting-return-home = Done
## Tracker manual proportions setupa
onboarding-manual_proportions-back = Go Back to Reset tutorial
+2 -5
View File
@@ -7,8 +7,8 @@
## Websocket (server) status
websocket-connecting = Conectando al servidor
websocket-connection_lost = Conexión al servidor perdida. Intentando reconectar...
websocket-connecting = Cargando...
websocket-connection_lost = ¡El servidor falló!
websocket-connection_lost-desc = Parece que el servidor de SlimeVR ha dejado de funcionar. Revise los registros y reinicie el programa.
websocket-timedout = No se ha podido conectar al servidor.
websocket-timedout-desc = Parece que el servidor de SlimeVR ha dejado de funcionar o se agotó el tiempo de espera de la conexión. Revise los registros y reinicie el programa
@@ -609,8 +609,6 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = El clip del suel
settings-general-fk_settings-leg_tweak-toe_snap-description = El encajado de dedos intenta adivinar la rotación de los pies si sus respectivos trackers no están en uso.
settings-general-fk_settings-leg_tweak-foot_plant-description = El plantado del pie rota los pies para que sean paralelos con el suelo al entrar en contacto.
settings-general-fk_settings-leg_fk = Tracking de piernas
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = Activar reinicio de montura para el pie mediante el pararse de puntillas.
settings-general-fk_settings-leg_fk-reset_mounting_feet = Reinicio de montura de pies
settings-general-fk_settings-enforce_joint_constraints = Límites esqueléticos
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints = Imponer restricciones
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints-description = Evita que las articulaciones giren más allá de su límite
@@ -1018,7 +1016,6 @@ onboarding-connect_tracker-next = He conectado todos mis sensores
onboarding-calibration_tutorial = Tutorial de calibración de IMU
onboarding-calibration_tutorial-subtitle = ¡Esto te ayudara a reducir la desviación del tracker!
onboarding-calibration_tutorial-description = Cada vez que enciendes tus trackers, van a necesitar descansar un ratito en una superficie plana para calibrarse. Tratemos de hacer lo mismo presionando el botón «{ onboarding-calibration_tutorial-calibrate }», <b>¡No los muevas!</b>
onboarding-calibration_tutorial-calibrate = Puse los sensores en una mesa.
onboarding-calibration_tutorial-status-waiting = Esperando por ti
onboarding-calibration_tutorial-status-calibrating = Calibrando
+4 -2
View File
@@ -244,6 +244,8 @@ reset-reset_all_warning_default-v2 =
Êtes-vous sûr de vouloir faire cela ?
reset-full = Réinitialisation complète
reset-mounting = Réinitialiser l'alignement
reset-mounting-feet = Réinitialiser l'alignement des pieds
reset-mounting-fingers = Réinitialiser l'alignement des doigts
reset-yaw = Réinitialisation horizontale
## Serial detection stuff
@@ -611,8 +613,8 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = Le limitage au s
settings-general-fk_settings-leg_tweak-toe_snap-description = La correction des orteils estime l'orientation de vos pieds si vous ne portez pas de capteurs sur ses derniers.
settings-general-fk_settings-leg_tweak-foot_plant-description = La correction des pieds oriente vos pieds pour qu'ils soient parallèles au sol lorsqu'ils le touche.
settings-general-fk_settings-leg_fk = Capture des jambes
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = Activer la réinitialisation de l'alignement des pieds en allant sur la pointe des pieds.
settings-general-fk_settings-leg_fk-reset_mounting_feet = Réinitialisation de l'alignement des pieds
settings-general-fk_settings-leg_fk-reset_mounting_feet-description-v1 = Forcer la réinitialisation de l'alignement des pieds pendant la réinitialisation d'alignement générale.
settings-general-fk_settings-leg_fk-reset_mounting_feet-v1 = Forcer la réinitialisation de l'alignement des pieds
settings-general-fk_settings-enforce_joint_constraints = Limites squelettiques
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints = Appliquer les contraintes
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints-description = Empêche les articulations de tourner au-delà de leur limite
+2 -2
View File
@@ -243,6 +243,8 @@ reset-reset_all_warning_default-v2 =
Czy na pewno chcesz to zrobić?
reset-full = Pełny Reset
reset-mounting = Zresetuj położenie
reset-mounting-feet = Zresetuj mocowanie stóp
reset-mounting-fingers = Zresetuj mocowanie palców
reset-yaw = Reset odchylenia
## Serial detection stuff
@@ -610,8 +612,6 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = Floor-clip może
settings-general-fk_settings-leg_tweak-toe_snap-description = Toe-snap próbuje odgadnąć obrót twoich stóp, jeśli trackery stóp nie są używane.
settings-general-fk_settings-leg_tweak-foot_plant-description = Foot-plant obraca stopy, aby były równoległe do podłoża podczas kontaktu.
settings-general-fk_settings-leg_fk = Śledzenie nóg
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = Włącz resetowanie montażu stóp, chodząc na palcach.
settings-general-fk_settings-leg_fk-reset_mounting_feet = Reset mocowania stóp
settings-general-fk_settings-enforce_joint_constraints = Limity szkieletowe
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints = Wymuszanie ograniczeń
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints-description = Zapobiega obracaniu się stawów poza ich limit
+119 -24
View File
@@ -89,7 +89,7 @@ body_part-RIGHT_LITTLE_DISTAL = ปลายนิ้วก้อยขวา
board_type-UNKNOWN = ไม่ทราบ
board_type-NODEMCU = NodeMCU
board_type-CUSTOM = บอร์ดคัสตอม
board_type-CUSTOM = บอร์ดสั่งทำ
board_type-WROOM32 = WROOM32
board_type-WEMOSD1MINI = Wemos D1 Mini
board_type-TTGO_TBASE = TTGO T-Base
@@ -187,7 +187,7 @@ skeleton_bone-SKELETON_OFFSET-desc =
ปรับค่านี้เพื่อเลื่อนตำแหน่งแทร็กเกอร์ทั้งหมดไปด้านหน้าหรือด้านหลัง
เพื่อช่วยในการปรับเทียบสำหรับเกมหรือแอปพลิเคชันบางตัว
ที่อาจต้องการให้แทร็กเกอร์อยู่ด้านหน้ามากกว่าปกติ
skeleton_bone-SHOULDERS_DISTANCE = ระยะไหล่
skeleton_bone-SHOULDERS_DISTANCE = ระยะความกว้างไหล่
skeleton_bone-SHOULDERS_DISTANCE-desc =
นี่คือระยะทางในแนวตั้งจากฐานคอถึงไหล่ของคุณ
ปรับโดยเริ่มจากตั้งความยาวแขนส่วนบนเป็น 0 และปรับค่านี้จนกว่าแทร็กเกอร์ข้อศอกเสมือน
@@ -243,7 +243,9 @@ reset-reset_all_warning_default-v2 =
คุณต้องการดำเนินการต่อหรือไม่?
reset-full = รีเซ็ตแทร็กเกอร์ทั้งหมด
reset-mounting = รีเซ็ตการติดตั้ง
reset-yaw = รีเซ็ตแกนแนวตั้ง
reset-mounting-feet = รีเซ็ตทิศทางติดตั้งเท้า
reset-mounting-fingers = รีเซ็ตการติดตั้งนิ้วมือ
reset-yaw = รีเซ็ตแกนหมุน
## Serial detection stuff
@@ -260,25 +262,26 @@ serial_detection-close = ปิด
navbar-home = หน้าหลัก
navbar-body_proportions = สัดส่วนร่างกาย
navbar-trackers_assign = กำหนดแทร็กเกอร์
navbar-mounting = ปรับเทียบการติดตั้ง
navbar-mounting = ปรับเทียบทิศทางการติดตั้ง
navbar-onboarding = ตัวช่วยการตั้งค่า
navbar-settings = ตั้งค่า
## Biovision hierarchy recording
bvh-start_recording = อัด BVH
bvh-recording = กำลังอัดบันทึก
bvh-start_recording = บันทึก BVH
bvh-recording = กำลังบันทึก...
bvh-save_title = บันทึก การบันทึก BVH
## Tracking pause
tracking-unpaused = หยุดการติดตามชั่วคราว
tracking-paused = ยกเลิกการหยุดการติดตาม
tracking-paused = ยกเลิกหยุดการติดตาม
## Widget: Overlay settings
widget-overlay = โอเวอร์เลย์
widget-overlay-is_visible_label = แสดงโอเวอร์เลย์ ใน SteamVR
widget-overlay-is_mirrored_label = แสดงโอเวอร์เลย์เป็นกระจก
widget-overlay-is_mirrored_label = สะท้อนการแสดงโอเวอร์เลย์
## Widget: Drift compensation
@@ -286,7 +289,7 @@ widget-drift_compensation-clear = ล้างการชดเชยค่า
## Widget: Clear Reset Mounting
widget-clear_mounting = คืนค่าการติดตั้ง
widget-clear_mounting = ล้างค้าการติดตั้ง
## Widget: Developer settings
@@ -321,9 +324,9 @@ tracker-status-none = ไม่มีสถานะ
tracker-status-busy = ไม่ว่าง
tracker-status-error = มีปัญหา
tracker-status-disconnected = ขาดการเชื่อมต่อ
tracker-status-occluded = มีการติดขัด
tracker-status-occluded = ติดขัด
tracker-status-ok = OK
tracker-status-timed_out = หมดเวลาการเชื่อมต่อ
tracker-status-timed_out = หมดเวลาเชื่อมต่อ
## Tracker status columns
@@ -350,7 +353,7 @@ tracker-rotation-back = หลัง
tracker-rotation-back_left = หลังซ้าย
tracker-rotation-back_right = หลังขวา
tracker-rotation-custom = กำหนดเอง
tracker-rotation-overriden = (ถูกแทนที่ด้วยการ รีเซ็ตการติดตั้ง)
tracker-rotation-overriden = (ถูกแทนที่ด้วยการรีเซ็ตการติดตั้ง)
## Tracker information
@@ -403,7 +406,8 @@ tracker-settings-forget-description = ลบตัวแทร็กเกอร
tracker-settings-forget-label = ลืมแทร็กเกอร์นี้
tracker-settings-update-unavailable = ไม่สามารถอัพเดทได้ (DIY)
tracker-settings-update-low-battery = ไม่สามารถอัพเดทได้ แบตเตอรรี่ต่ำกว่า 50%
tracker-settings-update-up_to_date = อัพเดทล่าสุด
tracker-settings-update-up_to_date = อัพเดทล่าสุดแล้ว
tracker-settings-update-blocked = ไม่สามารถอัพเดทได้ ไม่มีเวอร์ชั่นอื่นที่พร้อมอัพเดท
tracker-settings-update-available = { $versionName } พร้อมใช้งานแล้ว
tracker-settings-update = อัพเดตเดี๋ยวนี้
tracker-settings-update-title = เวอร์ชั่นเฟิร์มแวร์
@@ -471,7 +475,7 @@ mounting_selection_menu-close = ปิด
## Sidebar settings
settings-sidebar-title = การตั้งค่า
settings-sidebar-general = ทั่วไป
settings-sidebar-general = การตั้งค่าทั่วไป
settings-sidebar-tracker_mechanics = การทำงานแทร็กเกอร์
settings-sidebar-stay_aligned = Stay Aligned
settings-sidebar-fk_settings = ตั้งค่าการจับตำแหน่ง
@@ -560,9 +564,9 @@ settings-general-tracker_mechanics-drift_compensation-amount-label = เปอ
settings-general-tracker_mechanics-drift_compensation-max_resets-label = ใช้ค่าจากการรีเซ็ต X ครั้ง
settings-general-tracker_mechanics-save_mounting_reset = บันทึกค่าการปรับเทียบตำแหน่งแบบอัตโนมัติ
settings-general-tracker_mechanics-save_mounting_reset-description =
บันทึกการปรับเทียบตำแหน่งแทร็กเกอร์ระหว่างการรีสตาร์ท มีประโยชน์กับ
ผู้ที่สวมชุดที่แทร็กเกอร์ไม่เคลื่อนในการใช้แต่ละครั้ง <b>ไม่แนะนำสำหรับผู้ใช้ทั่วไป!</b>
settings-general-tracker_mechanics-save_mounting_reset-enabled-label = บันทึกการรีเซ็ตตำแหน่ง
บันทึกการปรับเทียบการติดตั้งแทร็กเกอร์ระหว่างการรีสตาร์ท มีประโยชน์กับ
ผู้ที่แทร็กเกอร์ไม่เคลื่อนในการใช้แต่ละครั้ง <b>ไม่แนะนำสำหรับผู้ใช้ทั่วไป!</b>
settings-general-tracker_mechanics-save_mounting_reset-enabled-label = บันทึกการรีเซ็ตการติดตั้ง
settings-general-tracker_mechanics-use_mag_on_all_trackers = ใช้ตัววัดสนามแม่เหล็กบนแทร็กเกอร์ที่ IMU รองรับ
settings-general-tracker_mechanics-use_mag_on_all_trackers-description =
ใช้ตัววัดสนามแม่เหล็กกับแทร็กเกอร์ทุกตัวที่เฟิร์มแวร์รองรับ ลดค่าดริฟท์ในพื้นที่เล่นที่สนามแม่เหล็กเสถียร์
@@ -573,6 +577,7 @@ settings-stay_aligned-description = Stay Aligned ลดอัตตาค่า
settings-stay_aligned-setup-label = ตั้งค่า Stay Aligned
settings-stay_aligned-setup-description = คุณต้องทำการ "ตั้งค่า Stay Aligned" ถึงจะเปิดใช้งาน Stay Aligned ได้
settings-stay_aligned-warnings-drift_compensation = ⚠ กรุณาปิดใช้งาน การชดเชยค่าดริฟท์!! เพราะมันจะขัดกับการตั้งค่า Stay Aligned
settings-stay_aligned-enabled-label = ปรับแทร็กเกอร์ของคุณ
settings-stay_aligned-hide_yaw_correction-label = ซ่อนการปรับแต่ง(เพื่อเปรียบเทียบกับไม่ได้เปิดใช้ Stay Aligned)
settings-stay_aligned-general-label = การตั้งค่าทั่วไป
settings-stay_aligned-relaxed_poses-label = ท่าผ่อนคลาย
@@ -609,21 +614,28 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = เปิดก
settings-general-fk_settings-leg_tweak-toe_snap-description = เปิดเดาการหมุนของเท้าเพื่อคาดเดาการหมุนของเท้าในกรณีที่คุณไม่ได้ใส่แทร็กเกอร์ที่เท้า
settings-general-fk_settings-leg_tweak-foot_plant-description = เปิดปรับสมดุลเท้าเพื่อให้เท้าคุณอยู่ในระนาบเดียวกับพื้นเมื่อเท้าอยู่บนพื้น
settings-general-fk_settings-leg_fk = การจับตำแหน่งขา
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = เปิดให้รีเซ็ตตำแหน่งแทร็กเกอร์เท้าเมื่อเขย่งได้
settings-general-fk_settings-leg_fk-reset_mounting_feet = รีเซ็ตตำแหน่งแทร็กเกอร์เท้า
settings-general-fk_settings-leg_fk-reset_mounting_feet-description-v1 = บังคับใช้การรีเซ็ตการติดตั้งของแทร็กเกอร์เท้าเมื่อทำการรีเซ็ตการติดตั้ง
settings-general-fk_settings-leg_fk-reset_mounting_feet-v1 = บังคับใช้รีเซ็ตตำแหน่งที่เท้า
settings-general-fk_settings-enforce_joint_constraints = จำกัดองศากระดูก
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints = จำกัดองศาที่จะหมุนได้
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints-description = ป้องกันไม่ให้ข้อต่อหมุนเกินขีดจำกัด
settings-general-fk_settings-enforce_joint_constraints-correct_constraints = แก้ไขด้วยข้อจำกัด
settings-general-fk_settings-enforce_joint_constraints-correct_constraints-description = แก้การหมุนของข้อต่อเมื่อหมุนเกินขีดจำกัด
settings-general-fk_settings-arm_fk = การจับตำแหน่งแขน
settings-general-fk_settings-arm_fk-description = บังคับให้ใช้การจับตำแหน่งแขนจากแว่น VR แม้ว่าจะมีตำแหน่งแขนอยู่แล้ว
settings-general-fk_settings-arm_fk-force_arms = บังคับใช้ตำแหน่งแขนจากแว่น
settings-general-fk_settings-reset_settings = ตั้งค่าการรีเซ็ต
settings-general-fk_settings-reset_settings-reset_hmd_pitch-description = รีเซ็ตแกนตั้งของแว่น(HMD) เมื่อใช้การรีเซ็ตแทร็กเกอร์ทั้งหมด เหมาะกับผู้ที่ใส่แว่นบนหน้าผากสำหรับ Vtubing หรือ mocap ไม่ควรใช้สำหรับเล่น VR
settings-general-fk_settings-reset_settings-reset_hmd_pitch = รีเซ็ตแกนตั้งแว่น HMD
settings-general-fk_settings-arm_fk-reset_mode-description = เปลี่ยนท่าทางการไว้แขนในการรีเซ็ตตำแหน่งแทร็กเกอร์
settings-general-fk_settings-arm_fk-reset_mode-description = เปลี่ยนท่าทางการไว้แขนเมื่อทำการรีเซ็ตการติดตั้งแทร็กเกอร์
settings-general-fk_settings-arm_fk-back = หลัง
settings-general-fk_settings-arm_fk-back-description = เป็นท่าเริ่มต้น โดยแขนส่วนบนไปด้านหลัง และแขนส่วนล่างไปด้านหน้า
settings-general-fk_settings-arm_fk-tpose_up = ที-โพส (ขึ้น)
settings-general-fk_settings-arm_fk-tpose_up-description = ให้แขนอยู๋ข้างลำตัวเมื่อทำการรีเซ็ตทั้งหมด และอยู่ในมุม 90 องศา เมื่อทำการรีเซ็ตการติดตั้ง
settings-general-fk_settings-arm_fk-tpose_down = ที-โพส (ล่าง)
settings-general-fk_settings-arm_fk-tpose_down-description = ให้แขนอยู๋ในมุม 90 องศาข้างลำตัวเมื่อทำการรีเซ็ตทั้งหมด และอยู่แนบลำตัวเมื่อทำการรีเซ็ตการติดตั้ง
settings-general-fk_settings-arm_fk-forward = ไปข้างหน้า
settings-general-fk_settings-arm_fk-forward-description = ให้ยกแขนคุณ 90 องศาในด้านหน้า เหมาะสำหรับผู้ที่ Vtubing
settings-general-fk_settings-skeleton_settings-toggles = ตั้งค่าโครงกระดูก
settings-general-fk_settings-skeleton_settings-description = ตั้งค่าให้แสดงหรือไม่แสดงโครงกระดูก เราแนะนำเปิดไว้
settings-general-fk_settings-skeleton_settings-extended_spine_model = โมเดลกระดูกสันหลังขั้นสูง
@@ -645,7 +657,7 @@ settings-general-fk_settings-self_localization-description = โหมด Mocap
settings-general-gesture_control = ควบคุมผ่านท่าทาง
settings-general-gesture_control-subtitle = การรีเซ็ตตามการแตะ
settings-general-gesture_control-description = ใช้การแตะเพื่อรีเซ็ตแทร์กเกอร์โดย แทร็กเกอร์ที่อยู่บนสุดบนตัวจะใช้เพื่อรีเซ็ตแกนตั้ง แทร็กเกอร์ที่อยู่บนสุดของเท้าซ้ายจะใช้เพื่อรีเซ็ทแทร็กเกอร์ทั้งหมด และแทร็กเกอร์ที่อยู่บนสุดของขาขวาจะใช้เพื่อรีเซ็ตตำแหน่งแทร็กเกอร์ โดยการแตะจะต้องทำในระยะเวลา 0.3 วินาทีเพื่อให้โปรแกรมรับทราบ
settings-general-gesture_control-description = ใช้งานการแตะเพื่อรีเซ็ตแทร็กเกอร์ โดยให้แทร็กเกอร์ที่อยู่บนสุดบนตัวในการรีเซ็ตแกนหมุน แทร็กเกอร์ที่อยู่บนสุดของเท้าซ้ายจะใช้เพื่อรีเซ็ทแทร็กเกอร์ทั้งหมด และแทร็กเกอร์ที่อยู่บนสุดของขาขวาจะใช้เพื่อรีเซ็ตตำแหน่งแทร็กเกอร์ โดยการแตะจะต้องทำในระยะเวลา 0.3 วินาทีเพื่อให้โปรแกรมรับทราบ
# This is a unit: 3 taps, 2 taps, 1 tap
# $amount (Number) - Amount of taps (touches to the tracker's case)
settings-general-gesture_control-taps = แตะ{ $amount }ครั้ง
@@ -729,6 +741,9 @@ settings-interface-behavior-error_tracking-description_v2 =
เพื่อมอบประสบการณ์การใช้งานที่ดีที่สุด เรานั้นเก็บรายงานข้อผิดพลาดแบบไม่ระบุตัวตน เมตริกประสิทธิภาพ และข้อมูลระบบปฏิบัติการเพื่อให้เราตรวจพบข้อบกพร่องและปัญหาใน SlimeVR โดยข้อมูลเหล่านี้ถูกเก็บผ่าน Sentry.io
settings-interface-behavior-error_tracking-label = อนุญาติการส่งข้อมูลให้นักพัฒนา
settings-interface-behavior-bvh_directory = ตำแหน่งที่คุณจะบันทึกค่า BVH
settings-interface-behavior-bvh_directory-description = เลือกตำแหน่งที่คุณต้องการบันทึกค่า BVH แทนที่จะต้องกำหนดเองทุกครั้งเมื่อบันทึก
settings-interface-behavior-bvh_directory-label = เปิดโฟลเดอร์ไปยังไฟล์ BVH
## Serial settings
@@ -992,6 +1007,7 @@ onboarding-connect_tracker-next = ฉันเชื่อมต่อแทร
onboarding-calibration_tutorial = บทเรียนการปรับเทียบ IMU
onboarding-calibration_tutorial-subtitle = นี่จะเป็นการช่วยลดค่าดริฟท์ของแทร็กเกอร์
onboarding-calibration_tutorial-description-v1 = หลังจากเปิดแทร็กเกอร์ของคุณแล้ว วางมันลงบนพื้นที่เรียบสักครู่ แล้วให้แทร็กเกอร์ปรับเทียบตัวเอง การปรับเทียบสามารถทำได้ตลอดเวลาหลังจากเปิดแทร็กเกอร์ขึ้นมา — หน้านี้เป็นเพียงแค่ให้คำแนะนำเท่านั้น หากจะเริ่มต้น คลิกที่ปุ่ม "{ onboarding-calibration_tutorial-calibrate }" แล้ว <b>อย่าขยับแทร็กเกอร์ของคุณ!</b>
onboarding-calibration_tutorial-calibrate = ฉันได้วางแทร็กเกอร์ไว้บนโต๊ะแล้ว
onboarding-calibration_tutorial-status-waiting = เรารอคุณอยู่
onboarding-calibration_tutorial-status-calibrating = กำลังปรับเทียบ
@@ -1074,6 +1090,38 @@ onboarding-assign_trackers-warning-LEFT_LOWER_LEG =
[2] ข้อเท้าซ้าย ถูกกำหนดแล้ว แต่คุณต้องกำหนด ต้นขาซ้าย ด้วย
*[unknown] ข้อเท้าซ้าย ถูกกำหนดแล้ว แต่คุณต้องกำหนด ??? ???? ของร่างกายด้วย
}
# $unassigned (Number) - Bits are based on BodyAssignment.ASSIGNMENT_RULES order
onboarding-assign_trackers-warning-RIGHT_LOWER_LEG =
{ $unassigned ->
[0] ข้อเท้าขวา ถูกกำหนดแล้ว แต่คุณต้องกำหนด ต้นขาขวา และอย่างใดอย่างหนึ่งระหว่าง ส่วนอก สะโพก หรือ เอว ด้วย
[1] ข้อเท้าขวา ถูกกำหนดแล้ว แต่คุณต้องกำหนด อย่างใดอย่างหนึ่งระหว่าง ส่วนอก สะโพก หรือ เอว ด้วย
[2] ข้อเท้าขวา ถูกกำหนดแล้ว แต่คุณต้องกำหนด ต้นขาขวา ด้วย
*[unknown] ข้อเท้าขวา ถูกกำหนดแล้ว แต่คุณต้องกำหนด ??? ของร่างกายด้วย
}
# $unassigned (Number) - Bits are based on BodyAssignment.ASSIGNMENT_RULES order
onboarding-assign_trackers-warning-LEFT_UPPER_LEG =
{ $unassigned ->
[0] ต้นขาซ้าย ถูกกำหนดแล้ว แต่คุณต้องกำหนด อย่างใดอย่างหนึ่งระหว่าง ส่วนอก สะโพก หรือ เอว ด้วย
*[unknown] ต้าขาซ้าย ถูกกำหนดแล้ว แแต่คุณต้องกำหนด ??? ??? ของร่างกายด้วย
}
# $unassigned (Number) - Bits are based on BodyAssignment.ASSIGNMENT_RULES order
onboarding-assign_trackers-warning-RIGHT_UPPER_LEG =
{ $unassigned ->
[0] ต้นขาขวา ถูกกำหนดแล้ว แต่คุณต้องกำหนด อย่างใดอย่างหนึ่งระหว่าง ส่วนอก สะโพก หรือ เอว ด้วย
*[unknown] ต้าขาขวา ถูกกำหนดแล้ว แแต่คุณต้องกำหนด ??? ??? ของร่างกายด้วย
}
# $unassigned (Number) - Bits are based on BodyAssignment.ASSIGNMENT_RULES order
onboarding-assign_trackers-warning-HIP =
{ $unassigned ->
[0] สะโพก ถูกกำหนดแล้ว แต่คุณต้องกำหนด ส่วนอกด้วย
*[unknown] สะโพก ถูกกำหนดแล้ว แต่คุณต้องกำหนด ??? ??? ของร่างกาย ด้วย
}
# $unassigned (Number) - Bits are based on BodyAssignment.ASSIGNMENT_RULES order
onboarding-assign_trackers-warning-WAIST =
{ $unassigned ->
[0] เอว ถูกกำหนดแล้ว แต่คุณต้องกำหนด ส่วนอกด้วย
*[unknown] เอว ถูกกำหนดแล้ว แต่คุณต้องกำหนด ??? ??? ของร่างกาย ด้วย
}
## Tracker mounting method choose
@@ -1100,12 +1148,15 @@ onboarding-choose_mounting-manual_modal-cancel = ยกเลิก
onboarding-manual_mounting-back = กลับไปยังเข้าสู่ VR
onboarding-manual_mounting = ปรับเทียบตำแหน่งแบบกำหนดเอง
onboarding-manual_mounting-description = คลิกบนแทร็กเกอร์ทุกตัว และดูทิศทางของแทร็กเกอร์ที่ถูกติดตั้ง
onboarding-manual_mounting-auto_mounting = ปรับเทียบตำแหน่งแบบอัตโนมัติ
onboarding-manual_mounting-next = ขั้นตอนถัดไป
## Tracker automatic mounting setup
onboarding-automatic_mounting-back = กลับไปยังเข้าสู่ VR
onboarding-automatic_mounting-title = ปรับเทียบตำแหน่งแทร็กเกอร์
onboarding-automatic_mounting-description = เพื่อให้ SlimeVR ทำงานได้ เราจะต้องทำการตั้งค่าการติดตั้งของแทร็กเกอร์ของคุณให้ตรงกับการติดตั้งบนร่างกายจริง
onboarding-automatic_mounting-manual_mounting = ปรับเทียบตำแหน่งแบบกำหนดเอง
onboarding-automatic_mounting-next = ขั้นตอนถัดไป
onboarding-automatic_mounting-prev_step = ขั้นตอนก่อนหน้า
@@ -1113,6 +1164,7 @@ onboarding-automatic_mounting-done-title = ตำแหน่งแทร็ก
onboarding-automatic_mounting-done-description = ปรับเทียบตำแหน่งแทร็กเกอร์ของคุณสำเร็จแล้ว!
onboarding-automatic_mounting-done-restart = ลองอีกครั้ง
onboarding-automatic_mounting-mounting_reset-title = รีเซ็ตตำแหน่งแทร็กเกอร์
onboarding-automatic_mounting-mounting_reset-step-0 = 1. ก้มตัวลงอยู่ในท่าที่ "กำลังเล่นสกี" โดยให้ขางอ ลำตัวด้านบนเอียงไปด้านหน้า และงอแขนของคุณ
onboarding-automatic_mounting-mounting_reset-step-1 = 2. กดไปที่ปุ่ม "รีเซ็ตำตำแหน่งแทร็กเกอร์" แล้วรอประมาณ 3 วินาที ก่อนที่ตำแหน่งของแทร็กเกอร์จะถูกรีเซ็ต
onboarding-automatic_mounting-preparation-title = จัดเตรียมพร้อม
onboarding-automatic_mounting-preparation-v2-step-0 = 1. กดที่ปุ่ม "รีเซ็ตทั้งหมด"
@@ -1141,7 +1193,7 @@ onboarding-manual_proportions-estimated_height = ความสูงของ
onboarding-automatic_proportions-back = กลับไปยังการปรับสัดส่วนด้วยตัวเอง
onboarding-automatic_proportions-title = วัดสัดส่วนร่างกายของคุณ
onboarding-automatic_proportions-description = เพื่อให้ SlimeVR แทร็กเกอร์ทำงานได้ เราจะต้องรู้ความยาวของกระดูกของคุณ การ Calibration อย่างไวนี้จะวัดค่ามันให้คุณ
onboarding-automatic_proportions-description = เพื่อให้ SlimeVR แทร็กเกอร์ทำงานได้ เราจะต้องรู้ความยาวของกระดูกของคุณ การปรับเทียบอย่างไวนี้จะวัดค่ามันให้คุณ
onboarding-automatic_proportions-manual = ปรับสัดส่วนด้วยตัวเอง
onboarding-automatic_proportions-prev_step = ขั้นตอนก่อนหน้า
onboarding-automatic_proportions-put_trackers_on-title = ใส่แทร็กเกอร์ของคุณ
@@ -1150,10 +1202,10 @@ onboarding-automatic_proportions-put_trackers_on-next = ฉันใส่แท
onboarding-automatic_proportions-requirements-title = สิ่งที่ต้องการ
# Each line of text is a different list item
onboarding-automatic_proportions-requirements-descriptionv2 =
คุณมีแทร็คเกอร์ พอที่จะจับการเคลื่อนไหวเท้าของคุณ (โดยทั่วไป 5 ตัว)
คุณมีแทร็กเกอร์พอที่จะจับการเคลื่อนไหวเท้าของคุณ (โดยทั่วไป 5 ตัว)
คุณกำลังใส่แว่น และแทร็กเกอร์อยู่
แทร็กเกอร์ของคุณได้เชื่อมต่อเข้ากับ SlimeVR Server และทำงานเป็นปรกติ (เช่น ไม่มีการกระตุก หลุดการเชื่อมต่อ หรืออื่นๆ)
แว่นของคุณได้ส่งข้อมูลตำแหน่งของคุณเข้ากับ SlimeVR server (ปรกติแล้วหมายถึงว่า SlimeVR ทำงานอยู่ และเชื่อมต่อเข้ากับ SlimeVR ด้วย SlimeVR's SteamVR driver)
แว่นของคุณได้ส่งข้อมูลตำแหน่งของคุณเข้ากับ SlimeVR server (ปรกติแล้วหมายถึงว่า SlimeVR ทำงานอยู่ และเชื่อมต่อเข้ากับ SlimeVR ด้วย ไดร์เวอร์ของ SteamVR ผ่าน SlimeVR
แทร็กเกอร์ของคุณนั้นทำงานปรกติ และแสดงการเคลื่อนไหวของคุณถูกต้อง (ตัวอย่างเช่น คุณได้ทำการ Full reset และตัวแทร็กเกอร์ขยับไปในทิศทางที่ถูกเมื่อขยับตัว ก้มลง นั่งลง หรือขยับขา เป็นต้น)
onboarding-automatic_proportions-requirements-next = ฉันได้อ่านสิ่งที่ต้องการแล้ว
onboarding-automatic_proportions-check_height-title-v3 = วัดความสูงของแว่นของคุณ
@@ -1266,9 +1318,12 @@ onboarding-stay_aligned-relaxed_poses-sitting-title = ท่าผ่อนค
onboarding-stay_aligned-relaxed_poses-sitting-step-0 = 1. นั่งในท่าที่สบายๆ
onboarding-stay_aligned-relaxed_poses-sitting-step-1-v2 = 2. กดไปที่ "บันทึกท่าโพส"
onboarding-stay_aligned-relaxed_poses-flat-title = ท่าผ่อนคลายในขณะที่นั่งบนพื้น
onboarding-stay_aligned-relaxed_poses-flat-step-0 = 1. นั่งลงบนพื้นและยื่นขาไปทางด้านหน้า ไม่ต้องเกร็งนะ
onboarding-stay_aligned-relaxed_poses-flat-step-1-v2 = 2. กดไปที่ "บันทึกท่าโพส"
onboarding-stay_aligned-relaxed_poses-skip_step = ข้าม
onboarding-stay_aligned-done-title = เปิดใช้งาน Stay Aligned แล้ว!
onboarding-stay_aligned-done-description = การตั้งค่า Stay Aligned ของคุณสำเร็จแล้ว!
onboarding-stay_aligned-done-description-2 = การตั้งค่าเสร็จสิ้นแล้ว คุณสามารถจะเริ่มต้นการตั้งค่าใหม่หากคุณต้องการจะปรับค่าของท่าโพสคุณ
onboarding-stay_aligned-previous_step = ก่อนหน้า
onboarding-stay_aligned-next_step = ต่อไป
onboarding-stay_aligned-restart = เริ่มใหม่
@@ -1276,6 +1331,7 @@ onboarding-stay_aligned-done = เสร็จแล้ว
## Home
home-no_trackers = ไม่พบแทร็กเกอร์หรือยังไม่ได้ถูกกำหนด
## Trackers Still On notification
@@ -1284,10 +1340,19 @@ trackers_still_on-modal-description =
มีแทร็กเกอร์เปิดค้างไว้อยู่
คุณแน่ใจที่จะปิด SlimeVR?
trackers_still_on-modal-confirm = ออกจาก SlimeVR
trackers_still_on-modal-cancel = ใจเย็นๆก่อน....
## Status system
status_system-StatusTrackerReset = เราแนะนำให้คุณทำการรีเซ็ตทั้งหมดเพราะว่าแทร็กเกอร์หนึ่งตัวหรือมากกว่านั้นยังไม่ได้ถูกปรับ
status_system-StatusSteamVRDisconnected =
{ $type ->
[steamvr_feeder] ขณะนี้ยังไม่มีการเชื่อมต่อกับแอป SlimeVR Feeder
*[steamvr] ขณะนี้ยังไม่มีการเชื่อมต่อกับ SteamVR ผ่านไดรเวอร์ SlimeVR
}
status_system-StatusTrackerError = แทร็กเกอร์ { $trackerName } เกิดข้อผิดพลาด
status_system-StatusUnassignedHMD = แว่น VR ของคุณควรจะถูกกำหนดเป็นแทร็กเกอร์ส่วนหัว
status_system-StatusPublicNetwork = โปรไฟล์เครือข่ายของคุณตอนนี้ถูกตั้งค่าเป็นสาธารณะ ({ $adapters }) ซึ่งไม่แนะนำสำหรับการทำงานของ SlimeVR <PublicFixLink>ดูวิธีการแก้ไขให้เหมาะสมที่นี่</PublicFixLink>
## Firmware tool globals
@@ -1299,7 +1364,16 @@ firmware_tool-loading = กำลังโหลด...
## Firmware tool Steps
firmware_tool = เครื่องมือเฟิร์มแวร์ DIY
firmware_tool-description = ให้คุณตั้งค่าและแฟลชเฟิร์มแวร์แทร็กเกอร์ DIY ของคุณ
firmware_tool-not_available = ไอ่หย๊า เครื่องมือเฟิร์มแวร์ยังไม่พร้อมใช้งานในขณะนี้ โปรดกลับมาใหม่ทีหลัง!
firmware_tool-not_compatible = Firmware นี้เข้ากันไม่ได้กับเซิร์ฟเวอร์เวอร์ชั่นนี้ โปรดอัปเดตเซิร์ฟเวอร์ของคุณ!
firmware_tool-board_step = เลือกบอร์ดของคุณ
firmware_tool-board_step-description = เลือกบอร์ดหนึ่งตัวที่แสดงอยู่ด้านล่าง
firmware_tool-board_pins_step = ตรวจสอบ Pin ของคุณ
firmware_tool-board_pins_step-description =
โปรดตรวจสอบว่า Pin ที่คุณเลือกนั้นถูกต้อง
ค่าเริ่มต้นมักจะถูกแล้วหากคุณทำตามเอกสารประกอบของ SlimeVR
firmware_tool-board_pins_step-enable_led = เปิดใช้งาน LED
firmware_tool-board_pins_step-led_pin =
.label = พิน LED
@@ -1315,6 +1389,16 @@ firmware_tool-board_pins_step-battery_sensor_pin =
firmware_tool-board_pins_step-battery_resistor =
.label = ตัวต้านทานของแบตเตอรี่ (โอห์ม)
.placeholder = ใส่ค่าต้านทานของตัวต้านทานแบตเตอรี่
firmware_tool-board_pins_step-battery_shield_resistor-0 =
.label = ค่าความต้านทาน R1 ของ Battery Shield (โอห์ม)
.placeholder = กรุณากรอกค่าความต้านทาน R1 ของ Battery Shield
firmware_tool-board_pins_step-battery_shield_resistor-1 =
.label = ค่าความต้านทาน R1 ของ Battery Shield (โอห์ม)
.placeholder = กรุณากรอกค่าความต้านทาน R1 ของ Battery Shield
firmware_tool-add_imus_step = เลือก IMU ที่คุณใช้
firmware_tool-add_imus_step-description =
กรุณาใส่ชนิดและจำนวนของ IMU ที่แทร็กเกอร์ของคุณใช้
ค่าเริ่มต้นมักจะถูกแล้วหากคุณทำตามเอกสารประกอบของ SlimeVR
firmware_tool-add_imus_step-imu_type-label = ประเภท IMU
firmware_tool-add_imus_step-imu_type-placeholder = เลือกประเภทของ IMU
firmware_tool-add_imus_step-imu_rotation =
@@ -1458,14 +1542,25 @@ vrc_config-mute-btn = ปิดคำเตือน
vrc_config-unmute-btn = เลิกแจ้งเตือน
vrc_config-legacy_mode = การตั้งศูนย์แบบเก่า
vrc_config-disable_shoulder_tracking = ปิดใช้งานการจับตำแหน่งไหล
vrc_config-shoulder_width_compensation = การชดเชยความกว้างของไหล่
vrc_config-spine_mode = โหมดกระดูกสันหลัง FBT
vrc_config-tracker_model = โมเดลตัวติดตาม FBT
vrc_config-avatar_measurement_type = การวัดของอวาตาร์
vrc_config-calibration_range = ช่วงการตั้งศูนย์
vrc_config-calibration_visuals = แสดงภาพการตั้งศูนย์
vrc_config-user_height = ความสูงจริงของผู้ใช้
vrc_config-spine_mode-UNKNOWN = ไม่ทราบ
vrc_config-spine_mode-LOCK_BOTH = ล็อคทั้งคู่
vrc_config-spine_mode-LOCK_HEAD = ล็อคศีรษะ
vrc_config-spine_mode-LOCK_HIP = ล็อคสะโพก
vrc_config-tracker_model-UNKNOWN = ไม่ทราบ
vrc_config-tracker_model-AXIS = แกนหมุน
vrc_config-tracker_model-BOX = กล่อง
vrc_config-tracker_model-SPHERE = ทรงกลม
vrc_config-tracker_model-SYSTEM = ระบบ
vrc_config-avatar_measurement_type-UNKNOWN = ไม่ทราบ
vrc_config-avatar_measurement_type-HEIGHT = ความสูง:
vrc_config-avatar_measurement_type-ARM_SPAN = ช่วงแขน
## Error collection consent modal
+2 -2
View File
@@ -602,8 +602,8 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = 地板限制可
settings-general-fk_settings-leg_tweak-toe_snap-description = 脚趾着地可以在没有脚部追踪器的情况下尝试猜测脚部的俯仰。
settings-general-fk_settings-leg_tweak-foot_plant-description = 脚掌着地会在脚与地面接触时保持脚掌与地板平行。
settings-general-fk_settings-leg_fk = 腿部追踪
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = 开启脚部佩戴重置。(佩戴重置时需要踮起脚尖)
settings-general-fk_settings-leg_fk-reset_mounting_feet = 脚部佩戴重置
settings-general-fk_settings-leg_fk-reset_mounting_feet-description-v1 = 在进行普通佩戴重置时强制进行脚部佩戴重置。
settings-general-fk_settings-leg_fk-reset_mounting_feet-v1 = 强制脚部佩戴重置
settings-general-fk_settings-enforce_joint_constraints = 骨骼限制
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints = 强制约束
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints-description = 避免关节旋转超过人体骨骼角度限制
+12 -5
View File
@@ -239,6 +239,8 @@ reset-reset_all_warning_default-v2 =
確定要繼續嗎?
reset-full = 完整重置
reset-mounting = 配戴重置
reset-mounting-feet = 重置腳部配戴
reset-mounting-fingers = 重置手指配戴
reset-yaw = 左右偏擺重置
## Serial detection stuff
@@ -264,6 +266,7 @@ navbar-settings = 詳細設定
bvh-start_recording = 錄製 BVH 檔案
bvh-recording = 錄製中…
bvh-save_title = 儲存 BVH 紀錄
## Tracking pause
@@ -401,6 +404,7 @@ tracker-settings-forget-label = 忘記追蹤器
tracker-settings-update-unavailable = 無法更新 (DIY)
tracker-settings-update-low-battery = 無法更新,電池電量低於 50%
tracker-settings-update-up_to_date = 已為最新版本
tracker-settings-update-blocked = 無法更新,沒有其他可用版本。
tracker-settings-update-available = 版本 { $versionName } 可供更新
tracker-settings-update = 立即更新
tracker-settings-update-title = 韌體版本
@@ -604,8 +608,8 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = 地板限制功
settings-general-fk_settings-leg_tweak-toe_snap-description = 腳趾跟地功能在沒有腳部的追蹤器時,會嘗試猜測腳掌的旋轉角度。
settings-general-fk_settings-leg_tweak-foot_plant-description = 腳底貼地功能會在腳底與地面接觸時,將腳部旋轉成與地板平行。
settings-general-fk_settings-leg_fk = 腿部追蹤
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = 開啟腳部配戴重置,進行配戴重置時需要踮起腳尖。
settings-general-fk_settings-leg_fk-reset_mounting_feet = 腳部配戴重置
settings-general-fk_settings-leg_fk-reset_mounting_feet-description-v1 = 使用普通的重置配戴時,一併重置腳部配戴。
settings-general-fk_settings-leg_fk-reset_mounting_feet-v1 = 強制重置腳部配戴
settings-general-fk_settings-enforce_joint_constraints = 骨架限制
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints = 約束關節旋轉
settings-general-fk_settings-enforce_joint_constraints-enforce_constraints-description = 避免關節旋轉超出極限
@@ -734,6 +738,9 @@ settings-interface-behavior-error_tracking-description_v2 =
為了提供最佳的使用者體驗,我們會蒐集匿名化的錯誤報告、性能指標和作業系統資訊,這會對我們檢測 SlimeVR 的錯誤和問題有所幫助。我們會透過 Sentry.io 來蒐集這些指標。
settings-interface-behavior-error_tracking-label = 向開發者傳送錯誤資訊
settings-interface-behavior-bvh_directory = BVH 紀錄儲存目錄
settings-interface-behavior-bvh_directory-description = 選擇儲存 BVH 紀錄文件的目錄,如此每次錄製 BVH 時不需要選擇儲存位置。
settings-interface-behavior-bvh_directory-label = 存放 BVH 紀錄的目錄
## Serial settings
@@ -879,8 +886,8 @@ settings-utils-advanced-reset_warning-cancel = 取消
settings-utils-advanced-open_data-v1 = 設定資料夾
settings-utils-advanced-open_data-description-v1 = 在檔案管理器中開啟 SlimeVR 的設定資料夾,該資料夾包含程式的設定。
settings-utils-advanced-open_data-label = 打開資料夾
settings-utils-advanced-open_logs = 記錄檔資料夾
settings-utils-advanced-open_logs-description = 在檔案管理器中開啟 SlimeVR 的記錄檔資料夾,該資料夾包含程式的記錄檔。
settings-utils-advanced-open_logs = 紀錄檔資料夾
settings-utils-advanced-open_logs-description = 在檔案管理器中開啟 SlimeVR 的紀錄檔資料夾,該資料夾包含程式的紀錄檔。
settings-utils-advanced-open_logs-label = 打開資料夾
## Setup/onboarding menu
@@ -1000,7 +1007,7 @@ onboarding-connect_tracker-next = 所有的追蹤器都連接好了
onboarding-calibration_tutorial = IMU 校正教學
onboarding-calibration_tutorial-subtitle = 進行這項操作可以有效減少追蹤器發生飄移的機會
onboarding-calibration_tutorial-description = 每次在打開追蹤器的開關時,需要將追蹤器平置一下來進行自動校正。你也可以透過按下「{ onboarding-calibration_tutorial-calibrate }」按鈕來進行手動校正,<b>校正過程中請勿移動追蹤器</b>。
onboarding-calibration_tutorial-description-v1 = 開啟追蹤器開關後,將其放置在穩定的平面上一段時間以便進行校正。本頁僅提供操作教學——追蹤器電源開啟後即可隨時進行校正,無須回到本頁進行。首先請點選「{ onboarding-calibration_tutorial-calibrate }」按鈕,然後<b>不要移動追蹤器!</b>
onboarding-calibration_tutorial-calibrate = 追蹤器已經放置在桌上了
onboarding-calibration_tutorial-status-waiting = 正在等待你完成動作
onboarding-calibration_tutorial-status-calibrating = 校正中
+42 -17
View File
@@ -5,11 +5,6 @@ import {
Route,
Routes,
} from 'react-router-dom';
import { Event, listen } from '@tauri-apps/api/event';
import * as os from '@tauri-apps/plugin-os';
import { open } from '@tauri-apps/plugin-shell';
import semver from 'semver';
import { withSentryReactRouterV6Routing } from '@sentry/react';
import { Home } from './components/home/Home';
import { MainLayout } from './components/MainLayout';
import { AppContextProvider } from './components/providers/AppContext';
@@ -21,6 +16,7 @@ import {
WebSocketApiContext,
} from './hooks/websocket-api';
import { Event, listen } from '@tauri-apps/api/event';
import { OnboardingContextProvider } from './components/onboarding/OnboardingContextProvicer';
import { OnboardingLayout } from './components/onboarding/OnboardingLayout';
import { AutomaticProportionsPage } from './components/onboarding/pages/body-proportions/AutomaticProportions';
@@ -40,12 +36,15 @@ import { VRCOSCSettings } from './components/settings/pages/VRCOSCSettings';
import { TopBar } from './components/TopBar';
import { TrackerSettingsPage } from './components/tracker/TrackerSettings';
import { OSCRouterSettings } from './components/settings/pages/OSCRouterSettings';
import * as os from '@tauri-apps/plugin-os';
import { VMCSettings } from './components/settings/pages/VMCSettings';
import { MountingChoose } from './components/onboarding/pages/mounting/MountingChoose';
import { StatusProvider } from './components/providers/StatusSystemContext';
import { VersionUpdateModal } from './components/VersionUpdateModal';
import { CalibrationTutorialPage } from './components/onboarding/pages/CalibrationTutorial';
import { AssignmentTutorialPage } from './components/onboarding/pages/assignment-preparation/AssignmentTutorial';
import { open } from '@tauri-apps/plugin-shell';
import semver from 'semver';
import { useBreakpoint, useIsTauri } from './hooks/breakpoint';
import { VRModePage } from './components/vr-mode/VRModePage';
import { InterfaceSettings } from './components/settings/pages/InterfaceSettings';
@@ -55,12 +54,23 @@ import { AppLayout } from './AppLayout';
import { Preload } from './components/Preload';
import { UnknownDeviceModal } from './components/UnknownDeviceModal';
import { useDiscordPresence } from './hooks/discord-presence';
import { withSentryReactRouterV6Routing } from '@sentry/react';
import { ScaledProportionsPage } from './components/onboarding/pages/body-proportions/ScaledProportions';
import { AdvancedSettings } from './components/settings/pages/AdvancedSettings';
import { FirmwareUpdate } from './components/firmware-update/FirmwareUpdate';
import { ConnectionLost } from './components/onboarding/pages/ConnectionLost';
import { VRCWarningsPage } from './components/vrc/VRCWarningsPage';
import { StayAlignedSetup } from './components/onboarding/pages/stay-aligned/StayAlignedSetup';
import {
Chart as ChartJS,
Title,
Tooltip,
Legend,
CategoryScale,
LinearScale,
PointElement,
LineElement,
} from 'chart.js';
export const GH_REPO = 'SlimeVR/SlimeVR-Server';
export const VersionContext = createContext('');
@@ -73,11 +83,21 @@ function Layout() {
const { isMobile } = useBreakpoint('mobile');
useDiscordPresence();
ChartJS.register(
Title,
Tooltip,
Legend,
CategoryScale,
LinearScale,
PointElement,
LineElement
);
return (
<>
<SerialDetectionModal />
<VersionUpdateModal />
<UnknownDeviceModal />
<SerialDetectionModal></SerialDetectionModal>
<VersionUpdateModal></VersionUpdateModal>
<UnknownDeviceModal></UnknownDeviceModal>
<SentryRoutes>
<Route element={<AppLayout />}>
<Route
@@ -158,7 +178,7 @@ function Layout() {
/>
<Route path="trackers-assign" element={<TrackersAssignPage />} />
<Route path="enter-vr" element={<EnterVRPage />} />
<Route path="mounting/choose" element={<MountingChoose />} />
<Route path="mounting/choose" element={<MountingChoose />}></Route>
<Route path="mounting/auto" element={<AutomaticMountingPage />} />
<Route path="mounting/manual" element={<ManualMountingPage />} />
<Route path="reset-tutorial" element={<ResetTutorialPage />} />
@@ -177,7 +197,7 @@ function Layout() {
<Route path="stay-aligned" element={<StayAlignedSetup />} />
<Route path="done" element={<DonePage />} />
</Route>
<Route path="*" element={<TopBar />} />
<Route path="*" element={<TopBar></TopBar>}></Route>
</Route>
</SentryRoutes>
</>
@@ -190,7 +210,7 @@ export default function App() {
const isTauri = useIsTauri();
useEffect(() => {
const onKeydown = (event: KeyboardEvent) => {
const onKeydown: (arg0: KeyboardEvent) => void = function (event) {
// prevent search bar keybind
if (
event.key === 'F3' ||
@@ -206,6 +226,11 @@ export default function App() {
}, []);
useEffect(() => {
// don't show update stuff when on android
if (window.__ANDROID__?.isThere()) {
setUpdateFound('');
return;
}
async function fetchReleases() {
const releases = await fetch(
`https://api.github.com/repos/${GH_REPO}/releases`
@@ -239,11 +264,10 @@ export default function App() {
'server-status',
(event: Event<[string, string]>) => {
const [eventType, s] = event.payload;
if (eventType === 'stderr') {
if ('stderr' === eventType) {
// This strange invocation is what lets us lose the line information in the console
// See more here: https://stackoverflow.com/a/48994308
// These two are fine to keep with console.log, they are server logs
/* eslint-disable no-console */
setTimeout(
console.log.bind(
console,
@@ -261,7 +285,6 @@ export default function App() {
'color:green'
)
);
/* eslint-enable no-console */
} else if (eventType === 'error') {
error('Error: %s', s);
} else if (eventType === 'terminated') {
@@ -280,7 +303,7 @@ export default function App() {
useEffect(() => {
function onKeyboard(ev: KeyboardEvent) {
if (ev.key === 'F1') {
open(DOCS_SITE).catch(() => window.open(DOCS_SITE, '_blank'));
return open(DOCS_SITE).catch(() => window.open(DOCS_SITE, '_blank'));
}
}
@@ -298,8 +321,10 @@ export default function App() {
<VersionContext.Provider value={updateFound}>
<div className="h-full w-full text-standard bg-background-80 text-background-10">
<Preload />
{!websocketAPI.isConnected && <ConnectionLost />}
{websocketAPI.isConnected && <Layout />}
{!websocketAPI.isConnected && (
<ConnectionLost></ConnectionLost>
)}
{websocketAPI.isConnected && <Layout></Layout>}
</div>
</VersionContext.Provider>
</StatusProvider>
+6 -2
View File
@@ -1,6 +1,6 @@
import { useLayoutEffect } from 'react';
import { Outlet, useNavigate } from 'react-router-dom';
import { useConfig } from './hooks/config';
import { Outlet, useNavigate } from 'react-router-dom';
export function AppLayout() {
const { config } = useConfig();
@@ -33,5 +33,9 @@ export function AppLayout() {
}
}, [config?.doneOnboarding]);
return <Outlet />;
return (
<>
<Outlet />
</>
);
}
+5 -7
View File
@@ -6,16 +6,14 @@ 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,
}: React.HTMLAttributes<HTMLButtonElement>) {
export function BVHButton(props: React.HTMLAttributes<HTMLButtonElement>) {
const { config } = useConfig();
const { useRPCPacket, sendRPCPacket } = useWebsocketAPI();
const [recording, setRecording] = useState(false);
@@ -62,11 +60,11 @@ export function BVHButton({
onClick={toggleBVH}
disabled={saving}
className={classNames(
className,
props.className,
'border',
recording ? 'border-status-critical' : 'border-transparent'
)}
/>
></BigButton>
</Localized>
);
}
+4 -4
View File
@@ -1,15 +1,15 @@
import { Localized } from '@fluent/react';
import { ClearMountingResetRequestT, RpcMessage } from 'solarxr-protocol';
import { useWebsocketAPI } from '@/hooks/websocket-api';
import { BigButton } from './commons/BigButton';
import { TrashIcon } from './commons/icon/TrashIcon';
import { Quaternion } from 'three';
import { QuaternionFromQuatT, similarQuaternions } from '@/maths/quaternion';
import { useMemo } from 'react';
import { useAtomValue } from 'jotai';
import { assignedTrackersAtom } from '@/store/app-store';
import { TrashIcon } from './commons/icon/TrashIcon';
import { BigButton } from './commons/BigButton';
const QUAT = new Quaternion();
const _q = new Quaternion();
export function ClearMountingButton() {
const { sendRPCPacket } = useWebsocketAPI();
@@ -21,7 +21,7 @@ export function ClearMountingButton() {
(d) =>
!similarQuaternions(
QuaternionFromQuatT(d?.tracker.info?.mountingResetOrientation),
QUAT
_q
)
),
[assignedTrackers]
+1 -1
View File
@@ -6,7 +6,7 @@ export function EmptyLayout({ children }: { children: ReactNode }) {
return (
<div className="empty-layout h-full">
<div style={{ gridArea: 't' }}>
<TopBar />
<TopBar></TopBar>
</div>
<div style={{ gridArea: 'c' }} className="mt-2 relative">
{children}
+26 -21
View File
@@ -26,29 +26,34 @@ export function ErrorConsentModal({
return (
<BaseModal isOpen={isOpen} onRequestClose={cancel} closeable={false}>
<div className="flex flex-col gap-3">
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
<div className="flex flex-col items-center gap-2 max-w-[512px]">
<Typography variant="main-title">
{l10n.getString('error_collection_modal-title')}
</Typography>
<Localized
id={'error_collection_modal-description_v2'}
elems={{
b: <b />,
h1: <span className="text-lg font-bold" />,
}}
>
<Typography variant="standard" whitespace="whitespace-pre-line" />
</Localized>
<>
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
<div className="flex flex-col items-center gap-2 max-w-[512px]">
<Typography variant="main-title">
{l10n.getString('error_collection_modal-title')}
</Typography>
<Localized
id={'error_collection_modal-description_v2'}
elems={{
b: <b></b>,
h1: <span className="text-lg font-bold"></span>,
}}
>
<Typography
variant="standard"
whitespace="whitespace-pre-line"
/>
</Localized>
</div>
</div>
</div>
<Button variant="primary" onClick={accept}>
{l10n.getString('error_collection_modal-confirm')}
</Button>
<Button variant="tertiary" onClick={cancel}>
{l10n.getString('error_collection_modal-cancel')}
</Button>
<Button variant="primary" onClick={accept}>
{l10n.getString('error_collection_modal-confirm')}
</Button>
<Button variant="tertiary" onClick={cancel}>
{l10n.getString('error_collection_modal-cancel')}
</Button>
</>
</div>
</BaseModal>
);
+1 -3
View File
@@ -9,9 +9,7 @@
grid-template:
't t t' var(--topbar-h)
's c w' calc(100% - var(--topbar-h))
/ var(--navbar-w) calc(100% - var(--navbar-w) - var(--widget-w)) var(
--widget-w
);
/ var(--navbar-w) calc(100% - var(--navbar-w) - var(--widget-w)) var(--widget-w);
}
@screen mobile {
+7 -9
View File
@@ -6,9 +6,9 @@ import {
RpcMessage,
SettingsRequestT,
} from 'solarxr-protocol';
import { useWebsocketAPI } from '@/hooks/websocket-api';
import { Navbar } from './Navbar';
import { TopBar } from './TopBar';
import { useWebsocketAPI } from '@/hooks/websocket-api';
import { WidgetsComponent } from './WidgetsComponent';
import './MainLayout.scss';
@@ -33,11 +33,11 @@ export function MainLayout({
function usePageChanged(callback: () => void) {
useEffect(() => {
callback();
}, [window.location.pathname]);
}, [location.pathname]);
}
usePageChanged(() => {
if (window.location.pathname.includes('body-proportions')) {
if (location.pathname.includes('body-proportions')) {
const tempSettings = new LegTweaksTmpChangeT();
tempSettings.skatingCorrection = false;
tempSettings.floorClip = false;
@@ -54,19 +54,17 @@ export function MainLayout({
sendRPCPacket(RpcMessage.LegTweaksTmpClear, resetSettings);
}
setProportionsLastPageOpen(
window.location.pathname.includes('body-proportions')
);
setProportionsLastPageOpen(location.pathname.includes('body-proportions'));
});
return (
<div className="">
<div className="main-layout w-full h-screen">
<div style={{ gridArea: 't' }}>
<TopBar />
<TopBar></TopBar>
</div>
<div style={{ gridArea: 's' }} className="overflow-y-auto">
<Navbar />
<Navbar></Navbar>
</div>
<div
style={{ gridArea: 'c' }}
@@ -83,7 +81,7 @@ export function MainLayout({
style={{ gridArea: 'w' }}
className="overflow-y-auto mr-2 my-2 rounded-xl bg-background-70 flex flex-col gap-2 p-2 widgets"
>
<WidgetsComponent />
<WidgetsComponent></WidgetsComponent>
</div>
)}
</div>
+10 -10
View File
@@ -2,14 +2,14 @@ import { useLocalization } from '@fluent/react';
import classnames from 'classnames';
import { ReactNode } from 'react';
import { NavLink, useMatch } from 'react-router-dom';
import { useBreakpoint } from '@/hooks/breakpoint';
import { useConfig } from '@/hooks/config';
import { CubeIcon } from './commons/icon/CubeIcon';
import { GearIcon } from './commons/icon/GearIcon';
import { HumanIcon } from './commons/icon/HumanIcon';
import { RulerIcon } from './commons/icon/RulerIcon';
import { SparkleIcon } from './commons/icon/SparkleIcon';
import { WrenchIcon } from './commons/icon/WrenchIcons';
import { useBreakpoint } from '@/hooks/breakpoint';
import { useConfig } from '@/hooks/config';
export function NavButton({
to,
@@ -70,13 +70,13 @@ export function MainLinks() {
return (
<>
<NavButton to="/" icon={<CubeIcon />}>
<NavButton to="/" icon={<CubeIcon></CubeIcon>}>
{l10n.getString('navbar-home')}
</NavButton>
<NavButton
to="/onboarding/trackers-assign"
state={{ alonePage: true }}
icon={<HumanIcon />}
icon={<HumanIcon></HumanIcon>}
>
{l10n.getString('navbar-trackers_assign')}
</NavButton>
@@ -84,7 +84,7 @@ export function MainLinks() {
to="/onboarding/mounting/choose"
match="/onboarding/mounting/*"
state={{ alonePage: true }}
icon={<WrenchIcon />}
icon={<WrenchIcon></WrenchIcon>}
>
{l10n.getString('navbar-mounting')}
</NavButton>
@@ -92,12 +92,12 @@ export function MainLinks() {
to="/onboarding/body-proportions/scaled"
match="/onboarding/body-proportions/*"
state={{ alonePage: true }}
icon={<RulerIcon />}
icon={<RulerIcon></RulerIcon>}
>
{l10n.getString('navbar-body_proportions')}
</NavButton>
{config?.showNavbarOnboarding && (
<NavButton to="/onboarding/home" icon={<SparkleIcon />}>
<NavButton to="/onboarding/home" icon={<SparkleIcon></SparkleIcon>}>
{l10n.getString('navbar-onboarding')}
</NavButton>
)}
@@ -111,18 +111,18 @@ export function Navbar() {
return isMobile ? (
<div className="flex flex-row justify-around px-2 pt-2 bg-background-80 gap-2">
<MainLinks />
<MainLinks></MainLinks>
</div>
) : (
<div className="flex flex-col h-full p-2 gap-2">
<div className="flex flex-col flex-grow gap-2">
<MainLinks />
<MainLinks></MainLinks>
</div>
<NavButton
to="/settings/trackers"
match="/settings/*"
state={{ scrollTo: 'steamvr' }}
icon={<GearIcon />}
icon={<GearIcon></GearIcon>}
>
{l10n.getString('navbar-settings')}
</NavButton>
-1
View File
@@ -1,5 +1,4 @@
import { Helmet } from 'react-helmet';
export function Preload() {
return (
<Helmet>
+2 -2
View File
@@ -69,7 +69,7 @@ export function SerialDetectionModal() {
{!showWifiForm && (
<>
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
<USBIcon />
<USBIcon></USBIcon>
<div className="flex flex-col items-center gap-2">
<Typography variant="main-title">
{l10n.getString('serial_detection-new_device-p0')}
@@ -101,7 +101,7 @@ export function SerialDetectionModal() {
>
<div className="flex flex-col items-center gap-3">
<div className="fill-background-10">
<BulbIcon />
<BulbIcon></BulbIcon>
</div>
<Typography variant="main-title">
{l10n.getString('serial_detection-new_device-p0')}
+37 -31
View File
@@ -7,16 +7,28 @@ import {
TrackerStatus,
} from 'solarxr-protocol';
import { useWebsocketAPI } from '@/hooks/websocket-api';
import { CloseIcon } from './commons/icon/CloseIcon';
import { MaximiseIcon } from './commons/icon/MaximiseIcon';
import { MinimiseIcon } from './commons/icon/MinimiseIcon';
import { SlimeVRIcon } from './commons/icon/SimevrIcon';
import { ProgressBar } from './commons/ProgressBar';
import { Typography } from './commons/Typography';
import { DownloadIcon } from './commons/icon/DownloadIcon';
import { open } from '@tauri-apps/plugin-shell';
import { DOCS_SITE, GH_REPO, VersionContext } from '@/App';
import classNames from 'classnames';
import { QuestionIcon } from './commons/icon/QuestionIcon';
import { useBreakpoint, useIsTauri } from '@/hooks/breakpoint';
import { GearIcon } from './commons/icon/GearIcon';
import { invoke } from '@tauri-apps/api/core';
import { TrackersStillOnModal } from './TrackersStillOnModal';
import { useConfig } from '@/hooks/config';
import { listen, TauriEvent } from '@tauri-apps/api/event';
import { TrayOrExitModal } from './TrayOrExitModal';
import { error } from '@/utils/logging';
import { useDoubleTap } from 'use-double-tap';
import { isTrayAvailable } from '@/utils/tauri';
import { ErrorConsentModal } from './ErrorConsentModal';
import {
CloseRequestedEvent,
getCurrentWindow,
@@ -24,18 +36,6 @@ import {
} from '@tauri-apps/api/window';
import { useAtomValue } from 'jotai';
import { connectedIMUTrackersAtom } from '@/store/app-store';
import { ErrorConsentModal } from './ErrorConsentModal';
import { TrayOrExitModal } from './TrayOrExitModal';
import { TrackersStillOnModal } from './TrackersStillOnModal';
import { GearIcon } from './commons/icon/GearIcon';
import { QuestionIcon } from './commons/icon/QuestionIcon';
import { DownloadIcon } from './commons/icon/DownloadIcon';
import { Typography } from './commons/Typography';
import { ProgressBar } from './commons/ProgressBar';
import { SlimeVRIcon } from './commons/icon/SimevrIcon';
import { MinimiseIcon } from './commons/icon/MinimiseIcon';
import { MaximiseIcon } from './commons/icon/MaximiseIcon';
import { CloseIcon } from './commons/icon/CloseIcon';
export function VersionTag() {
return (
@@ -155,7 +155,7 @@ export function TopBar({
return (
<>
<div className="flex gap-0 flex-col">
<div className="h-[3px]" />
<div className="h-[3px]"></div>
<div data-tauri-drag-region className="flex gap-2 h-[38px] z-50">
<div
className="flex px-2 py-2 justify-around z-50"
@@ -168,7 +168,7 @@ export function TopBar({
className="flex justify-around flex-col select-all"
data-tauri-drag-region
>
<SlimeVRIcon />
<SlimeVRIcon></SlimeVRIcon>
</NavLink>
)}
{(isTauri || !isMobile) && !config?.decorations && (
@@ -181,7 +181,7 @@ export function TopBar({
)}
{(!(isMobile && !config?.decorations) || showVersionMobile) && (
<>
<VersionTag />
<VersionTag></VersionTag>
{doesMatchSettings && (
<div
className={classNames(
@@ -206,7 +206,7 @@ export function TopBar({
open(url).catch(() => window.open(url, '_blank'));
}}
>
<DownloadIcon />
<DownloadIcon></DownloadIcon>
</div>
)}
</div>
@@ -216,14 +216,20 @@ export function TopBar({
data-tauri-drag-region
>
{!isMobile && (
<div
className="flex max-w-xl h-full items-center w-full"
data-tauri-drag-region
>
{progress !== undefined && (
<ProgressBar progress={progress} height={3} parts={3} />
)}
</div>
<>
<div
className="flex max-w-xl h-full items-center w-full"
data-tauri-drag-region
>
{progress !== undefined && (
<ProgressBar
progress={progress}
height={3}
parts={3}
></ProgressBar>
)}
</div>
</>
)}
{!isTauri && !showVersionMobile && !config?.decorations && (
@@ -250,7 +256,7 @@ export function TopBar({
data-tauri-drag-region
state={{ scrollTo: 'steamvr' }}
>
<GearIcon />
<GearIcon></GearIcon>
</NavLink>
{!isMobile && (
@@ -263,7 +269,7 @@ export function TopBar({
open(DOCS_SITE).catch(() => window.open(DOCS_SITE, '_blank'))
}
>
<QuestionIcon />
<QuestionIcon></QuestionIcon>
</div>
)}
@@ -273,19 +279,19 @@ export function TopBar({
className="flex items-center justify-center hover:bg-background-60 rounded-full w-7 h-7"
onClick={() => getCurrentWindow().minimize()}
>
<MinimiseIcon />
<MinimiseIcon></MinimiseIcon>
</div>
<div
className="flex items-center justify-center hover:bg-background-60 rounded-full w-7 h-7"
onClick={() => getCurrentWindow().toggleMaximize()}
>
<MaximiseIcon />
<MaximiseIcon></MaximiseIcon>
</div>
<div
className="flex items-center justify-center hover:bg-background-60 rounded-full w-7 h-7"
onClick={() => tryCloseApp()}
>
<CloseIcon />
<CloseIcon></CloseIcon>
</div>
</>
)}
@@ -293,7 +299,7 @@ export function TopBar({
</div>
{isMobile && progress !== undefined && (
<div className="flex gap-2 px-2 h-6 mb-2 justify-center flex-col border-b border-accent-background-30">
<ProgressBar progress={progress} height={3} parts={3} />
<ProgressBar progress={progress} height={3} parts={3}></ProgressBar>
</div>
)}
</div>
@@ -327,7 +333,7 @@ export function TopBar({
setConnectedTrackerWarning(false);
getCurrentWindow().requestUserAttention(null);
}}
/>
></TrackersStillOnModal>
<ErrorConsentModal
isOpen={config?.errorTracking === null}
accept={() => setConfig({ errorTracking: true })}
+17 -15
View File
@@ -26,23 +26,25 @@ export function TrackersStillOnModal({
return (
<BaseModal isOpen={isOpen} onRequestClose={cancel} important>
<div className="flex flex-col gap-3">
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
<div className="flex flex-col items-center gap-2">
<Typography variant="main-title">
{l10n.getString('trackers_still_on-modal-title')}
</Typography>
<Typography variant="standard">
{l10n.getString('trackers_still_on-modal-description')}
</Typography>
<>
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
<div className="flex flex-col items-center gap-2">
<Typography variant="main-title">
{l10n.getString('trackers_still_on-modal-title')}
</Typography>
<Typography variant="standard">
{l10n.getString('trackers_still_on-modal-description')}
</Typography>
</div>
</div>
</div>
<Button variant="primary" onClick={accept}>
{l10n.getString('trackers_still_on-modal-confirm')}
</Button>
<Button variant="tertiary" onClick={cancel}>
{l10n.getString('trackers_still_on-modal-cancel')}
</Button>
<Button variant="primary" onClick={accept}>
{l10n.getString('trackers_still_on-modal-confirm')}
</Button>
<Button variant="tertiary" onClick={cancel}>
{l10n.getString('trackers_still_on-modal-cancel')}
</Button>
</>
</div>
</BaseModal>
);
+6 -6
View File
@@ -7,14 +7,14 @@ import {
TrackingPauseStateRequestT,
} from 'solarxr-protocol';
import { useWebsocketAPI } from '@/hooks/websocket-api';
import classNames from 'classnames';
import { BigButton } from './commons/BigButton';
import { PlayIcon } from './commons/icon/PlayIcon';
import { PauseIcon } from './commons/icon/PauseIcon';
import classNames from 'classnames';
export function TrackingPauseButton({
className,
}: React.HTMLAttributes<HTMLButtonElement>) {
export function TrackingPauseButton(
props: React.HTMLAttributes<HTMLButtonElement>
) {
const { useRPCPacket, sendRPCPacket } = useWebsocketAPI();
const [trackingPause, setTrackingPause] = useState(false);
@@ -44,8 +44,8 @@ export function TrackingPauseButton({
trackingPause ? <PlayIcon width={20} /> : <PauseIcon width={20} />
}
onClick={toggleTracking}
className={classNames(className, 'min-h-24')}
/>
className={classNames(props.className, 'min-h-24')}
></BigButton>
</Localized>
);
}
+3 -3
View File
@@ -1,8 +1,8 @@
import { useLocalization } from '@fluent/react';
import { useForm } from 'react-hook-form';
import { BaseModal } from './commons/BaseModal';
import { Button } from './commons/Button';
import { Typography } from './commons/Typography';
import { useForm } from 'react-hook-form';
import { Radio } from './commons/Radio';
interface TrayOrExitForm {
@@ -57,13 +57,13 @@ export function TrayOrExitModal({
name="exitType"
label={l10n.getString('tray_or_exit_modal-radio-exit')}
value="0"
/>
></Radio>
<Radio
control={control}
name="exitType"
label={l10n.getString('tray_or_exit_modal-radio-tray')}
value="1"
/>
></Radio>
</div>
<Button type="submit" variant="primary">
+5 -5
View File
@@ -1,4 +1,7 @@
import { useState } from 'react';
import { BaseModal } from './commons/BaseModal';
import { Typography } from './commons/Typography';
import { Button } from './commons/Button';
import { Localized, useLocalization } from '@fluent/react';
import { useWebsocketAPI } from '@/hooks/websocket-api';
import { useLocation } from 'react-router-dom';
@@ -10,9 +13,6 @@ import {
import { useDebouncedEffect } from '@/hooks/timeout';
import { useAtom } from 'jotai';
import { ignoredTrackersAtom } from '@/store/app-store';
import { Button } from './commons/Button';
import { Typography } from './commons/Typography';
import { BaseModal } from './commons/BaseModal';
export function UnknownDeviceModal() {
const { l10n } = useLocalization();
@@ -63,7 +63,7 @@ export function UnknownDeviceModal() {
</Typography>
<Localized
id="unknown_device-modal-description"
elems={{ b: <b /> }}
elems={{ b: <b></b> }}
vars={{ deviceId: currentTracker ?? 'ERROR' }}
>
<Typography
@@ -93,7 +93,7 @@ export function UnknownDeviceModal() {
variant="tertiary"
onClick={() => {
setIgnoredTracker((state) => {
if (!currentTracker) throw Error('should have a tracker');
if (!currentTracker) throw 'should have a tracker';
state.add(currentTracker);
return state;
});
+31 -29
View File
@@ -1,12 +1,12 @@
import { useLocalization } from '@fluent/react';
import { useContext, useState } from 'react';
import { BaseModal } from './commons/BaseModal';
import { Button } from './commons/Button';
import { Typography } from './commons/Typography';
import { open } from '@tauri-apps/plugin-shell';
import semver from 'semver';
import { GH_REPO, VersionContext } from '@/App';
import { error } from '@/utils/logging';
import { Typography } from './commons/Typography';
import { Button } from './commons/Button';
import { BaseModal } from './commons/BaseModal';
export function VersionUpdateModal() {
const { l10n } = useLocalization();
@@ -34,34 +34,36 @@ export function VersionUpdateModal() {
onRequestClose={closeModal}
>
<div className="flex flex-col gap-3">
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
<div className="flex flex-col items-center gap-2">
<Typography variant="main-title">
{l10n.getString('version_update-title', {
version: newVersion,
})}
</Typography>
<Typography variant="standard">
{l10n.getString('version_update-description')}
</Typography>
<>
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
<div className="flex flex-col items-center gap-2">
<Typography variant="main-title">
{l10n.getString('version_update-title', {
version: newVersion,
})}
</Typography>
<Typography variant="standard">
{l10n.getString('version_update-description')}
</Typography>
</div>
</div>
</div>
<Button
variant="primary"
onClick={async () => {
const url = document.body.classList.contains('windows')
? 'https://slimevr.dev/download'
: `https://github.com/${GH_REPO}/releases/latest`;
await open(url).catch(() => window.open(url, '_blank'));
closeModal();
}}
>
{l10n.getString('version_update-update')}
</Button>
<Button variant="tertiary" onClick={closeModal}>
{l10n.getString('version_update-close')}
</Button>
<Button
variant="primary"
onClick={async () => {
const url = document.body.classList.contains('windows')
? 'https://slimevr.dev/download'
: `https://github.com/${GH_REPO}/releases/latest`;
await open(url).catch(() => window.open(url, '_blank'));
closeModal();
}}
>
{l10n.getString('version_update-update')}
</Button>
<Button variant="tertiary" onClick={closeModal}>
{l10n.getString('version_update-close')}
</Button>
</>
</div>
</BaseModal>
);
+18 -20
View File
@@ -1,18 +1,18 @@
import { Localized, useLocalization } from '@fluent/react';
import { useConfig } from '@/hooks/config';
import { ResetType, StatusData } from 'solarxr-protocol';
import { useMemo } from 'react';
import { parseStatusToLocale, useStatusContext } from '@/hooks/status-system';
import { useAtomValue } from 'jotai';
import { flatTrackersAtom } from '@/store/app-store';
import { BVHButton } from './BVHButton';
import { TrackingPauseButton } from './TrackingPauseButton';
import { ResetButton } from './home/ResetButton';
import { OverlayWidget } from './widgets/OverlayWidget';
import { TipBox } from './commons/TipBox';
import { DeveloperModeWidget } from './widgets/DeveloperModeWidget';
import { useConfig } from '@/hooks/config';
import { ResetType, StatusData } from 'solarxr-protocol';
import { useMemo } from 'react';
import { parseStatusToLocale, useStatusContext } from '@/hooks/status-system';
import { ClearMountingButton } from './ClearMountingButton';
import { ToggleableSkeletonVisualizerWidget } from './widgets/SkeletonVisualizerWidget';
import { useAtomValue } from 'jotai';
import { flatTrackersAtom } from '@/store/app-store';
import { A } from './commons/A';
function UnprioritizedStatuses() {
@@ -33,7 +33,7 @@ function UnprioritizedStatuses() {
key={status.id}
elems={{
PublicFixLink: (
<A href="https://docs.slimevr.dev/common-issues.html#network-profile-is-currently-set-to-public" />
<A href="https://docs.slimevr.dev/common-issues.html#network-profile-is-currently-set-to-public"></A>
),
}}
>
@@ -52,35 +52,33 @@ export function WidgetsComponent() {
return (
<>
<div className="grid grid-cols-2 gap-2 w-full [&>*:nth-child(odd):last-of-type]:col-span-full">
<ResetButton type={ResetType.Yaw} size="big" />
<ResetButton type={ResetType.Full} size="big" />
<ResetButton type={ResetType.Mounting} size="big" />
<ResetButton type={ResetType.Yaw} size="big"></ResetButton>
<ResetButton type={ResetType.Full} size="big"></ResetButton>
<ResetButton type={ResetType.Mounting} size="big"></ResetButton>
<ResetButton
type={ResetType.Mounting}
size="big"
bodyPartsToReset="feet"
/>
></ResetButton>
<ResetButton
type={ResetType.Mounting}
size="big"
bodyPartsToReset="fingers"
/>
<ClearMountingButton />
{(typeof __ANDROID__ === 'undefined' || !__ANDROID__?.isThere()) && (
<BVHButton />
)}
<TrackingPauseButton />
></ResetButton>
<ClearMountingButton></ClearMountingButton>
{!window.__ANDROID__?.isThere() && <BVHButton></BVHButton>}
<TrackingPauseButton></TrackingPauseButton>
</div>
<div className="w-full">
<OverlayWidget />
<OverlayWidget></OverlayWidget>
</div>
<div className="mb-2">
<ToggleableSkeletonVisualizerWidget height={400} />
</div>
<UnprioritizedStatuses />
<UnprioritizedStatuses></UnprioritizedStatuses>
{config?.debug && (
<div className="w-full">
<DeveloperModeWidget />
<DeveloperModeWidget></DeveloperModeWidget>
</div>
)}
</>
+1 -1
View File
@@ -4,7 +4,7 @@ import { ReactNode } from 'react';
export function A({ href, children }: { href?: string; children?: ReactNode }) {
return (
<a
href={'javascript:'}
href="javascript:void(0)"
onClick={() =>
href && open(href).catch(() => window.open(href, '_blank'))
}
+3 -3
View File
@@ -28,7 +28,7 @@ export function ArrowLink({
};
return classNames(
variantsMap[variant],
'flex gap-2 hover:fill-background-10 hover:text-background-10 fill-background-30 text-background-30'
'flex gap-2 hover:fill-background-10 fill-background-30 text-background-10'
);
}, [variant]);
@@ -36,13 +36,13 @@ export function ArrowLink({
<NavLink to={to} state={state} className={classes}>
{direction === 'left' && (
<div className="flex flex-col justify-center">
<ArrowLeftIcon />
<ArrowLeftIcon></ArrowLeftIcon>
</div>
)}
{children}
{direction === 'right' && (
<div className="flex flex-col justify-center">
<ArrowRightIcon />
<ArrowRightIcon></ArrowRightIcon>
</div>
)}
</NavLink>
+16 -13
View File
@@ -8,9 +8,9 @@ import {
useState,
} from 'react';
import { BodyPart, TrackerDataT } from 'solarxr-protocol';
import { uniqueNumberFromTracker, useTracker } from '@/hooks/tracker';
import { FlatDeviceTracker } from '@/store/app-store';
import { useTracker } from '@/hooks/tracker';
import { PersonFrontIcon } from './PersonFrontIcon';
import { FlatDeviceTracker } from '@/store/app-store';
interface SlotDot {
id: string;
@@ -45,7 +45,7 @@ function Tracker({
updateVelocity(velocity);
}, [velocity]);
return null;
return <></>;
}
function Dot({
@@ -94,11 +94,11 @@ function Dot({
height: dotSize,
outlineWidth: globalVelocity * 2 + 2,
}}
/>
{trackers?.map(({ tracker }) => (
></div>
{trackers?.map(({ tracker }, index) => (
<Tracker
tracker={tracker}
key={uniqueNumberFromTracker(tracker)}
key={index}
updateVelocity={(vel) => updateVelocity(vel)}
/>
))}
@@ -126,11 +126,14 @@ export function BodyDisplay({
const personRef = useRef<HTMLDivElement | null>(null);
const [slotsButtonsPos, setSlotsButtonPos] = useState<SlotDot[]>([]);
const getSlotsPos = () =>
(personRef.current && [
...(personRef.current.querySelectorAll('.body-part-circle') as any),
]) ||
[];
const getSlotsPos = () => {
return (
(personRef.current && [
...(personRef.current.querySelectorAll('.body-part-circle') as any),
]) ||
[]
);
};
const getOffset = (el: HTMLDivElement, offset = { left: 0, top: 0 }) => {
const rect = el.getBoundingClientRect();
@@ -163,7 +166,7 @@ export function BodyDisplay({
const trackerPartGrouped = useMemo(
() =>
trackers.reduce<Record<number, FlatDeviceTracker[]>>((curr, td) => {
trackers.reduce<{ [key: number]: FlatDeviceTracker[] }>((curr, td) => {
if (!td) return curr;
const key = td.tracker.info?.bodyPart || BodyPart.NONE;
@@ -184,7 +187,7 @@ export function BodyDisplay({
variant === 'tracker-select' && 'mx-10'
)}
>
<PersonFrontIcon width={width} />
<PersonFrontIcon width={width}></PersonFrontIcon>
{slotsButtonsPos.map((dotData) => (
<Dot
{...dotData}
+13 -10
View File
@@ -1,8 +1,8 @@
import classNames from 'classnames';
import { ReactNode, useEffect, useRef, useState } from 'react';
import { BodyPart } from 'solarxr-protocol';
import { useBreakpoint } from '@/hooks/breakpoint';
import { PersonFrontIcon } from './PersonFrontIcon';
import { useBreakpoint } from '@/hooks/breakpoint';
export function BodyInteractions({
leftControls,
@@ -52,11 +52,14 @@ export function BodyInteractions({
}[]
>([]);
const getSlotsPos = () =>
(personRef.current && [
...(personRef.current.querySelectorAll('.body-part-circle') as any),
]) ||
[];
const getSlotsPos = () => {
return (
(personRef.current && [
...(personRef.current.querySelectorAll('.body-part-circle') as any),
]) ||
[]
);
};
const getControlsPos = () => {
const pos = (container: HTMLDivElement) =>
@@ -195,7 +198,7 @@ export function BodyInteractions({
className="absolute w-full h-full top-0 z-10"
width="100%"
height="100%"
/>
></canvas>
<div className="flex">
<div ref={leftContainerRef} className="z-10">
{leftControls}
@@ -207,7 +210,7 @@ export function BodyInteractions({
variant === 'tracker-select' && 'mobile:mx-0 xs:mx-10'
)}
>
<PersonFrontIcon width={width} mirror={mirror} />
<PersonFrontIcon width={width} mirror={mirror}></PersonFrontIcon>
{slotsButtonsPos.map(
({ top, left, height, width, id, hidden, buttonOffset }) => (
<div
@@ -231,7 +234,7 @@ export function BodyInteractions({
height: dotsSize,
animationDuration: '1.5s',
}}
/>
></div>
)}
<div
className={classNames(
@@ -246,7 +249,7 @@ export function BodyInteractions({
width: dotsSize,
height: dotsSize,
}}
/>
></div>
</div>
</div>
)
+107 -55
View File
@@ -28,103 +28,155 @@ export const mapPart: Record<
currentLocales: string[];
}) => JSX.Element
> = {
[BodyPart.UPPER_CHEST]: ({ width }) => <UpperChestIcon width={width} />,
[BodyPart.CHEST]: ({ width }) => <ChestIcon width={width} />,
[BodyPart.HEAD]: ({ width }) => <HeadsetIcon width={width} />,
[BodyPart.HIP]: ({ width }) => <HipIcon width={width} />,
[BodyPart.LEFT_HIP]: ({ width }) => <HipIcon width={width} />, // Unused
[BodyPart.RIGHT_HIP]: ({ width }) => <HipIcon width={width} />, // Unused
[BodyPart.UPPER_CHEST]: ({ width }) => (
<UpperChestIcon width={width}></UpperChestIcon>
),
[BodyPart.CHEST]: ({ width }) => <ChestIcon width={width}></ChestIcon>,
[BodyPart.HEAD]: ({ width }) => <HeadsetIcon width={width}></HeadsetIcon>,
[BodyPart.HIP]: ({ width }) => <HipIcon width={width}></HipIcon>,
[BodyPart.LEFT_HIP]: ({ width }) => <HipIcon width={width}></HipIcon>, // Unused
[BodyPart.RIGHT_HIP]: ({ width }) => <HipIcon width={width}></HipIcon>, // Unused
[BodyPart.LEFT_FOOT]: ({ width, currentLocales }) =>
currentLocales.includes('en-x-owo') ? (
<PawIcon />
<PawIcon></PawIcon>
) : (
<FootIcon width={width} />
<FootIcon width={width}></FootIcon>
),
[BodyPart.LEFT_HAND]: ({ width }) => <ControllerIcon width={width} />,
[BodyPart.LEFT_LOWER_ARM]: ({ width }) => <LowerArmIcon width={width} />,
[BodyPart.LEFT_LOWER_LEG]: ({ width }) => <AnkleIcon width={width} />,
[BodyPart.LEFT_SHOULDER]: ({ width }) => <ShoulderIcon width={width} />,
[BodyPart.LEFT_UPPER_ARM]: ({ width }) => <UpperArmIcon width={width} />,
[BodyPart.LEFT_UPPER_LEG]: ({ width }) => <UpperLegIcon width={width} />,
[BodyPart.NECK]: ({ width }) => <NeckIcon width={width} />,
[BodyPart.NONE]: ({ width }) => <SlimeVRIcon width={width} />,
[BodyPart.LEFT_HAND]: ({ width }) => (
<ControllerIcon width={width}></ControllerIcon>
),
[BodyPart.LEFT_LOWER_ARM]: ({ width }) => (
<LowerArmIcon width={width}></LowerArmIcon>
),
[BodyPart.LEFT_LOWER_LEG]: ({ width }) => (
<AnkleIcon width={width}></AnkleIcon>
),
[BodyPart.LEFT_SHOULDER]: ({ width }) => (
<ShoulderIcon width={width}></ShoulderIcon>
),
[BodyPart.LEFT_UPPER_ARM]: ({ width }) => (
<UpperArmIcon width={width}></UpperArmIcon>
),
[BodyPart.LEFT_UPPER_LEG]: ({ width }) => (
<UpperLegIcon width={width}></UpperLegIcon>
),
[BodyPart.NECK]: ({ width }) => <NeckIcon width={width}></NeckIcon>,
[BodyPart.NONE]: ({ width }) => <SlimeVRIcon width={width}></SlimeVRIcon>,
[BodyPart.RIGHT_FOOT]: ({ width, currentLocales }) =>
currentLocales.includes('en-x-owo') ? (
<PawIcon />
<PawIcon></PawIcon>
) : (
<FootIcon width={width} flipped />
<FootIcon width={width} flipped></FootIcon>
),
[BodyPart.RIGHT_HAND]: ({ width }) => (
<ControllerIcon width={width} flipped />
<ControllerIcon width={width} flipped></ControllerIcon>
),
[BodyPart.RIGHT_LOWER_ARM]: ({ width }) => (
<LowerArmIcon width={width} flipped />
<LowerArmIcon width={width} flipped></LowerArmIcon>
),
[BodyPart.RIGHT_LOWER_LEG]: ({ width }) => (
<AnkleIcon width={width} flipped />
<AnkleIcon width={width} flipped></AnkleIcon>
),
[BodyPart.RIGHT_SHOULDER]: ({ width }) => (
<ShoulderIcon width={width}></ShoulderIcon>
),
[BodyPart.RIGHT_SHOULDER]: ({ width }) => <ShoulderIcon width={width} />,
[BodyPart.RIGHT_UPPER_ARM]: ({ width }) => (
<UpperArmIcon width={width} flipped />
<UpperArmIcon width={width} flipped></UpperArmIcon>
),
[BodyPart.RIGHT_UPPER_LEG]: ({ width }) => (
<UpperLegIcon width={width} flipped />
<UpperLegIcon width={width} flipped></UpperLegIcon>
),
[BodyPart.WAIST]: ({ width }) => <WaistIcon width={width} />,
[BodyPart.WAIST]: ({ width }) => <WaistIcon width={width}></WaistIcon>,
[BodyPart.LEFT_THUMB_METACARPAL]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_THUMB_PROXIMAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_THUMB_DISTAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_INDEX_PROXIMAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_THUMB_PROXIMAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.LEFT_THUMB_DISTAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.LEFT_INDEX_PROXIMAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.LEFT_INDEX_INTERMEDIATE]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_INDEX_DISTAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_MIDDLE_PROXIMAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_INDEX_DISTAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.LEFT_MIDDLE_PROXIMAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.LEFT_MIDDLE_INTERMEDIATE]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_MIDDLE_DISTAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_RING_PROXIMAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_MIDDLE_DISTAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.LEFT_RING_PROXIMAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.LEFT_RING_INTERMEDIATE]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_RING_DISTAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_LITTLE_PROXIMAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_RING_DISTAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.LEFT_LITTLE_PROXIMAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.LEFT_LITTLE_INTERMEDIATE]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_LITTLE_DISTAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.LEFT_LITTLE_DISTAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.RIGHT_THUMB_METACARPAL]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_THUMB_PROXIMAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_THUMB_DISTAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_INDEX_PROXIMAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_THUMB_PROXIMAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.RIGHT_THUMB_DISTAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.RIGHT_INDEX_PROXIMAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.RIGHT_INDEX_INTERMEDIATE]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_INDEX_DISTAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_INDEX_DISTAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.RIGHT_MIDDLE_PROXIMAL]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_MIDDLE_INTERMEDIATE]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_MIDDLE_DISTAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_RING_PROXIMAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_MIDDLE_DISTAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.RIGHT_RING_PROXIMAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.RIGHT_RING_INTERMEDIATE]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_RING_DISTAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_RING_DISTAL]: ({ width }) => <FingersIcon width={width} />,
[BodyPart.RIGHT_LITTLE_PROXIMAL]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_LITTLE_INTERMEDIATE]: ({ width }) => (
<FingersIcon width={width} />
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_LITTLE_DISTAL]: ({ width }) => (
<FingersIcon width={width}></FingersIcon>
),
[BodyPart.RIGHT_LITTLE_DISTAL]: ({ width }) => <FingersIcon width={width} />,
};
export function BodyPartIcon({
+1 -1
View File
@@ -29,7 +29,7 @@ function ButtonContent({
</div>
{loading && (
<div className="absolute top-0 left-0 w-full h-full flex justify-center items-center fill-background-10">
<LoaderIcon slimeState={SlimeState.JUMPY} />
<LoaderIcon slimeState={SlimeState.JUMPY}></LoaderIcon>
</div>
)}
</>
+2 -2
View File
@@ -53,7 +53,7 @@ export function CheckBox({
className={classNames(
{
'rounded-lg': outlined,
'text-background-30': !outlined || disabled,
'text-background-10': !outlined || disabled,
'bg-background-60': outlined && color === 'primary',
'bg-background-70': outlined && color === 'secondary',
'bg-background-50': outlined && color === 'tertiary',
@@ -100,7 +100,7 @@ export function CheckBox({
'right-0': value && !loading,
'bg-background-30': disabled,
})}
/>
></div>
</div>
)}
{label}
+4 -6
View File
@@ -68,7 +68,7 @@ export function DropdownItems({
<div
className="z-[999] fixed top-0 w-full h-full"
onClick={onBackdropClick}
/>
></div>
<div
ref={ref}
className={classNames(
@@ -80,7 +80,7 @@ export function DropdownItems({
itemBounds?.height == 0 && 'opacity-0' // Avoid flicker while the component find its position
)}
style={{
maxHeight,
maxHeight: maxHeight,
left:
alignment === 'left'
? dropdownBounds.left
@@ -117,7 +117,6 @@ export function DropdownItems({
onSelectItem(item);
}}
key={item.value}
role="button"
tabIndex={0}
data-checked={item.value === value}
>
@@ -195,7 +194,6 @@ export function Dropdown({
)}
onClick={() => setOpen((open) => !open)}
onKeyDown={(ev) => a11yClick(ev) && setOpen((open) => !open)}
role="button"
tabIndex={0}
>
<div className="flex-grow text-standard first:pointer-events-none">
@@ -210,7 +208,7 @@ export function Dropdown({
direction == 'down' && 'rotate-0'
)}
>
<ArrowDownIcon size={16} />
<ArrowDownIcon size={16}></ArrowDownIcon>
</div>
</div>
{isOpen &&
@@ -232,7 +230,7 @@ export function Dropdown({
onBackdropClick={() => {
setOpen(false);
}}
/>,
></DropdownItems>,
document.body
)}
</>
+92 -84
View File
@@ -12,6 +12,8 @@ import { FileIcon } from './icon/FileIcon';
import { UploadFileIcon } from './icon/UploadFileIcon';
import { Typography } from './Typography';
import { CloseIcon } from './icon/CloseIcon';
import { FolderIcon } from './icon/FolderIcon';
import { UploadFolderIcon } from './icon/UploadFolderIcon';
interface InputProps {
variant?: 'primary' | 'secondary';
@@ -19,13 +21,15 @@ interface InputProps {
name: string;
}
export function FileInputContentBlank({
export const FileInputContentBlank = ({
isDragging,
label,
directory = false,
}: {
isDragging: boolean;
label: string;
}) {
directory?: boolean;
}) => {
return (
<div
className={classNames(
@@ -36,12 +40,16 @@ export function FileInputContentBlank({
)}
>
<span className="flex items-center space-x-2 pointer-events-none">
<UploadFileIcon isDragging={isDragging} />
{directory ? (
<UploadFolderIcon isDragging={isDragging} />
) : (
<UploadFileIcon isDragging={isDragging} />
)}
<div>
<Localized
id={label}
elems={{
u: <span className="underline text-background-20" />,
u: <span className="underline text-background-20"></span>,
}}
>
<Typography>
@@ -53,15 +61,17 @@ export function FileInputContentBlank({
</span>
</div>
);
}
};
export function FileInputContentFile({
export const FileInputContentFile = ({
importedFileName,
directory = false,
onClearPicker,
}: {
importedFileName: string;
onClearPicker: () => any;
}) {
directory?: boolean;
}) => {
return (
<div
className={classNames(
@@ -72,10 +82,10 @@ export function FileInputContentFile({
>
<div className="flex items-center space-x-2">
<div className="flex items-center space-x-2 px-4">
<FileIcon />
{directory ? <FolderIcon /> : <FileIcon />}
<span>{importedFileName}</span>
</div>
<span className="flex-grow" />
<span className="flex-grow"></span>
<a
href="#"
className="h-12 w-12 hover:bg-accent-background-20 cursor-pointer"
@@ -92,7 +102,7 @@ export function FileInputContentFile({
</div>
</div>
);
}
};
export const FileInputInside = forwardRef<
HTMLInputElement,
@@ -107,85 +117,83 @@ export const FileInputInside = forwardRef<
name: string;
importedFileName: string | null;
}
>(
(
{
label = 'tips-file_select',
name,
onChange,
accept,
capture,
multiple = false,
importedFileName,
},
ref
) => {
const innerRef = useRef<HTMLInputElement>(null);
>(function AppInput(
{
label = 'tips-file_select',
name,
onChange,
accept,
capture,
multiple = false,
importedFileName,
},
ref
) {
const innerRef = useRef<HTMLInputElement>(null);
useImperativeHandle(ref, () => innerRef.current!);
useImperativeHandle(ref, () => innerRef.current!);
const acceptList = useMemo(() => accept.split(/, ?/), [accept]);
const [isDragging, setDragging] = useState(false);
const acceptList = useMemo(() => accept.split(/, ?/), [accept]);
const [isDragging, setDragging] = useState(false);
const isFileImported = importedFileName !== null && !isDragging;
const isFileImported = importedFileName !== null && !isDragging;
const onClearPicker = () => {
onChange([]);
innerRef.current!.value = '';
};
const onClearPicker = () => {
onChange([]);
innerRef.current!.value = '';
};
return (
<label
onDragOver={(ev) => ev.preventDefault()}
onDrop={(ev) => {
ev.preventDefault();
setDragging(false);
return (
<label
onDragOver={(ev) => ev.preventDefault()}
onDrop={(ev) => {
ev.preventDefault();
setDragging(false);
if (
ev.dataTransfer.files.length &&
// If MIME type is any of the accept list,
// or if file extension is anything on the acceptList
(acceptList.includes(ev.dataTransfer.files[0].type) ||
acceptList.some((ext) =>
ev.dataTransfer.files[0].name.endsWith(ext)
))
) {
onChange(ev.dataTransfer.files);
if (
ev.dataTransfer.files.length &&
// If MIME type is any of the accept list,
// or if file extension is anything on the acceptList
(acceptList.includes(ev.dataTransfer.files[0].type) ||
acceptList.some((ext) =>
ev.dataTransfer.files[0].name.endsWith(ext)
))
) {
onChange(ev.dataTransfer.files);
}
}}
onDragEnter={(ev) => {
ev.preventDefault();
setDragging(true);
}}
onDragLeave={(ev) => {
ev.preventDefault();
setDragging(false);
}}
>
{isFileImported
? FileInputContentFile({ importedFileName, onClearPicker })
: FileInputContentBlank({ isDragging, label })}
<input
type="file"
className="hidden"
onChange={(ev) => {
if (ev.target.files?.length) {
onChange(ev.target.files);
}
}}
onDragEnter={(ev) => {
ev.preventDefault();
setDragging(true);
}}
onDragLeave={(ev) => {
ev.preventDefault();
setDragging(false);
}}
>
{isFileImported
? FileInputContentFile({ importedFileName, onClearPicker })
: FileInputContentBlank({ isDragging, label })}
name={name}
ref={innerRef}
accept={accept}
multiple={multiple}
capture={capture}
></input>
</label>
);
});
<input
type="file"
className="hidden"
onChange={(ev) => {
if (ev.target.files?.length) {
onChange(ev.target.files);
}
}}
name={name}
ref={innerRef}
accept={accept}
multiple={multiple}
capture={capture}
/>
</label>
);
}
);
export function FileInput({
export const FileInput = ({
control,
name,
label,
@@ -203,11 +211,11 @@ export function FileInput({
capture?: boolean | 'user' | 'environment';
/**
* Use a translation key!
* */
**/
label?: string;
importedFileName: string | null;
} & InputProps &
Partial<HTMLInputElement>) {
Partial<HTMLInputElement>) => {
return (
<Controller
control={control}
@@ -225,8 +233,8 @@ export function FileInput({
capture={capture}
multiple={multiple}
importedFileName={importedFileName}
/>
></FileInputInside>
)}
/>
);
}
};
+93 -95
View File
@@ -22,103 +22,101 @@ export const InputInside = forwardRef<
error?: FieldError;
onChange: () => void;
} & Partial<HTMLInputElement>
>(
(
{
type,
placeholder,
label,
disabled,
autocomplete,
name,
onChange,
value,
error,
variant = 'primary',
},
ref
) => {
const [forceText, setForceText] = useState(false);
>(function AppInput(
{
type,
placeholder,
label,
disabled,
autocomplete,
name,
onChange,
value,
error,
variant = 'primary',
},
ref
) {
const [forceText, setForceText] = useState(false);
const togglePassword = (e: MouseEvent<HTMLDivElement>) => {
e.preventDefault();
setForceText(!forceText);
const togglePassword = (e: MouseEvent<HTMLDivElement>) => {
e.preventDefault();
setForceText(!forceText);
};
const classes = useMemo(() => {
const variantsMap = {
primary: classNames({
'placeholder:text-background-10 placeholder:italic bg-background-60 border-background-60':
!disabled,
'text-background-30 placeholder:text-background-30 border-background-70 bg-background-70':
disabled,
}),
secondary: classNames({
'placeholder:text-background-10 placeholder:italic bg-background-50 border-background-50':
!disabled,
'text-background-40 placeholder:text-background-40 border-background-70 bg-background-70':
disabled,
}),
tertiary: classNames({
'placeholder:text-background-10 placeholder:italic bg-background-40 border-background-40':
!disabled,
'text-background-30 placeholder:text-background-30 border-background-70 bg-background-70':
disabled,
}),
};
const classes = useMemo(() => {
const variantsMap = {
primary: classNames({
'placeholder:text-background-30 bg-background-60 border-background-60':
!disabled,
'text-background-30 placeholder:text-background-30 border-background-70 bg-background-70':
disabled,
}),
secondary: classNames({
'placeholder:text-background-30 bg-background-50 border-background-50':
!disabled,
'text-background-40 placeholder:text-background-40 border-background-70 bg-background-70':
disabled,
}),
tertiary: classNames({
'placeholder:text-background-30 bg-background-40 border-background-40':
!disabled,
'text-background-30 placeholder:text-background-30 border-background-70 bg-background-70':
disabled,
}),
};
return classNames(
variantsMap[variant],
'w-full focus:ring-transparent focus:ring-offset-transparent min-h-[42px] z-10',
'focus:outline-transparent rounded-md focus:border-accent-background-40',
'text-standard relative transition-colors',
error && 'border-status-critical border-1'
);
}, [variant, disabled, error]);
const computedValue = disabled
? placeholder
: value !== undefined
? value
: '';
return (
<label className="flex flex-col gap-1">
{label}
<div className="relative w-full">
<input
type={forceText ? 'text' : type}
className={classNames(classes, {
'pr-10 sentry-mask': type === 'password',
})}
placeholder={placeholder || undefined}
autoComplete={autocomplete ? 'off' : 'on'}
onChange={onChange}
name={name}
value={computedValue} // Do we want that behaviour ?
disabled={disabled}
ref={ref}
/>
{type === 'password' && (
<div
className="fill-background-10 absolute inset-y-0 right-0 pr-6 z-10 my-auto w-[16px] h-[16px] cursor-pointer"
onClick={togglePassword}
>
<EyeIcon width={16} closed={forceText} />
</div>
)}
{error?.message && (
<div className="absolute top-[38px] z-0 pt-1.5 bg-background-70 px-1 w-full rounded-b-md text-status-critical">
{error.message}
</div>
)}
</div>
</label>
return classNames(
variantsMap[variant],
'w-full focus:ring-transparent focus:ring-offset-transparent min-h-[42px] z-10',
'focus:outline-transparent rounded-md focus:border-accent-background-40',
'text-standard relative transition-colors',
error && 'border-status-critical border-1'
);
}
);
}, [variant, disabled, error]);
export function Input({
const computedValue = disabled
? placeholder
: value !== undefined
? value
: '';
return (
<label className="flex flex-col gap-1">
{label}
<div className="relative w-full">
<input
type={forceText ? 'text' : type}
className={classNames(classes, {
'pr-10 sentry-mask': type === 'password',
})}
placeholder={placeholder || undefined}
autoComplete={autocomplete ? 'off' : 'on'}
onChange={onChange}
name={name}
value={computedValue} // Do we want that behaviour ?
disabled={disabled}
ref={ref}
></input>
{type === 'password' && (
<div
className="fill-background-10 absolute inset-y-0 right-0 pr-6 z-10 my-auto w-[16px] h-[16px] cursor-pointer"
onClick={togglePassword}
>
<EyeIcon width={16} closed={forceText}></EyeIcon>
</div>
)}
{error?.message && (
<div className="absolute top-[38px] z-0 pt-1.5 bg-background-70 px-1 w-full rounded-b-md text-status-critical">
{error.message}
</div>
)}
</div>
</label>
);
});
export const Input = ({
type = 'text',
control,
name,
@@ -132,7 +130,7 @@ export function Input({
rules?: UseControllerProps<any>['rules'];
control: Control<any>;
} & InputProps &
Partial<HTMLInputElement>) {
Partial<HTMLInputElement>) => {
return (
<Controller
control={control}
@@ -154,8 +152,8 @@ export function Input({
onChange={onChange}
ref={ref}
name={name}
/>
></InputInside>
)}
/>
);
}
};
+2 -2
View File
@@ -30,7 +30,7 @@ export function LangSelector({
className="inline-block w-auto h-[1em] -translate-y-[0.05em]"
src={emoji}
/>
{` ${name}`}
{' ' + name}
</div>
),
label: name,
@@ -59,6 +59,6 @@ export function LangSelector({
items={languagesItems}
direction={direction}
alignment={alignment}
/>
></Dropdown>
);
}
@@ -1,8 +1,8 @@
import { Control, Controller } from 'react-hook-form';
import { useCallback, useMemo } from 'react';
import { useLocaleConfig } from '@/i18n/config';
import { Button } from './Button';
import { Typography } from './Typography';
import { useCallback, useMemo } from 'react';
import { useLocaleConfig } from '@/i18n/config';
export function NumberSelector({
label,
@@ -38,7 +38,11 @@ export function PersonFrontIcon({
viewBox="0 0 165 392"
xmlns="http://www.w3.org/2000/svg"
>
<image height={'105%'} x="8.5%" href="/images/front-standing-pose.webp" />
<image
height={'105%'}
x="8.5%"
href="/images/front-standing-pose.webp"
></image>
{/* <path d="M84.53 224.074C83.953 230.874 88.569 266.874 90.951 280.984C92.085 287.671 95.195 298.565 94.076 304.349C92.476 312.411 92.017 322.843 92.896 328.918C93.451 332.607 95.196 349.618 92.696 355.845C91.389 359.108 88.996 375.832 88.996 375.832C82.756 391.587 86.278 390.812 86.278 390.812C88.21 393.183 91.519 390.998 91.519 390.998C92.1549 391.464 92.9388 391.682 93.7241 391.612C94.5094 391.542 95.2421 391.188 95.785 390.616C97.949 392.407 100.471 390.396 100.471 390.396C103.189 391.807 105.71 389.205 105.71 389.205C107.271 389.991 107.653 388.998 107.653 388.998C112.337 388.698 105.039 373.706 105.039 373.706C103.291 360.242 106.773 352.748 106.773 352.748C118.178 318.926 118.758 309.948 114.199 297.204C112.915 293.524 112.59 292.067 113.181 290.47C114.547 286.783 113.551 271.953 115.217 266.064C118.431 254.706 121.602 225.903 123.254 212.464C125.475 194.364 115.388 170.088 115.388 170.088C113.179 160.21 116.418 125.016 116.418 125.016C120.941 132.054 120.768 144.477 120.768 144.477C120.05 157.506 131.294 177.42 131.294 177.42C136.694 185.649 138.742 193.456 138.742 194.036C138.742 196.407 138.223 202.145 138.223 202.145L138.43 207.145C138.803 209.721 139.034 212.316 139.123 214.918C138.28 227.953 140.35 225.501 140.35 225.501C142.098 225.501 144.018 215.011 144.018 215.011C144.018 217.711 143.357 225.811 144.818 228.869C146.564 232.512 147.848 228.244 147.871 227.387C148.333 210.787 149.33 215.138 149.33 215.138C150.301 228.602 151.494 231.644 153.63 230.591C155.25 229.818 153.769 214.433 153.769 214.433C156.544 223.572 158.649 225.027 158.649 225.027C163.229 228.243 160.397 219.361 159.76 217.602C156.371 208.256 156.267 205.017 156.267 205.017C160.501 213.417 163.692 213.104 163.692 213.104C167.822 211.786 160.083 199.894 155.548 194.197C153.234 191.297 150.248 187.408 149.384 185.097C147.973 181.188 146.907 168.62 146.907 168.62C146.48 153.79 142.813 147.348 142.813 147.348C136.544 137.314 135.365 118.598 135.365 118.598L135.09 87C132.89 65.445 117.01 65.29 117.01 65.29C100.957 62.9 98.723 57.714 98.723 57.714C95.323 52.821 97.266 43.44 97.266 43.44C100.087 41.145 101.175 35.053 101.175 35.053C105.859 31.461 105.63 26.205 103.466 26.262C101.73 26.308 102.123 24.87 102.123 24.87C105.052 1.208 84.046 0 84.046 0H80.836C80.836 0 59.821 1.208 62.746 24.864C62.746 24.864 63.139 26.304 61.388 26.256C59.23 26.199 59.029 31.456 63.696 35.047C63.696 35.047 64.783 41.137 67.605 43.434C67.605 43.434 69.548 52.814 66.148 57.708C66.148 57.708 63.922 62.894 47.861 65.284C47.861 65.284 31.952 65.44 29.788 86.994L29.488 118.594C29.488 118.594 28.331 137.311 22.038 147.344C22.038 147.344 18.389 153.787 17.967 168.616C17.967 168.616 16.898 181.184 15.492 185.093C14.635 187.393 11.653 191.276 9.32001 194.193C4.74601 199.878 -2.94199 211.745 1.17101 213.1C1.17101 213.1 4.37901 213.412 8.59601 205.013C8.59601 205.013 8.50901 208.229 5.12501 217.598C4.46001 219.334 1.63201 228.217 6.21301 225.024C6.21301 225.024 8.33501 223.567 11.093 214.43C11.093 214.43 9.61301 229.815 11.26 230.588C13.412 231.642 14.586 228.599 15.56 215.135C15.56 215.135 16.56 210.787 17.017 227.384C17.04 228.241 18.295 232.509 20.049 228.866C21.529 225.811 20.864 217.727 20.864 215.008C20.864 215.008 22.764 225.498 24.536 225.498C24.536 225.498 26.624 227.95 25.767 214.915C25.628 212.786 26.375 208.415 26.467 207.142L26.667 202.142C26.667 202.142 26.146 196.417 26.146 194.033C26.146 193.442 28.194 185.646 33.594 177.417C33.594 177.417 44.826 157.494 44.103 144.474C44.103 144.474 43.947 132.051 48.47 125.013C48.47 125.013 51.68 160.205 49.505 170.085C49.505 170.085 39.405 194.358 41.629 212.461C43.27 225.937 46.435 254.702 49.657 266.061C51.34 271.938 50.345 286.761 51.693 290.467C52.301 292.076 51.982 293.558 50.675 297.201C46.141 309.947 46.718 318.925 58.123 352.745C58.123 352.745 61.633 360.239 59.859 373.703C59.859 373.703 52.572 388.695 57.239 388.995C57.239 388.995 57.604 389.988 59.182 389.202C59.182 389.202 61.703 391.802 64.427 390.393C64.427 390.393 66.95 392.407 69.106 390.613C69.6451 391.185 70.3751 391.54 71.158 391.61C71.9409 391.681 72.7225 391.462 73.355 390.995C73.355 390.995 76.664 393.227 78.63 390.809C78.63 390.809 82.123 391.584 75.904 375.829C75.904 375.829 73.522 359.129 72.209 355.842C69.709 349.621 71.474 332.57 72.009 328.915C72.87 322.806 72.409 312.398 70.835 304.346C69.684 298.575 72.801 287.679 73.952 280.981C76.317 266.881 80.952 230.881 80.373 224.071L82.288 224.743C83.0863 224.756 83.8692 224.522 84.53 224.074Z" /> */}
<circle
className="body-part-circle"
+2 -3
View File
@@ -21,7 +21,6 @@ export function ProgressBar({
{Array.from({ length: parts }).map((_, key) => (
<Bar
index={key}
// eslint-disable-next-line react/no-array-index-key
key={key}
progress={progress}
height={height}
@@ -29,7 +28,7 @@ export function ProgressBar({
animated={animated}
parts={parts}
bottom={bottom}
/>
></Bar>
))}
</div>
);
@@ -75,7 +74,7 @@ export function Bar({
width: `${value * 100}%`,
height: `${height}px`,
}}
/>
></div>
</div>
);
}
+3 -5
View File
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import { Control, Controller } from 'react-hook-form';
import { ReactNode } from 'react';
import { Typography } from './Typography';
import { ReactNode } from 'react';
export function Radio({
control,
@@ -49,11 +49,9 @@ export function Radio({
{...props}
/>
<div className="flex flex-col gap-2 pointer-events-none">
{children || <Typography bold>{label}</Typography>}
{children ? children : <Typography bold>{label}</Typography>}
{description && (
<Typography variant="standard" color="secondary">
{description}
</Typography>
<Typography variant="standard">{description}</Typography>
)}
</div>
</label>
-2
View File
@@ -42,7 +42,6 @@ export function Range({
/>
<datalist id={`${name}-datalist`} className="">
{values.map(({ value }, i) => (
// eslint-disable-next-line react/no-array-index-key
<option key={i}>{value}</option>
))}
</datalist>
@@ -55,7 +54,6 @@ export function Range({
);
return (
<span
// eslint-disable-next-line react/no-array-index-key
key={i}
className={classNames(
'flex-1',
@@ -4,8 +4,8 @@ import {
RefCallBack,
UseControllerProps,
} from 'react-hook-form';
import { open } from '@tauri-apps/plugin-dialog';
import { FileInputContentBlank, FileInputContentFile } from './FileInput';
import { open } from '@tauri-apps/plugin-dialog';
export function InnerTauriFileInput({
label,
@@ -24,10 +24,11 @@ export function InnerTauriFileInput({
<div ref={ref} onClick={async () => onChange(await open({ directory }))}>
{value !== null
? FileInputContentFile({
directory,
importedFileName: value,
onClearPicker: () => onChange(null),
})
: FileInputContentBlank({ isDragging: false, label })}
: FileInputContentBlank({ isDragging: false, label, directory })}
</div>
);
}
@@ -43,7 +44,7 @@ export function TauriFileInput({
control: Control<any>;
/**
* Use a translation key!
* */
**/
label: string;
name: string;
directory?: boolean;
+3 -3
View File
@@ -1,8 +1,8 @@
import { ReactNode } from 'react';
import classNames from 'classnames';
import { BulbIcon } from './icon/BulbIcon';
import { WarningIcon } from './icon/WarningIcon';
import { Typography } from './Typography';
import classNames from 'classnames';
export function TipBox({
children,
@@ -28,7 +28,7 @@ export function TipBox({
hideIcon && 'hidden'
)}
>
<BulbIcon />
<BulbIcon></BulbIcon>
</div>
<div className="flex flex-col">
<Typography
@@ -62,7 +62,7 @@ export function WarningBox({
hideIcon && 'hidden'
)}
>
<WarningIcon />
<WarningIcon></WarningIcon>
</div>
<div className="flex flex-col justify-center w-full">
<Typography
+4 -9
View File
@@ -28,12 +28,12 @@ interface TooltipPos {
height?: number;
}
interface Rect {
type Rect = {
left: number;
top: number;
width: number;
height: number;
}
};
function overlapArea(rect1: Rect, rect2: Rect) {
// Find the overlap in the x direction (width)
@@ -273,8 +273,6 @@ export function FloatingTooltip({
elem.removeEventListener('mouseleave', onMouseLeave);
};
}
return undefined;
}, []);
useLayoutEffect(() => {
@@ -397,8 +395,6 @@ export function DrawerTooltip({
clearTimeout(touchTimeout.current);
};
}
return undefined;
}, []);
return (
@@ -410,7 +406,7 @@ export function DrawerTooltip({
opacity: drawerStyle ? 0.5 : 0,
pointerEvents: drawerStyle ? 'all' : 'none',
}}
/>
></div>
<div
className={classNames(
'fixed z-50 w-full text-background-10 max-h-full -bottom-full transition-all overflow-clip'
@@ -426,11 +422,10 @@ export function DrawerTooltip({
Pro tip
</Typography>
<button
type="button"
className="absolute right-4 top-3 h-6 w-6 bg-background-70 rounded-full flex justify-center items-center"
onClick={() => close()}
>
<CloseIcon size={20} className="stroke-white" />
<CloseIcon size={20} className="stroke-white"></CloseIcon>
</button>
</div>
<div
@@ -1,4 +1,6 @@
import classNames from 'classnames';
import { CheckIcon } from './icon/CheckIcon';
import { Typography } from './Typography';
import {
FC,
ReactNode,
@@ -9,8 +11,6 @@ import {
} from 'react';
import { useElemSize } from '@/hooks/layout';
import { useDebouncedEffect } from '@/hooks/timeout';
import { Typography } from './Typography';
import { CheckIcon } from './icon/CheckIcon';
export function VerticalStep({
active,
@@ -66,7 +66,7 @@ export function VerticalStep({
)}
>
{isPrevious ? (
<CheckIcon />
<CheckIcon></CheckIcon>
) : (
<Typography variant="section-title">{index + 1}</Typography>
)}
@@ -88,19 +88,19 @@ export function VerticalStep({
);
}
export interface VerticalStepComponentProps {
export type VerticalStepComponentProps = {
nextStep: () => void;
prevStep: () => void;
goTo: (id: string) => void;
isActive: boolean;
}
};
type VerticalStepComponentType = FC<VerticalStepComponentProps>;
export interface VerticalStep {
export type VerticalStep = {
title: string;
id?: string;
component: VerticalStepComponentType;
}
};
export default function VerticalStepper({
steps,
@@ -135,14 +135,13 @@ export default function VerticalStepper({
return (
<ol className="relative border-l border-gray-700 text-gray-400">
{steps.map(({ title, component: StepComponent }, index) => (
// eslint-disable-next-line react/no-array-index-key
<VerticalStep active={currStep} index={index} title={title} key={index}>
<StepComponent
nextStep={nextStep}
prevStep={prevStep}
goTo={goTo}
isActive={currStep === index}
/>
></StepComponent>
</VerticalStep>
))}
</ol>
@@ -11,7 +11,7 @@ export function BatteryIcon({
charging: boolean;
}) {
const col = useMemo(() => {
const colorsMap: Record<number, string> = {
const colorsMap: { [key: number]: string } = {
0.4: 'fill-status-success',
0.2: 'fill-status-warning',
0: 'fill-status-critical',
@@ -7,7 +7,7 @@ export function ChestIcon({ width = 24 }: { width?: number }) {
width={width}
viewBox="0 0 50 50"
>
<path d="M 20 2 C 18.156 2 16.700141 3.1345312 15.619141 4.0195312 C 12.698141 4.2755313 4 7.245 4 15 C 4 17.305 4.551 19.068203 4.875 19.908203 C 4.262 20.969203 3 23.679 3 28 C 3 28.352 3.184375 28.677422 3.484375 28.857422 L 8.484375 31.857422 C 8.835375 32.068422 9.2804219 32.044922 9.6074219 31.794922 C 10.290422 31.270922 10.833578 30.512578 11.267578 29.642578 C 11.118578 28.880578 11 28.05 11 27 L 11 21 C 11 20.448 11.448 20 12 20 C 12.43 20 12.790641 20.27425 12.931641 20.65625 C 12.944641 20.68425 12.982 20.797656 13 20.847656 C 13.197 21.404656 14.365 24 19 24 C 23.133 24 23.984531 19.976687 24.019531 19.804688 C 24.113531 19.329687 24.535 19.018531 25 19.019531 C 25.465 19.019531 25.886469 19.330687 25.980469 19.804688 C 26.015469 19.976687 26.867 24 31 24 C 35.635 24 36.803 21.405656 37 20.847656 C 37.018 20.797656 37.055359 20.68425 37.068359 20.65625 C 37.209359 20.27525 37.57 20 38 20 C 38.552 20 39 20.448 39 21 L 39 27 C 39 28.05 38.881422 28.881578 38.732422 29.642578 C 39.166422 30.513578 39.709578 31.269969 40.392578 31.792969 C 40.719578 32.042969 41.164625 32.066469 41.515625 31.855469 L 46.515625 28.855469 C 46.815625 28.676469 47 28.352 47 28 C 47 23.679 45.738 20.969203 45.125 19.908203 C 45.449 19.068203 46 17.305 46 15 C 46 7.245 37.301859 4.2755312 34.380859 4.0195312 C 33.299859 3.1345312 31.844 2 30 2 L 25 2 L 20 2 z M 25 22.609375 C 23.953 24.323375 22.059 26 19 26 C 16.075 26 14.195 25.130766 13 24.134766 L 13 27 C 13 28.281 13.194875 29.155016 13.421875 30.166016 C 13.692875 31.375016 14 32.746 14 35 C 14 35.027 13.987375 35.049172 13.984375 35.076172 C 13.994375 35.366172 14 35.669 14 36 L 14 42 C 14 44.997 18.628641 47.438484 19.556641 47.896484 C 19.693641 47.965484 19.847 48 20 48 L 25 48 L 30 48 C 30.153 48 30.306359 47.965484 30.443359 47.896484 C 31.371359 47.438484 36 44.997 36 42 L 36 36 C 36 35.669 36.005625 35.366172 36.015625 35.076172 C 36.012625 35.049172 36 35.027 36 35 C 36 32.746 36.307125 31.375016 36.578125 30.166016 C 36.805125 29.155016 37 28.281 37 27 L 37 24.134766 C 35.805 25.130766 33.925 26 31 26 C 27.941 26 26.047 24.323375 25 22.609375 z" />
<path d="M 20 2 C 18.156 2 16.700141 3.1345312 15.619141 4.0195312 C 12.698141 4.2755313 4 7.245 4 15 C 4 17.305 4.551 19.068203 4.875 19.908203 C 4.262 20.969203 3 23.679 3 28 C 3 28.352 3.184375 28.677422 3.484375 28.857422 L 8.484375 31.857422 C 8.835375 32.068422 9.2804219 32.044922 9.6074219 31.794922 C 10.290422 31.270922 10.833578 30.512578 11.267578 29.642578 C 11.118578 28.880578 11 28.05 11 27 L 11 21 C 11 20.448 11.448 20 12 20 C 12.43 20 12.790641 20.27425 12.931641 20.65625 C 12.944641 20.68425 12.982 20.797656 13 20.847656 C 13.197 21.404656 14.365 24 19 24 C 23.133 24 23.984531 19.976687 24.019531 19.804688 C 24.113531 19.329687 24.535 19.018531 25 19.019531 C 25.465 19.019531 25.886469 19.330687 25.980469 19.804688 C 26.015469 19.976687 26.867 24 31 24 C 35.635 24 36.803 21.405656 37 20.847656 C 37.018 20.797656 37.055359 20.68425 37.068359 20.65625 C 37.209359 20.27525 37.57 20 38 20 C 38.552 20 39 20.448 39 21 L 39 27 C 39 28.05 38.881422 28.881578 38.732422 29.642578 C 39.166422 30.513578 39.709578 31.269969 40.392578 31.792969 C 40.719578 32.042969 41.164625 32.066469 41.515625 31.855469 L 46.515625 28.855469 C 46.815625 28.676469 47 28.352 47 28 C 47 23.679 45.738 20.969203 45.125 19.908203 C 45.449 19.068203 46 17.305 46 15 C 46 7.245 37.301859 4.2755312 34.380859 4.0195312 C 33.299859 3.1345312 31.844 2 30 2 L 25 2 L 20 2 z M 25 22.609375 C 23.953 24.323375 22.059 26 19 26 C 16.075 26 14.195 25.130766 13 24.134766 L 13 27 C 13 28.281 13.194875 29.155016 13.421875 30.166016 C 13.692875 31.375016 14 32.746 14 35 C 14 35.027 13.987375 35.049172 13.984375 35.076172 C 13.994375 35.366172 14 35.669 14 36 L 14 42 C 14 44.997 18.628641 47.438484 19.556641 47.896484 C 19.693641 47.965484 19.847 48 20 48 L 25 48 L 30 48 C 30.153 48 30.306359 47.965484 30.443359 47.896484 C 31.371359 47.438484 36 44.997 36 42 L 36 36 C 36 35.669 36.005625 35.366172 36.015625 35.076172 C 36.012625 35.049172 36 35.027 36 35 C 36 32.746 36.307125 31.375016 36.578125 30.166016 C 36.805125 29.155016 37 28.281 37 27 L 37 24.134766 C 35.805 25.130766 33.925 26 31 26 C 27.941 26 26.047 24.323375 25 22.609375 z"></path>
</svg>
);
}
@@ -23,23 +23,23 @@ export function ControllerIcon({
<path
d="M118.822 208.203c-2.618-.617-4.697-3.542-5.882-8.273-.291-1.162-.298-1.318-.28-6.087.025-6.892.614-23.54.873-24.712.407-1.836.45-2.166.39-2.962-.101-1.363-.496-2.192-1.523-3.2-1.327-1.302-3.303-2.24-6.48-3.078-1.73-.456-3.586-1.518-6.604-3.78-3.429-2.571-4.412-3.847-7.412-9.617-.584-1.123-1.155-2.09-1.27-2.152-.259-.138-1.272-.289-5.165-.769-3.5-.43-6.014-.807-6.642-.992-.827-.245-1.493-1.177-2.218-3.103-.921-2.446-2.059-8.04-2.059-10.122 0-2.587 1.23-6.419 2.836-8.832.83-1.247 1.148-1.489 2.265-1.723 7.263-1.526 53.58-5.18 66.688-5.262 3.11-.019 3.213-.012 3.65.26 1.497.931 3.276 3.686 4.198 6.502.86 2.622 1.011 4.66.57 7.652-.873 5.938-2.877 9.425-6.303 10.969-.767.345-1.928.65-3.119.822-.955.137-1.121.36-1.443 1.948-.523 2.573-1.864 5.5-4.178 9.114-1.084 1.694-1.407 2.78-2.776 9.339-1.166 5.587-1.297 6.347-1.893 11.008-.914 7.15-2.987 22.105-3.276 23.631-.85 4.5-4.377 9.213-9.243 12.352-1.778 1.146-2.492 1.352-3.704 1.067zm-1.16-48.81c4.208-.596 8.777-2.031 12.644-3.97 5.698-2.858 9.94-7.053 11.599-11.471.494-1.315.643-2.34.42-2.88-.147-.354-.203-.38-.802-.38-.78 0-5.773.591-14.198 1.683-6.609.855-9.629 1.2-13.24 1.511-4.913.423-10.917.694-15.438.696-1.622 0-3.59.038-4.373.083-1.345.078-1.431.099-1.561.385-.206.452.06 1.523.715 2.881 1.05 2.177 2.932 4.619 4.83 6.27 5.185 4.512 11.77 6.274 19.405 5.192z"
transform="scale(.26458)"
/>
></path>
<path
d="M111.38 158.518c-4.784-.43-8.953-2.192-12.419-5.25-1.997-1.763-4.05-4.546-4.817-6.531l-.371-.963 5.355-.078c5.019-.074 10.45-.275 11.662-.432.514-.067.533-.057.533.272 0 .498.536 1.333 1.111 1.732 1.473 1.02 3.312 1.046 5.07.434 1.981-.69 2.783-1.579 2.79-2.727l.002-.577 2.26-.276c1.242-.151 4.913-.616 8.157-1.033 7.376-.947 10.484-1.306 10.568-1.222.135.135-.508 1.937-1.101 3.092-2.017 3.922-6.233 7.574-11.529 9.985-5.871 2.674-12.356 4.016-17.272 3.574zm20.458-8.081c.958-.439 1.503-.858 1.904-1.464 1.196-1.808-.01-3.98-2.721-4.896-.637-.216-1.009-.263-1.75-.22-1.096.064-1.542.264-2.423 1.084-1.089 1.013-1.487 2.354-1.026 3.457.397.949 1.521 1.89 2.731 2.285.858.28 2.388.165 3.285-.246z"
transform="scale(.26458)"
/>
></path>
<path
d="M109.855 171.583c-.839-.29-1.655-.856-1.744-1.21-.04-.163.093-.688.324-1.268.588-1.483.61-2.105.143-3.918-.463-1.793-.495-2.343-.15-2.528 1.115-.596 3.07 1.299 3.795 3.679.243.797.25.956.114 2.196-.193 1.752-.4 2.931-.548 3.126-.173.226-1.173.186-1.934-.077z"
transform="scale(.26458)"
/>
></path>
<path
d="M128.454 149.37c-.797-.376-1.472-1.276-1.603-1.798-.207-.822.52-1.842 1.577-2.38 1.397-.714 3.825.066 4.176 1.128.35 1.062.33 2.041-.436 2.602-1.214.889-2.465 1.04-3.714.449z"
transform="scale(.26458)"
/>
></path>
<path
d="M113.895 146.8c-.662-.31-1.51-1.648-1.238-1.67l6.153-.485c.284-.023-.434 1.493-1.413 1.947-1.272.591-2.557.65-3.502.207z"
transform="scale(.26458)"
/>
></path>
</g>
</g>
</svg>
@@ -17,7 +17,7 @@ export function CrossIcon({
fillRule="evenodd"
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
clipRule="evenodd"
/>
></path>
</svg>
);
}
@@ -0,0 +1,12 @@
export function FolderIcon({ width = 24 }: { width?: number }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
width={width}
>
<path d="M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z" />
</svg>
);
}
+1 -1
View File
@@ -16,7 +16,7 @@ export function FootIcon({
<path
transform={flipped ? undefined : 'scale(-1,1) translate(-28,0)'}
d="M11.5 3A1.5 2 0 0 0 10 5a1.5 2 0 0 0 1.5 2A1.5 2 0 0 0 13 5a1.5 2 0 0 0-1.5-2zm3.244.678a1 1.333 0 0 0-1 1.334 1 1.333 0 0 0 1 1.332 1 1.333 0 0 0 1-1.332 1 1.333 0 0 0-1-1.334zm2.33 1.039a.863 1.151 0 0 0-.861 1.15.863 1.151 0 0 0 .861 1.15.863 1.151 0 0 0 .863-1.15.863 1.151 0 0 0-.863-1.15zm1.582 1.863a.611.815 0 0 0-.61.815.611.815 0 0 0 .61.816.611.815 0 0 0 .612-.816.611.815 0 0 0-.612-.815zM13.918 8C11.629 8 10 9.731 10 12c0 2.887 3 2.82 3 5 0 1.604-1.272 2.766-1.781 4.295a3.5 3.5 0 0 0-.096.305c-.014.054-.031.108-.043.164a3.5 3.5 0 0 0-.08.736 3.5 3.5 0 0 0 3.5 3.5 3.5 3.5 0 0 0 3.5-3.5c0-3.91 1.998-5.5 1.998-8.5 0-3.612-3.317-6-6.08-6zm5.582.666a.5.667 0 0 0-.5.666.5.667 0 0 0 .5.668.5.667 0 0 0 .5-.668.5.667 0 0 0-.5-.666z"
/>
></path>
</svg>
);
}
@@ -4,7 +4,7 @@ export function HeadsetIcon({ width = 24 }: { width?: number }) {
<path
transform="scale(0.75, 0.75) translate(120, 96)"
d="M576 64H64C28.7 64 0 92.7 0 128v256c0 35.3 28.7 64 64 64h120.4c24.2 0 46.4-13.7 57.2-35.4l32-64c8.8-17.5 26.7-28.6 46.3-28.6s37.5 11.1 46.3 28.6l32 64c10.8 21.7 33 35.4 57.2 35.4H576c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64zM96 240a64 64 0 11128 0 64 64 0 11-128 0zm384-64a64 64 0 110 128 64 64 0 110-128z"
/>
></path>
</svg>
);
}
@@ -1,8 +1,8 @@
export function HumanIcon({ width = 20 }: { width?: number }) {
return (
<svg xmlns="http://www.w3.org/2000/svg" width={width} viewBox="0 0 512 512">
<path d="M256 112a56 56 0 1156-56 56.06 56.06 0 01-56 56z" />
<path d="M432 112.8l-.45.12-.42.13c-1 .28-2 .58-3 .89-18.61 5.46-108.93 30.92-172.56 30.92-59.13 0-141.28-22-167.56-29.47a73.79 73.79 0 00-8-2.58c-19-5-32 14.3-32 31.94 0 17.47 15.7 25.79 31.55 31.76v.28l95.22 29.74c9.73 3.73 12.33 7.54 13.6 10.84 4.13 10.59.83 31.56-.34 38.88l-5.8 45-32.19 176.19q-.15.72-.27 1.47l-.23 1.27c-2.32 16.15 9.54 31.82 32 31.82 19.6 0 28.25-13.53 32-31.94s28-157.57 42-157.57 42.84 157.57 42.84 157.57c3.75 18.41 12.4 31.94 32 31.94 22.52 0 34.38-15.74 32-31.94a57.17 57.17 0 00-.76-4.06L329 301.27l-5.79-45c-4.19-26.21-.82-34.87.32-36.9a1.09 1.09 0 00.08-.15c1.08-2 6-6.48 17.48-10.79l89.28-31.21a16.9 16.9 0 001.62-.52c16-6 32-14.3 32-31.93S451 107.81 432 112.8z" />
<path d="M256 112a56 56 0 1156-56 56.06 56.06 0 01-56 56z"></path>
<path d="M432 112.8l-.45.12-.42.13c-1 .28-2 .58-3 .89-18.61 5.46-108.93 30.92-172.56 30.92-59.13 0-141.28-22-167.56-29.47a73.79 73.79 0 00-8-2.58c-19-5-32 14.3-32 31.94 0 17.47 15.7 25.79 31.55 31.76v.28l95.22 29.74c9.73 3.73 12.33 7.54 13.6 10.84 4.13 10.59.83 31.56-.34 38.88l-5.8 45-32.19 176.19q-.15.72-.27 1.47l-.23 1.27c-2.32 16.15 9.54 31.82 32 31.82 19.6 0 28.25-13.53 32-31.94s28-157.57 42-157.57 42.84 157.57 42.84 157.57c3.75 18.41 12.4 31.94 32 31.94 22.52 0 34.38-15.74 32-31.94a57.17 57.17 0 00-.76-4.06L329 301.27l-5.79-45c-4.19-26.21-.82-34.87.32-36.9a1.09 1.09 0 00.08-.15c1.08-2 6-6.48 17.48-10.79l89.28-31.21a16.9 16.9 0 001.62-.52c16-6 32-14.3 32-31.93S451 107.81 432 112.8z"></path>
</svg>
);
}
@@ -20,28 +20,28 @@ export function LoaderIcon({
alt="Slime jumping"
width={size}
// className="crisp-edges"
/>
></img>
<img
hidden={slimeState !== SlimeState.HAPPY}
src="/images/happy-slime.gif"
alt="Happy slime"
width={size}
// className="crisp-edges"
/>
></img>
<img
hidden={slimeState !== SlimeState.SAD}
src="/images/sad-slime.gif"
alt="Sad slime"
width={size}
// className="crisp-edges"
/>
></img>
<img
hidden={slimeState !== SlimeState.CURIOUS}
src="/images/curious-slime.gif"
alt="Slime looking for something"
width={size}
// className="crisp-edges"
/>
></img>
</>
);
}
@@ -16,7 +16,7 @@ export function LowerArmIcon({
<path
transform={flipped ? 'scale(-1,1) translate(-50,0)' : undefined}
d="M27.203 1.98c-1.019 0-1.954.56-2.437 1.458L17.26 15.858c-.157.291-.24.619-.24.95v16.22l-4.74 5.49a1.001 1.001 0 0 0 .156 1.407l9.386 7.818a.998.998 0 0 0 1.416-.17l8.354-10.443a13.001 13.001 0 0 0 2.668-7.072L35 20.83A2.83 2.83 0 0 0 32.17 18h-.008a2.83 2.83 0 0 0-2.73 2.086l-2.41 5.935-2.026-3.019L25 16l4.734-10.09c.847-1.836-.491-3.93-2.513-3.93h-.018z"
/>
></path>
</svg>
);
}
+1 -1
View File
@@ -15,7 +15,7 @@ export function PawIcon({
<path
transform={`${transform} scale(0.75, 0.75) translate(96, 96)`}
d="M490.39 182.75c-5.55-13.19-14.77-22.7-26.67-27.49l-.16-.06a46.46 46.46 0 00-17-3.2h-.64c-27.24.41-55.05 23.56-69.19 57.61-10.37 24.9-11.56 51.68-3.18 71.64 5.54 13.2 14.78 22.71 26.73 27.5l.13.05a46.53 46.53 0 0017 3.2c27.5 0 55.6-23.15 70-57.65 10.24-24.87 11.37-51.63 2.98-71.6zM381.55 329.61c-15.71-9.44-30.56-18.37-40.26-34.41C314.53 250.8 298.37 224 256 224s-58.57 26.8-85.39 71.2c-9.72 16.06-24.6 25-40.36 34.48-18.07 10.86-36.74 22.08-44.8 44.16a66.93 66.93 0 00-4.65 25c0 35.95 28 65.2 62.4 65.2 17.75 0 36.64-6.15 56.63-12.66 19.22-6.26 39.09-12.73 56.27-12.73s37 6.47 56.15 12.73C332.2 457.85 351 464 368.8 464c34.35 0 62.3-29.25 62.3-65.2a67 67 0 00-4.75-25c-8.06-22.1-26.74-33.33-44.8-44.19zM150 188.85c11.9 14.93 27 23.15 42.52 23.15a42.88 42.88 0 006.33-.47c32.37-4.76 52.54-44.26 45.92-90C242 102.3 234.6 84.39 224 71.11 212.12 56.21 197 48 181.49 48a42.88 42.88 0 00-6.33.47c-32.37 4.76-52.54 44.26-45.92 90 2.76 19.2 10.16 37.09 20.76 50.38zm163.16 22.68a42.88 42.88 0 006.33.47c15.53 0 30.62-8.22 42.52-23.15 10.59-13.29 17.95-31.18 20.75-50.4 6.62-45.72-13.55-85.22-45.92-90a42.88 42.88 0 00-6.33-.47C315 48 299.88 56.21 288 71.11c-10.6 13.28-18 31.19-20.76 50.44-6.62 45.72 13.55 85.22 45.92 89.98zM111.59 308.8l.14-.05c11.93-4.79 21.16-14.29 26.69-27.48 8.38-20 7.2-46.75-3.15-71.65C120.94 175.16 92.85 152 65.38 152a46.4 46.4 0 00-17 3.2l-.14.05c-11.9 4.75-21.13 14.29-26.66 27.48-8.38 20-7.2 46.75 3.15 71.65C39.06 288.84 67.15 312 94.62 312a46.4 46.4 0 0016.97-3.2z"
/>
></path>
</svg>
);
}
@@ -15,11 +15,11 @@ export function SlimeUpIcon({ width = 60 }: { width?: number }) {
strokeWidth="0.265"
rx="6.963"
ry="3.423"
/>
></rect>
<path
strokeWidth="0.195"
d="M59.587 23.923c.514 0 .978.382 1.313 1.001.336.62.402 1.512.543 2.425l1.376 8.937v40.902l-1.38 8.95c-.14.917-.206 1.805-.542 2.425-.335.619-.8 1.001-1.314 1.001-1.028 0-2.14-1.59-1.856-3.427l1.38-8.949V36.286l-1.377-8.937c-.281-1.826.828-3.426 1.857-3.426z"
/>
></path>
</g>
</svg>
);
@@ -9,13 +9,13 @@ export function SlimeVRIcon({ width = 28 }: { width?: number }) {
viewBox="0 0 380 380"
>
<g fill="none" stroke="#fff">
<path strokeWidth="13.62" d="M72.867 191.74l37-39 39 36" />
<path strokeWidth="13.62" d="M208.87 187.74l38-35 36 38" />
<path strokeWidth="13.62" d="M72.867 191.74l37-39 39 36"></path>
<path strokeWidth="13.62" d="M208.87 187.74l38-35 36 38"></path>
<path
strokeLinecap="square"
strokeWidth="17"
d="M56.867 253.74s130.61-31.182 248 5c13.45 4.146 20.244 2.975 20-8s1.909-126.06-46-131"
/>
></path>
</g>
</svg>
);
@@ -11,11 +11,11 @@ export function TaybolIcon({ width = 784 }: { width?: string | number }) {
<path
strokeWidth="0.234"
d="M102.747 171.401l-8.467-3.77-.07-25.96-.07-25.958-25.727-11.386-25.727-11.385-.067 17.959-.068 17.959-1.387.689c-1.938.962-15.39 7.134-15.85 7.273-.375.112-17.638-7.406-18.012-7.844-.107-.126-.194-15.36-.194-33.855 0-18.494.087-33.733.194-33.863.426-.519 102.33-47.274 102.868-47.197.299.042 23.962 10.446 52.586 23.118l52.042 23.041v67.955l-8.614 3.96c-4.738 2.177-8.757 3.956-8.93 3.954-.174-.002-4.245-1.75-9.047-3.883l-8.731-3.878-.132-17.81-.133-17.809-24.793 11.398-24.794 11.397-.011 25.893c-.01 20.456-.08 25.937-.342 26.103-1.434.913-16.748 7.7-17.342 7.687-.413-.01-4.3-1.613-9.182-3.788zm8.666-47.957c-.165-.128-4.51-2.073-14.818-6.63l-1.389-.614V167.09l8.136 3.603 8.136 3.604.067-25.35c.037-13.942-.022-25.419-.132-25.504zm10.78 46.417l6.218-2.874.068-25.474.067-25.474-3.64 1.678-8.07 3.724-4.432 2.046v50.87l1.786-.81c.982-.446 4.584-2.105 8.004-3.686zm-97.637-59.58l-.007-25.4-7.973-3.519c-4.386-1.934-8.074-3.549-8.196-3.586-.122-.038-.222 11.37-.222 25.352v25.42l8.004 3.558c4.402 1.957 8.093 3.562 8.202 3.567.11.005.195-11.422.192-25.392zm9.361 21.686l7.843-3.61V92.52l-6.534-2.89c-3.594-1.588-7.226-3.196-8.07-3.573l-1.535-.684v25.17c0 13.874.101 25.141.226 25.103.125-.038 3.756-1.694 8.07-3.68zm162.89-22.136v-25.23l-8.196 3.761-8.194 3.76.058 17.868.06 17.867 8.07 3.59c4.438 1.973 8.099 3.594 8.135 3.601.036.007.066-11.34.066-25.217zm9.17 21.454l7.755-3.57.004-25.4c.003-13.971-.045-25.402-.104-25.402-.06 0-3.602 1.609-7.872 3.575l-7.763 3.574-.067 25.396c-.037 13.968.014 25.396.113 25.396.098 0 3.67-1.606 7.934-3.57zm-94.43-23.43C110.804 107.482 8.392 62.22 8.294 62.22c-.078 0-.11 3.272-.072 7.272l.07 7.271 51.593 22.843 51.594 22.843.07-7.28c.038-4.004.038-7.296 0-7.315zm51.55-8.679l50.51-23.262.07-7.26c.038-3.993-.022-7.256-.133-7.25-.11.005-22.883 10.46-50.605 23.233l-50.403 23.223-.07 7.29c-.037 4.008-.026 7.288.026 7.288s22.824-10.468 50.605-23.262zm-.66-15.245c27.707-12.756 50.46-23.256 50.564-23.333.22-.163-102.39-45.643-102.982-45.645-.41 0-101.054 46.25-101.062 46.444-.004.078 102.892 45.728 103.072 45.728.017 0 22.7-10.437 50.408-23.194z"
/>
></path>
<path
strokeWidth="0.076"
d="M95.553 93.605c-3.231-.733-4.092-2.287-2.04-3.68.963-.654 1.331-1.21 1.545-2.333.194-1.016.473-1.49.969-1.639.133-.04.17-.107.17-.313v-.262L93.2 82.085c-1.648-1.81-3.03-3.292-3.07-3.292-.098 0-1.55.945-1.616 1.052a.207.207 0 01-.159.084c-.059 0-.258.15-.443.335-.34.34-.85.65-1.07.65-.066 0-.362.192-.657.427l-.536.428-1.19-.044-1.19-.044-.265.354c-.145.196-.513.696-.818 1.113-1.158 1.583-3.71 3.764-5.019 4.289-3.017 1.209-6.52-.056-6.528-2.358-.004-1.13.201-1.427 1.872-2.702 1.469-1.12 2.472-2.105 3.285-3.221.735-1.01 1.384-1.745 1.71-1.938.126-.074.197-.17.177-.24a5.189 5.189 0 01-.082-.391c-.055-.312-.112-.246.805-.94.359-.272.69-.578.737-.68.163-.358.315-.183.318.367.01 1.905 4.619 4.319 7.548 3.953l.402-.05V77.05h-.752c-3.375 0-6.996-1.923-7.364-3.912-.164-.88.147-1.615.728-1.724.205-.039.3-.122.466-.406.268-.458.95-1.178 1.416-1.493.275-.187.334-.258.242-.293-1.777 1.084-4.464 1.556-6.418.756-.386-.17-.36-.089.036.113 1.209.617 3.316.694 4.581.169.514-.214.583.053.073.279-2.037.9-5.403.127-6.157-1.415-.657-1.343-.2-2.285 1.867-3.854 1.36-1.033 2.362-2.023 3.138-3.102.807-1.122 1.218-1.603 1.569-1.835l.294-.195-.046-.424-.046-.423.517-.378c.689-.504 1.085-.867 1.085-.994 0-.367.21-.047.244.37.165 2.052 4.552 4.398 7.537 4.031l.398-.049V60.11l-1.117-.046c-2.575-.105-5.2-1.236-6.414-2.762-.84-1.056-.776-2.524.124-2.817.278-.09.377-.173.512-.427.238-.449.831-1.09 1.317-1.425.927-.641.93-.646 1.83-1.059.895-.414 1.73-.68 2.603-.83 1.068-.186 1.08-.183 1.902-.16.973.025 1.745.166 2.712.495.367.125.67.19.694.151.108-.173.807-.229 2.293-.182 2.05.065 2.522-.06 4.014-1.055l.587-.391v-.385c0-.454.016-.476.785-1.095.89-.715 1.199-.797 1.858-.49.224.105.416.181.425.17l.589-.82c.532-.743.988-1.235 1.396-1.51l.17-.114-.077-.33c-.083-.358-.04-.615.104-.62.148-.006 1.295-.936 1.376-1.116.157-.353.341-.154.341.369 0 1.81 3.887 3.928 7.214 3.93l.738.001v-2.272h-.898c-3.385 0-6.973-1.994-7.252-4.03-.11-.807.275-1.574.791-1.574.165 0 .239-.068.392-.358.238-.45.931-1.197 1.422-1.532.859-.6.863-.603 1.705-.974 1.04-.46 1.868-.725 2.667-.851.333-.053.622-.12.643-.148.183-.25 3.163.16 4.301.593.303.115.395.127.395.05 0-.17.446-.225 1.514-.188 2.696.093 3.42-.076 4.865-1.138l.51-.374-.046-.228c-.075-.372.1-.64.755-1.157.784-.62.87-.663 1.318-.663h.368l3.14 1.776c3.417 1.932 3.405 1.923 3.401 2.579-.002.458-.024.488-.817 1.122-.705.563-1.086.72-1.47.607l-.247-.073-.417.311c-1.675 1.254-2.27 1.432-4.809 1.437l-1.893.004-.318.215a2.808 2.808 0 00-.593.616l-.276.4.13.252c.072.138.18.302.243.364.087.087.102.218.066.561-.074.71-.144.79-.893 1.04-.778.259-1.35.518-1.35.612 0 .037-.035.067-.077.067-.042 0-.218.103-.39.228a2.744 2.744 0 01-.691.34c-.653.194-3.458 1.77-4.734 2.66-.263.182-.508.332-.546.332-.038 0-.199.14-.356.31-.312.337-.767.627-1.11.707-.12.027-.443.23-.72.45l-.502.4-1.173-.053-1.172-.054-.098.123c-.054.068-.378.516-.72.995-.382.535-1.003 1.251-1.608 1.858l-.985.987.675-.291c.75-.325 1.787-.622 2.449-.704.24-.03.452-.076.473-.104.181-.243 3.113.15 4.148.557.373.146.46.158.517.07.123-.189.904-.255 2.036-.174 1.95.14 2.803-.077 4.262-1.083l.549-.378v-.784l.246-.23c1.125-1.045 1.745-1.289 2.404-.945.415.216.372.24.87-.464.643-.908 1.04-1.357 1.39-1.572.191-.117.298-.233.279-.303-.19-.692-.196-.68.745-1.363.316-.23.617-.51.67-.625.183-.393.362-.222.365.347.01 1.814 3.815 3.913 7.093 3.913h.857v-2.244l-.454.033c-2.772.2-6.62-1.532-7.48-3.367-.491-1.049-.13-2.298.662-2.298.087 0 .18-.06.207-.133.194-.53.943-1.352 1.674-1.836.638-.447.642-.449 1.537-.862a10.8 10.8 0 012.614-.846c.37-.07.69-.151.71-.183.147-.22 2.962.146 4.036.527l.613.217.093-.127.093-.127 1.994-.006c2.419-.007 2.597-.053 4.124-1.062l.616-.407-.04-.346-.038-.346.372-.355c1.114-1.065 1.632-1.264 2.342-.902.205.105 1.669.925 3.251 1.821 3.111 1.763 3.057 1.72 3.064 2.373.005.465-.026.508-.807 1.125-.785.62-.923.68-1.443.62l-.352-.039-.307.247c-.523.42-1.574 1.02-2.165 1.235l-.565.205h-1.969c-2.336.002-2.383.018-3.06 1.005l-.168.246.242.453.242.454-.05.383c-.085.633-.141.696-.827.919-.825.268-1.602.635-1.709.806-.074.12-.774.47-.937.47-.187 0-.9.382-.872.467.011.034 1.195 1.356 2.63 2.937l2.61 2.874.286-.162c.158-.088.305-.22.328-.292.1-.316 1.014-.471 1.524-.258.465.194.794.15 1.08-.144.438-.453.601-.427 1.85.294l.74.427.81-.429c1.712-.906 2.593-1.477 2.512-1.629-.27-.505-.06-.831.95-1.476l.798-.508.358.035c.55.055 6.037 3.173 6.15 3.495.21.604.04.858-1.021 1.523l-.682.428-.379-.03a2.433 2.433 0 01-.606-.127l-.227-.096-.733.462c-2.79 1.76-4.27 2.357-4.892 1.978-.32-.195-.37-.19-.427.038-.026.104-.08.19-.121.19-.041 0-.075.18-.075.403 0 .518.013.507-1.812 1.573-1.27.742-1.513.858-1.78.848-.17-.006-.433.02-.585.06-.236.06-.368.034-.909-.184l-.632-.255-.09.34c-.345 1.312-1.54 2.557-2.75 2.864-1.32.335-3.886-.41-4.914-1.426l-.327-.324.033-.34c.067-.693.275-.993 1.091-1.573 1.083-.771 1.427-1.278 1.617-2.385.152-.89.623-1.647 1.024-1.647.08 0 .112-.081.111-.284v-.284l-2.69-2.953c-1.479-1.625-2.73-2.943-2.781-2.93-.14.035-1.922 1.16-2.15 1.357-.11.095-.Line truncated
/>
></path>
</g>
</svg>
);
@@ -0,0 +1,25 @@
import classNames from 'classnames';
export function UploadFolderIcon({
width = 24,
isDragging = false,
}: {
width?: number;
isDragging?: boolean;
}) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 5.5499997 4.7600007"
width={width}
fill="currentColor"
className={classNames('transition-transform', isDragging && 'scale-150')}
>
<path
fill-rule="evenodd"
d="m 4.76,4.76 c 0.44,0 0.79,-0.36 0.79,-0.79 v -2.39 c 0,-0.44 -0.36,-0.79 -0.79,-0.79 H 3.34 c -0.05,0 -0.1,-0.02 -0.14,-0.06 L 2.64,0.17 C 2.53,0.06 2.38,0 2.22,0 H 0.79 C 0.35,0 0,0.36 0,0.79 V 3.97 C 0,4.41 0.36,4.76 0.79,4.76 Z M 2.58,3.71 c 0,0.26 0.4,0.26 0.4,0 V 2.6 L 3.44,3.06 C 3.63,3.23 3.89,2.97 3.72,2.78 L 2.93,1.99 c -0.08,-0.08 -0.2,-0.08 -0.28,0 L 1.86,2.78 C 1.65,2.97 1.95,3.26 2.14,3.06 L 2.6,2.6 Z"
clip-rule="evenodd"
/>
</svg>
);
}
@@ -16,7 +16,7 @@ export function UpperArmIcon({
<path
transform={flipped ? undefined : 'scale(-1,1) translate(-50,0)'}
d="M47.625 12.219c-.171-.137-8.614-8.622-8.918-8.926a.999.999 0 0 0-1.414 0c-1.996 1.996-4.216 8.745-4.291 15.364-2.309 3.104-2.842 7.479-2.965 9.393-3.187.334-5.254 2.287-6.943 3.884-.81.765-1.573 1.486-2.359 1.96-1.967 1.183-4.493 2.413-5.596 2.937a14.019 14.019 0 0 0-1.657-1.082c-.947-.52-2.496-.683-3.151-.73l-3.092-1.816A1.478 1.478 0 0 0 6.5 33 1.5 1.5 0 0 0 5 34.5c0 .35.082.689.629 1.236.597.597 1.101 1.14 2.976 3.014l-2.907 2.258H2a.998.998 0 0 0-.97 1.242l1 2.992a1 1 0 0 0 .651.706l2.973 1a1.015 1.015 0 0 0 .483.038l6.027-1a.988.988 0 0 0 .436-.187l3.946-2.959c.428-.233 3.692-1.952 8.755-2.856 5.89-1.052 9.31-2.796 10.608-3.565.058-.018.116-.033.176-.051.684-.192 1.716-.483 2.495-2.046.334-.669.54-1.318.74-1.947.325-1.022.605-1.906 1.378-2.659C46.089 24.46 48 20.085 48 13a.997.997 0 0 0-.375-.781z"
/>
></path>
</svg>
);
}
@@ -7,7 +7,7 @@ export function UpperChestIcon({ width = 24 }: { width?: number }) {
width={width}
viewBox="0 0 50 50"
>
<path d="M 20 2 C 18.156 2 16.700141 3.1345312 15.619141 4.0195312 C 12.698141 4.2755313 4 7.245 4 15 C 4 17.305 4.551 19.068203 4.875 19.908203 C 4.262 20.969203 3 23.679 3 28 C 3 28.352 3.184375 28.677422 3.484375 28.857422 L 8.484375 31.857422 C 8.835375 32.068422 9.2804219 32.044922 9.6074219 31.794922 C 10.290422 31.270922 10.833578 30.512578 11.267578 29.642578 C 11.118578 28.880578 11 28.05 11 27 L 11 21 C 11 20.448 11.448 20 12 20 C 12.43 20 12.790641 20.27425 12.931641 20.65625 C 12.944641 20.68425 12.982 20.797656 13 20.847656 C 13.197 21.404656 14.365 24 19 24 C 23.133 24 23.984531 19.976687 24.019531 19.804688 C 24.113531 19.329687 24.535 19.018531 25 19.019531 C 25.465 19.019531 25.886469 19.330687 25.980469 19.804688 C 26.015469 19.976687 26.867 24 31 24 C 35.635 24 36.803 21.405656 37 20.847656 C 37.018 20.797656 37.055359 20.68425 37.068359 20.65625 C 37.209359 20.27525 37.57 20 38 20 C 38.552 20 39 20.448 39 21 L 39 27 C 39 28.05 38.881422 28.881578 38.732422 29.642578 C 39.166422 30.513578 39.709578 31.269969 40.392578 31.792969 C 40.719578 32.042969 41.164625 32.066469 41.515625 31.855469 L 46.515625 28.855469 C 46.815625 28.676469 47 28.352 47 28 C 47 23.679 45.738 20.969203 45.125 19.908203 C 45.449 19.068203 46 17.305 46 15 C 46 7.245 37.301859 4.2755312 34.380859 4.0195312 C 33.299859 3.1345312 31.844 2 30 2 L 25 2 L 20 2 z M 25 22.609375 C 23.953 24.323375 22.059 26 19 26 C 16.075 26 14.195 25.130766 13 24.134766 L 13 27 C 13 28.281 13.194875 29.155016 13.421875 30.166016 C 13.692875 31.375016 14 32.746 14 35 C 14 35.027 13.987375 35.049172 13.984375 35.076172 C 13.994375 35.366172 14 35.669 14 36 L 14 42 C 14 44.997 18.628641 47.438484 19.556641 47.896484 C 19.693641 47.965484 19.847 48 20 48 L 25 48 L 30 48 C 30.153 48 30.306359 47.965484 30.443359 47.896484 C 31.371359 47.438484 36 44.997 36 42 L 36 36 C 36 35.669 36.005625 35.366172 36.015625 35.076172 C 36.012625 35.049172 36 35.027 36 35 C 36 32.746 36.307125 31.375016 36.578125 30.166016 C 36.805125 29.155016 37 28.281 37 27 L 37 24.134766 C 35.805 25.130766 33.925 26 31 26 C 27.941 26 26.047 24.323375 25 22.609375 z" />
<path d="M 20 2 C 18.156 2 16.700141 3.1345312 15.619141 4.0195312 C 12.698141 4.2755313 4 7.245 4 15 C 4 17.305 4.551 19.068203 4.875 19.908203 C 4.262 20.969203 3 23.679 3 28 C 3 28.352 3.184375 28.677422 3.484375 28.857422 L 8.484375 31.857422 C 8.835375 32.068422 9.2804219 32.044922 9.6074219 31.794922 C 10.290422 31.270922 10.833578 30.512578 11.267578 29.642578 C 11.118578 28.880578 11 28.05 11 27 L 11 21 C 11 20.448 11.448 20 12 20 C 12.43 20 12.790641 20.27425 12.931641 20.65625 C 12.944641 20.68425 12.982 20.797656 13 20.847656 C 13.197 21.404656 14.365 24 19 24 C 23.133 24 23.984531 19.976687 24.019531 19.804688 C 24.113531 19.329687 24.535 19.018531 25 19.019531 C 25.465 19.019531 25.886469 19.330687 25.980469 19.804688 C 26.015469 19.976687 26.867 24 31 24 C 35.635 24 36.803 21.405656 37 20.847656 C 37.018 20.797656 37.055359 20.68425 37.068359 20.65625 C 37.209359 20.27525 37.57 20 38 20 C 38.552 20 39 20.448 39 21 L 39 27 C 39 28.05 38.881422 28.881578 38.732422 29.642578 C 39.166422 30.513578 39.709578 31.269969 40.392578 31.792969 C 40.719578 32.042969 41.164625 32.066469 41.515625 31.855469 L 46.515625 28.855469 C 46.815625 28.676469 47 28.352 47 28 C 47 23.679 45.738 20.969203 45.125 19.908203 C 45.449 19.068203 46 17.305 46 15 C 46 7.245 37.301859 4.2755312 34.380859 4.0195312 C 33.299859 3.1345312 31.844 2 30 2 L 25 2 L 20 2 z M 25 22.609375 C 23.953 24.323375 22.059 26 19 26 C 16.075 26 14.195 25.130766 13 24.134766 L 13 27 C 13 28.281 13.194875 29.155016 13.421875 30.166016 C 13.692875 31.375016 14 32.746 14 35 C 14 35.027 13.987375 35.049172 13.984375 35.076172 C 13.994375 35.366172 14 35.669 14 36 L 14 42 C 14 44.997 18.628641 47.438484 19.556641 47.896484 C 19.693641 47.965484 19.847 48 20 48 L 25 48 L 30 48 C 30.153 48 30.306359 47.965484 30.443359 47.896484 C 31.371359 47.438484 36 44.997 36 42 L 36 36 C 36 35.669 36.005625 35.366172 36.015625 35.076172 C 36.012625 35.049172 36 35.027 36 35 C 36 32.746 36.307125 31.375016 36.578125 30.166016 C 36.805125 29.155016 37 28.281 37 27 L 37 24.134766 C 35.805 25.130766 33.925 26 31 26 C 27.941 26 26.047 24.323375 25 22.609375 z"></path>
</svg>
);
}
@@ -16,7 +16,7 @@ export function UpperLegIcon({
<path
transform={flipped ? 'scale(-1,1) translate(-50,0)' : undefined}
d="M42.727.059a.998.998 0 0 0-.774.043A1.042 1.042 0 0 0 41.516 0H24.313c-.04 0-.079.016-.118.02a.972.972 0 0 0-.8.238c-2.407 2.172-5.836 7.715-6.793 11.773-2.012 2.281-2.11 4.774-.313 7.828.617 1.043.746 2.262.895 3.676.086.8.171 1.625.355 2.492.29 1.325.883 2.637 1.453 3.907.32.707.621 1.37.863 2.02.29.78.618 1.605.95 2.437.797 2.004 1.789 4.5 2.144 6.28.082 1.087-.012 2-.367 2.638-1.227 2.18-2.941 1.793-4.988 2.664-2.153.922-3.508 1.32-4.32 1.472-2.07.387-1.864.57-1.864.934 0 .113.016.219.035.324.168.766.922 1.3 1.77 1.3.156 0 .32-.015.48-.038a3.2 3.2 0 0 0 1.086-.352c.09.063.188.102.285.149.493.234 1.028.27 1.618.27 2.011 0 3.293-.063 4.207-.15 1.511-.14 2.02-.331 3.074-.378.152-.008.316-.012.504-.012.898 0 2.734.54 4.84.54.562 0 1.02-.114 1.394-.298 1.024-.496 1.399-1.543 1.399-2.48 0-1.566-1.063-2.547-2.04-5.121-.44-1.328-.91-3.035-1.253-5.418-.047-.344-.075-.668-.106-.996l-.047-.602c-.164-2.992.45-5.394.965-7.37.43-1.653.8-3.083.594-4.4-.473-3.015-1.781-4.863-2.563-5.964-.148-.207-.32-.453-.414-.61.223-.484 1.043-1.53 2.39-2.168 2.15-1.015 11.349-6.57 13.712-13.27A1.007 1.007 0 0 0 42.727.06Z"
/>
></path>
</svg>
);
}
@@ -7,7 +7,7 @@ export function WaistIcon({ width = 24 }: { width?: number }) {
width={width}
viewBox="0 0 72 72"
>
<path d="M17 2c-.3 0-.6.2-.8.4-.2.3-.3.7-.2 1 2.9 7.1 3.1 15.3.6 22.4-.6 2-1.5 3.9-2.4 5.7-.1.2-.2.5-.3.7 13.2 4.2 26.7 4.1 40.2-.1-.6-1.4-1.9-3.9-2.7-6.3-2.5-7.1-2.3-15.3.6-22.4.1-.3.1-.7-.1-.9-.2-.3-.5-.5-.9-.5H17zM9.863 14.75a.944.944 0 0 0-.664.35c-.4.4-.298 1.1.102 1.4l2.1 1.8H3.9c-.5.1-1 .6-1 1.1 0 .6.4 1 1 1h7.5l-2.1 1.8c-.4.4-.502 1-.102 1.4.4.4 1 .5 1.4.1 1.6-1.3 4.002-3.4 4.202-3.6.4-.4.5-1 0-1.5-.2-.2-3.201-2.7-4.201-3.6a.908.908 0 0 0-.737-.25zm48.237.1a.846.846 0 0 0-.7.25c-1 .9-3.9 3.3-4.2 3.6-.4.4-.4 1.1 0 1.5.2.2 3.2 2.7 4.2 3.6.4.4 1 .3 1.4-.1.4-.4.3-1.1-.1-1.4l-2.1-1.8h7.5c.6 0 1-.4 1-1s-.4-1-1-1h-7.5l2.1-1.8c.4-.4.4-1.1.1-1.5-.2-.2-.45-.325-.7-.35zm-3 19.45c-14.2 4.6-28.4 4.6-42.2.1-.5 1.1-1 2.3-1.4 3.5-.1.4-.3.8-.4 1.2 8.4 1.7 15.9 7 22.1 15.8 6.4-9.3 14.5-14.8 23.6-16.1l-.3-.9c-.4-1.2-.9-2.4-1.4-3.6zm2.3 6.8c-8.9 1.2-16.8 6.8-23 16.3V66h17.5c.3 0 .6-.2.8-.4 4.8-7.1 6.5-16.2 4.7-24.5zm-46.8.2c-1.7 8.3 0 17.3 4.7 24.3.2.3.5.4.8.4h16.2v-8.4s0-.1-.1-.1c-6-9.2-13.3-14.6-21.6-16.2z" />
<path d="M17 2c-.3 0-.6.2-.8.4-.2.3-.3.7-.2 1 2.9 7.1 3.1 15.3.6 22.4-.6 2-1.5 3.9-2.4 5.7-.1.2-.2.5-.3.7 13.2 4.2 26.7 4.1 40.2-.1-.6-1.4-1.9-3.9-2.7-6.3-2.5-7.1-2.3-15.3.6-22.4.1-.3.1-.7-.1-.9-.2-.3-.5-.5-.9-.5H17zM9.863 14.75a.944.944 0 0 0-.664.35c-.4.4-.298 1.1.102 1.4l2.1 1.8H3.9c-.5.1-1 .6-1 1.1 0 .6.4 1 1 1h7.5l-2.1 1.8c-.4.4-.502 1-.102 1.4.4.4 1 .5 1.4.1 1.6-1.3 4.002-3.4 4.202-3.6.4-.4.5-1 0-1.5-.2-.2-3.201-2.7-4.201-3.6a.908.908 0 0 0-.737-.25zm48.237.1a.846.846 0 0 0-.7.25c-1 .9-3.9 3.3-4.2 3.6-.4.4-.4 1.1 0 1.5.2.2 3.2 2.7 4.2 3.6.4.4 1 .3 1.4-.1.4-.4.3-1.1-.1-1.4l-2.1-1.8h7.5c.6 0 1-.4 1-1s-.4-1-1-1h-7.5l2.1-1.8c.4-.4.4-1.1.1-1.5-.2-.2-.45-.325-.7-.35zm-3 19.45c-14.2 4.6-28.4 4.6-42.2.1-.5 1.1-1 2.3-1.4 3.5-.1.4-.3.8-.4 1.2 8.4 1.7 15.9 7 22.1 15.8 6.4-9.3 14.5-14.8 23.6-16.1l-.3-.9c-.4-1.2-.9-2.4-1.4-3.6zm2.3 6.8c-8.9 1.2-16.8 6.8-23 16.3V66h17.5c.3 0 .6-.2.8-.4 4.8-7.1 6.5-16.2 4.7-24.5zm-46.8.2c-1.7 8.3 0 17.3 4.7 24.3.2.3.5.4.8.4h16.2v-8.4s0-.1-.1-.1c-6-9.2-13.3-14.6-21.6-16.2z"></path>
</svg>
);
}
@@ -1,12 +1,12 @@
export function WarningIcon({ width, className, ...props }: any) {
export function WarningIcon(props: any) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
{...props}
width={width || 30}
className={`${className || ''}`}
width={props.width || 30}
className={`${props.className || ''}`}
>
<path
fillRule="evenodd"
+1 -1
View File
@@ -21,7 +21,7 @@ export function WifiIcon({
const y = useMemo(() => (1 - percent) * 13, [percent]);
const col = useMemo(() => {
const colorsMap: Record<number, string> = {
const colorsMap: { [key: number]: string } = {
0.4: 'fill-status-success',
0.2: 'fill-status-warning',
0: 'fill-status-critical',
@@ -30,7 +30,7 @@ function IMUCard({
}: {
imuTypes: Imudto[];
hasIntPin: boolean;
control: Control<{ imus: CreateImuConfigDTO[] }>;
control: Control<{ imus: CreateImuConfigDTO[] }, any>;
index: number;
onDelete: () => void;
}) {
@@ -50,7 +50,7 @@ function IMUCard({
<div className={'w-full flex flex-col gap-2'}>
<div className="grid xs-settings:grid-cols-2 mobile-settings:grid-cols-1 gap-3 fill-background-10">
<label className="flex flex-col justify-end gap-1">
<Localized id="firmware_tool-add_imus_step-imu_type-label" />
<Localized id="firmware_tool-add_imus_step-imu_type-label"></Localized>
<Dropdown
control={control}
name={`imus[${index}].type`}
@@ -65,7 +65,7 @@ function IMUCard({
)}
direction="down"
display="block"
/>
></Dropdown>
</label>
<Localized
id="firmware_tool-add_imus_step-imu_rotation"
@@ -82,7 +82,7 @@ function IMUCard({
label="Rotation Degree"
placeholder="Rotation Degree"
autocomplete="off"
/>
></Input>
</Localized>
</div>
<div
@@ -104,7 +104,7 @@ function IMUCard({
name={`imus[${index}].sclPin`}
variant="primary"
autocomplete="off"
/>
></Input>
</Localized>
<Localized
id="firmware_tool-add_imus_step-sda_pin"
@@ -119,7 +119,7 @@ function IMUCard({
label="SDA Pin"
placeholder="SDA Pin"
autocomplete="off"
/>
></Input>
</Localized>
{hasIntPin && (
@@ -134,7 +134,7 @@ function IMUCard({
name={`imus[${index}].intPin`}
variant="primary"
autocomplete="off"
/>
></Input>
</Localized>
)}
<label className="flex flex-col justify-end gap-1 md:pt-3 sm:pt-3">
@@ -148,7 +148,7 @@ function IMUCard({
variant="toggle"
color="tertiary"
label=""
/>
></CheckBox>
</Localized>
</label>
</div>
@@ -156,7 +156,7 @@ function IMUCard({
</div>
<div className="flex flex-col items-center mt-[25px] fill-background-10">
<Button variant="quaternary" rounded onClick={onDelete}>
<TrashIcon size={15} />
<TrashIcon size={15}></TrashIcon>
</Button>
</div>
</div>
@@ -171,8 +171,8 @@ function IMUCard({
: 'firmware_tool-add_imus_step-show_more'
)}
</Typography>
{!open && <ArrowDownIcon />}
{open && <ArrowUpIcon />}
{!open && <ArrowDownIcon></ArrowDownIcon>}
{open && <ArrowUpIcon></ArrowUpIcon>}
</div>
</div>
);
@@ -237,71 +237,72 @@ 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}
// 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 className="flex flex-col w-full">
<div className="flex flex-col gap-4">
<Typography>
{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>
<div className="flex justify-center">
<Localized id="firmware_tool-add_imus_step-add_more">
<Button variant="primary" onClick={addImu} />
<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>
</Localized>
</div>
</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();
}}
/>
</>
)}
{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></Typography>
</Localized>
</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>
</div>
</>
);
}
+139 -137
View File
@@ -50,147 +50,149 @@ export function BoardPinsStep({
}, [defaultConfig]);
return (
<div className="flex flex-col w-full justify-between text-background-10">
<div className="flex flex-col gap-4">
<Typography color="secondary">
{l10n.getString('firmware_tool-board_pins_step-description')}
</Typography>
</div>
<div className="my-4 p-2">
{!isLoading && !isFetching && batteryTypes && (
<form className="flex flex-col gap-2">
<div className="grid xs-settings:grid-cols-2 mobile-settings:grid-cols-1 gap-2">
<label className="flex flex-col justify-end">
{/* Allows to have the right spacing at the top of the checkbox */}
<CheckBox
control={control}
color="tertiary"
name="enableLed"
variant="toggle"
outlined
label={l10n.getString(
'firmware_tool-board_pins_step-enable_led'
)}
/>
</label>
<Localized
id="firmware_tool-board_pins_step-led_pin"
attrs={{ placeholder: true, label: true }}
<>
<div className="flex flex-col w-full justify-between text-background-10">
<div className="flex flex-col gap-4">
<Typography>
{l10n.getString('firmware_tool-board_pins_step-description')}
</Typography>
</div>
<div className="my-4 p-2">
{!isLoading && !isFetching && batteryTypes && (
<form className="flex flex-col gap-2">
<div className="grid xs-settings:grid-cols-2 mobile-settings:grid-cols-1 gap-2">
<label className="flex flex-col justify-end">
{/* Allows to have the right spacing at the top of the checkbox */}
<CheckBox
control={control}
color="tertiary"
name="enableLed"
variant="toggle"
outlined
label={l10n.getString(
'firmware_tool-board_pins_step-enable_led'
)}
></CheckBox>
</label>
<Localized
id="firmware_tool-board_pins_step-led_pin"
attrs={{ placeholder: true, label: true }}
>
<Input
control={control}
rules={{ required: true }}
type="text"
name="ledPin"
variant="secondary"
disabled={!ledEnabled}
></Input>
</Localized>
</div>
<div
className={classNames(
batteryType === 'BAT_EXTERNAL' &&
'bg-background-80 p-2 rounded-md',
'transition-all duration-500 flex-col flex gap-2'
)}
>
<Input
<Dropdown
control={control}
rules={{ required: true }}
type="text"
name="ledPin"
variant="secondary"
disabled={!ledEnabled}
/>
name="batteryType"
variant="primary"
placeholder={l10n.getString(
'firmware_tool-board_pins_step-battery_type'
)}
direction="up"
display="block"
items={batteryTypes.map((battery) => ({
label: l10n.getString(
'firmware_tool-board_pins_step-battery_type-' + battery
),
value: battery,
}))}
></Dropdown>
{batteryType === 'BAT_EXTERNAL' && (
<div className="grid grid-cols-2 gap-2">
<Localized
id="firmware_tool-board_pins_step-battery_sensor_pin"
attrs={{ placeholder: true, label: true }}
>
<Input
control={control}
rules={{ required: true }}
type="text"
name="batteryPin"
variant="secondary"
></Input>
</Localized>
<Localized
id="firmware_tool-board_pins_step-battery_resistor"
attrs={{ placeholder: true, label: true }}
>
<Input
control={control}
rules={{ required: true, min: 0 }}
type="number"
name="batteryResistances[0]"
variant="secondary"
label="Battery Resistor"
placeholder="Battery Resistor"
></Input>
</Localized>
<Localized
id="firmware_tool-board_pins_step-battery_shield_resistor-0"
attrs={{ placeholder: true, label: true }}
>
<Input
control={control}
rules={{ required: true, min: 0 }}
type="number"
name="batteryResistances[1]"
variant="secondary"
></Input>
</Localized>
<Localized
id="firmware_tool-board_pins_step-battery_shield_resistor-1"
attrs={{ placeholder: true, label: true }}
>
<Input
control={control}
rules={{ required: true, min: 0 }}
type="number"
name="batteryResistances[2]"
variant="secondary"
></Input>
</Localized>
</div>
)}
</div>
</form>
)}
{(isLoading || isFetching) && (
<div className="flex justify-center flex-col items-center gap-3 h-44">
<LoaderIcon slimeState={SlimeState.JUMPY}></LoaderIcon>
<Localized id="firmware_tool-loading">
<Typography></Typography>
</Localized>
</div>
<div
className={classNames(
batteryType === 'BAT_EXTERNAL' &&
'bg-background-80 p-2 rounded-md',
'transition-all duration-500 flex-col flex gap-2'
)}
>
<Dropdown
control={control}
name="batteryType"
variant="primary"
placeholder={l10n.getString(
'firmware_tool-board_pins_step-battery_type'
)}
direction="up"
display="block"
items={batteryTypes.map((battery) => ({
label: l10n.getString(
`firmware_tool-board_pins_step-battery_type-${battery}`
),
value: battery,
}))}
/>
{batteryType === 'BAT_EXTERNAL' && (
<div className="grid grid-cols-2 gap-2">
<Localized
id="firmware_tool-board_pins_step-battery_sensor_pin"
attrs={{ placeholder: true, label: true }}
>
<Input
control={control}
rules={{ required: true }}
type="text"
name="batteryPin"
variant="secondary"
/>
</Localized>
<Localized
id="firmware_tool-board_pins_step-battery_resistor"
attrs={{ placeholder: true, label: true }}
>
<Input
control={control}
rules={{ required: true, min: 0 }}
type="number"
name="batteryResistances[0]"
variant="secondary"
label="Battery Resistor"
placeholder="Battery Resistor"
/>
</Localized>
<Localized
id="firmware_tool-board_pins_step-battery_shield_resistor-0"
attrs={{ placeholder: true, label: true }}
>
<Input
control={control}
rules={{ required: true, min: 0 }}
type="number"
name="batteryResistances[1]"
variant="secondary"
/>
</Localized>
<Localized
id="firmware_tool-board_pins_step-battery_shield_resistor-1"
attrs={{ placeholder: true, label: true }}
>
<Input
control={control}
rules={{ required: true, min: 0 }}
type="number"
name="batteryResistances[2]"
variant="secondary"
/>
</Localized>
</div>
)}
</div>
</form>
)}
{(isLoading || isFetching) && (
<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 className="flex justify-between">
<Localized id="firmware_tool-previous_step">
<Button variant="tertiary" onClick={prevStep}></Button>
</Localized>
<Localized id="firmware_tool-ok">
<Button
variant="primary"
disabled={Object.keys(formState.errors).length !== 0}
onClick={() => {
updatePins(formValue);
nextStep();
}}
></Button>
</Localized>
</div>
</div>
<div className="flex justify-between">
<Localized id="firmware_tool-previous_step">
<Button variant="tertiary" onClick={prevStep} />
</Localized>
<Localized id="firmware_tool-ok">
<Button
variant="primary"
disabled={Object.keys(formState.errors).length !== 0}
onClick={() => {
updatePins(formValue);
nextStep();
}}
/>
</Localized>
</div>
</div>
</>
);
}
+42 -41
View File
@@ -10,7 +10,6 @@ import {
import { useEffect, useMemo } from 'react';
import { firmwareToolBaseUrl } from '@/firmware-tool-api/firmwareToolFetcher';
import { Button } from '@/components/commons/Button';
import { error } from '@/utils/logging';
export function BuildStep({
isActive,
@@ -43,7 +42,7 @@ export function BuildStep({
};
}
} catch (e) {
error(e);
console.error(e);
setBuildStatus({ id: '', status: 'ERROR' });
}
};
@@ -66,45 +65,47 @@ export function BuildStep({
);
return (
<div className="flex flex-col w-full">
<div className="flex flex-grow flex-col gap-4">
<Typography color="secondary">
{l10n.getString('firmware_tool-build_step-description')}
</Typography>
<>
<div className="flex flex-col w-full">
<div className="flex flex-grow flex-col gap-4">
<Typography>
{l10n.getString('firmware_tool-build_step-description')}
</Typography>
</div>
<div className="my-4">
{!isGlobalLoading && (
<div className="flex justify-center flex-col items-center gap-3 h-44">
<LoaderIcon
slimeState={
buildStatus.status !== 'ERROR'
? SlimeState.JUMPY
: SlimeState.SAD
}
></LoaderIcon>
<Typography variant="section-title">
{l10n.getString('firmware_tool-build-' + buildStatus.status)}
</Typography>
</div>
)}
{isGlobalLoading && (
<div className="flex justify-center flex-col items-center gap-3 h-44">
<LoaderIcon slimeState={SlimeState.JUMPY}></LoaderIcon>
<Localized id="firmware_tool-loading">
<Typography></Typography>
</Localized>
</div>
)}
</div>
<div className="flex justify-end">
<Localized id="firmware_tool-retry">
<Button
variant="secondary"
disabled={hasPendingBuild}
onClick={() => goTo('FlashingMethod')}
></Button>
</Localized>
</div>
</div>
<div className="my-4">
{!isGlobalLoading && (
<div className="flex justify-center flex-col items-center gap-3 h-44">
<LoaderIcon
slimeState={
buildStatus.status !== 'ERROR'
? SlimeState.JUMPY
: SlimeState.SAD
}
/>
<Typography variant="section-title" color="secondary">
{l10n.getString(`firmware_tool-build-${buildStatus.status}`)}
</Typography>
</div>
)}
{isGlobalLoading && (
<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 className="flex justify-end">
<Localized id="firmware_tool-retry">
<Button
variant="secondary"
disabled={hasPendingBuild}
onClick={() => goTo('FlashingMethod')}
/>
</Localized>
</div>
</div>
</>
);
}
@@ -98,18 +98,18 @@ export function DeviceCardControl({
checked={value || false}
type="checkbox"
disabled={disabled}
/>
></input>
</div>
<div className="w-full">
<DeviceCardContent {...props} />
<DeviceCardContent {...props}></DeviceCardContent>
</div>
</label>
)}
/>
></Controller>
) : (
<div className="px-2 h-full">
<DeviceCardContent {...props} />
<DeviceCardContent {...props}></DeviceCardContent>
</div>
)}
<div
@@ -126,7 +126,7 @@ export function DeviceCardControl({
bottom
height={6}
colorClass="bg-accent-background-20"
/>
></ProgressBar>
</div>
{online !== null && (
<div className="absolute top-2 right-2">
@@ -134,7 +134,7 @@ export function DeviceCardControl({
status={
online ? TrackerStatusEnum.OK : TrackerStatusEnum.DISCONNECTED
}
/>
></TrackerStatus>
</div>
)}
</div>
@@ -5,19 +5,19 @@ import {
FirmwareToolContextC,
useFirmwareToolContext,
} from '@/hooks/firmware-tool';
import VerticalStepper from '@/components/commons/VerticalStepper';
import { LoaderIcon, SlimeState } from '@/components/commons/icon/LoaderIcon';
import { Button } from '@/components/commons/Button';
import { FirmwareUpdateMethod } from 'solarxr-protocol';
import { useMemo } from 'react';
import { AddImusStep } from './AddImusStep';
import { SelectBoardStep } from './SelectBoardStep';
import { BoardPinsStep } from './BoardPinsStep';
import VerticalStepper from '@/components/commons/VerticalStepper';
import { LoaderIcon, SlimeState } from '@/components/commons/icon/LoaderIcon';
import { Button } from '@/components/commons/Button';
import { SelectFirmwareStep } from './SelectFirmwareStep';
import { BuildStep } from './BuildStep';
import { FlashingMethodStep } from './FlashingMethodStep';
import { FlashingStep } from './FlashingStep';
import { FlashBtnStep } from './FlashBtnStep';
import { FirmwareUpdateMethod } from 'solarxr-protocol';
import { useMemo } from 'react';
function FirmwareToolContent() {
const { l10n } = useLocalization();
@@ -80,39 +80,38 @@ function FirmwareToolContent() {
{l10n.getString('firmware_tool')}
</Typography>
<div className="flex flex-col pt-2 pb-4">
{l10n
.getString('firmware_tool-description')
.split('\n')
.map((line, i) => (
// eslint-disable-next-line react/no-array-index-key
<Typography color="secondary" key={i}>
{line}
</Typography>
))}
<>
{l10n
.getString('firmware_tool-description')
.split('\n')
.map((line, i) => (
<Typography key={i}>{line}</Typography>
))}
</>
</div>
<div className="m-4 h-full">
{isError && (
<div className="w-full flex flex-col justify-center items-center gap-3 h-full">
<LoaderIcon slimeState={SlimeState.SAD} />
<LoaderIcon slimeState={SlimeState.SAD}></LoaderIcon>
{!isCompatible ? (
<Localized id="firmware_tool-not_compatible">
<Typography variant="section-title" />
<Typography variant="section-title"></Typography>
</Localized>
) : (
<Localized id="firmware_tool-not_available">
<Typography variant="section-title" />
<Typography variant="section-title"></Typography>
</Localized>
)}
<Localized id="firmware_tool-retry">
<Button variant="primary" onClick={retry} />
<Button variant="primary" onClick={retry}></Button>
</Localized>
</div>
)}
{isLoading && (
<div className="w-full flex flex-col justify-center items-center gap-3 h-full">
<LoaderIcon slimeState={SlimeState.JUMPY} />
<LoaderIcon slimeState={SlimeState.JUMPY}></LoaderIcon>
<Localized id="firmware_tool-loading">
<Typography variant="section-title" />
<Typography variant="section-title"></Typography>
</Localized>
</div>
)}
@@ -19,64 +19,68 @@ export function FlashBtnStep({
const { defaultConfig } = useFirmwareTool();
return (
<div className="flex flex-col w-full">
<div className="flex flex-grow flex-col gap-4">
<Typography color="secondary">
{l10n.getString('firmware_tool-flashbtn_step-description')}
</Typography>
{defaultConfig?.boardConfig.type ===
boardTypeToFirmwareToolBoardType[BoardType.SLIMEVR] ? (
<>
<Typography variant="standard" whitespace="whitespace-pre">
{l10n.getString('firmware_tool-flashbtn_step-board_SLIMEVR')}
</Typography>
<div className="gap-2 grid lg:grid-cols-3 md:grid-cols-2 mobile:grid-cols-1">
<div className="bg-background-80 p-2 rounded-lg gap-2 flex flex-col justify-between">
<Typography variant="main-title">R11</Typography>
<Typography variant="standard">
{l10n.getString(
'firmware_tool-flashbtn_step-board_SLIMEVR-r11'
)}
</Typography>
<img src="/images/R11_board_reset.webp" />
</div>
<div className="bg-background-80 p-2 rounded-lg gap-2 flex flex-col justify-between">
<Typography variant="main-title">R12</Typography>
<Typography variant="standard">
{l10n.getString(
'firmware_tool-flashbtn_step-board_SLIMEVR-r12'
)}
</Typography>
<img src="/images/R12_board_reset.webp" />
</div>
<div className="bg-background-80 p-2 rounded-lg gap-2 flex flex-col justify-between">
<Typography variant="main-title">R14</Typography>
<Typography variant="standard">
{l10n.getString(
'firmware_tool-flashbtn_step-board_SLIMEVR-r14'
)}
</Typography>
<img src="/images/R14_board_reset_sw.webp" />
</div>
</div>
</>
) : (
<Typography variant="standard" whitespace="whitespace-pre">
{l10n.getString('firmware_tool-flashbtn_step-board_OTHER')}
<>
<div className="flex flex-col w-full">
<div className="flex flex-grow flex-col gap-4">
<Typography>
{l10n.getString('firmware_tool-flashbtn_step-description')}
</Typography>
)}
<div className="flex justify-end">
<Localized id="firmware_tool-next_step">
<Button
variant="primary"
onClick={() => {
nextStep();
}}
/>
</Localized>
{defaultConfig?.boardConfig.type ===
boardTypeToFirmwareToolBoardType[BoardType.SLIMEVR] ? (
<>
<Typography variant="standard" whitespace="whitespace-pre">
{l10n.getString('firmware_tool-flashbtn_step-board_SLIMEVR')}
</Typography>
<div className="gap-2 grid lg:grid-cols-3 md:grid-cols-2 mobile:grid-cols-1">
<div className="bg-background-80 p-2 rounded-lg gap-2 flex flex-col justify-between">
<Typography variant="main-title">R11</Typography>
<Typography variant="standard">
{l10n.getString(
'firmware_tool-flashbtn_step-board_SLIMEVR-r11'
)}
</Typography>
<img src="/images/R11_board_reset.webp"></img>
</div>
<div className="bg-background-80 p-2 rounded-lg gap-2 flex flex-col justify-between">
<Typography variant="main-title">R12</Typography>
<Typography variant="standard">
{l10n.getString(
'firmware_tool-flashbtn_step-board_SLIMEVR-r12'
)}
</Typography>
<img src="/images/R12_board_reset.webp"></img>
</div>
<div className="bg-background-80 p-2 rounded-lg gap-2 flex flex-col justify-between">
<Typography variant="main-title">R14</Typography>
<Typography variant="standard">
{l10n.getString(
'firmware_tool-flashbtn_step-board_SLIMEVR-r14'
)}
</Typography>
<img src="/images/R14_board_reset_sw.webp"></img>
</div>
</div>
</>
) : (
<>
<Typography variant="standard" whitespace="whitespace-pre">
{l10n.getString('firmware_tool-flashbtn_step-board_OTHER')}
</Typography>
</>
)}
<div className="flex justify-end">
<Localized id="firmware_tool-next_step">
<Button
variant="primary"
onClick={() => {
nextStep();
}}
></Button>
</Localized>
</div>
</div>
</div>
</div>
</>
);
}
@@ -26,11 +26,11 @@ import { Button } from '@/components/commons/Button';
import { Input } from '@/components/commons/Input';
import { Dropdown } from '@/components/commons/Dropdown';
import { useOnboarding } from '@/hooks/onboarding';
import { DeviceCardControl } from './DeviceCard';
import { getTrackerName } from '@/hooks/tracker';
import { ObjectSchema, object, string } from 'yup';
import { useAtomValue } from 'jotai';
import { devicesAtom } from '@/store/app-store';
import { DeviceCardControl } from './DeviceCard';
interface FlashingMethodForm {
flashingMethod?: string;
@@ -40,7 +40,7 @@ interface FlashingMethodForm {
password?: string;
};
ota?: {
selectedDevices: Record<string, boolean>;
selectedDevices: { [key: string]: boolean };
};
}
@@ -129,7 +129,7 @@ function SerialDevicesList({
return (
<>
<Localized id="firmware_tool-flash_method_serial-wifi">
<Typography variant="section-title" />
<Typography variant="section-title"></Typography>
</Localized>
<div className="grid xs-settings:grid-cols-2 mobile-settings:grid-cols-1 gap-3 text-background-10">
<Localized
@@ -156,11 +156,11 @@ function SerialDevicesList({
</Localized>
</div>
<Localized id="firmware_tool-flash_method_serial-devices-label">
<Typography variant="section-title" />
<Typography variant="section-title"></Typography>
</Localized>
{Object.keys(devices).length === 0 ? (
<Localized id="firmware_tool-flash_method_serial-no_devices">
<Typography variant="standard" color="secondary" />
<Typography variant="standard"></Typography>
</Localized>
) : (
<Dropdown
@@ -175,7 +175,7 @@ function SerialDevicesList({
)}
display="block"
direction="down"
/>
></Dropdown>
)}
</>
);
@@ -270,11 +270,11 @@ function OTADevicesList({
return (
<>
<Localized id="firmware_tool-flash_method_ota-devices">
<Typography variant="section-title" />
<Typography variant="section-title"></Typography>
</Localized>
{devices.length === 0 && (
<Localized id="firmware_tool-flash_method_ota-no_devices">
<Typography color="secondary" />
<Typography></Typography>
</Localized>
)}
<div className="grid xs-settings:grid-cols-2 mobile-settings:grid-cols-1 gap-2">
@@ -284,7 +284,7 @@ function OTADevicesList({
key={device.id?.id ?? 0}
name={`ota.selectedDevices.id-${device.id?.id ?? 0}`}
deviceNames={deviceNames(device)}
/>
></DeviceCardControl>
))}
</div>
</>
@@ -344,78 +344,84 @@ export function FlashingMethodStep({
const flashingMethod = watch('flashingMethod');
return (
<div className="flex flex-col w-full">
<div className="flex flex-grow flex-col gap-4">
<Typography color="secondary">
{l10n.getString('firmware_tool-flash_method_step-description')}
</Typography>
</div>
<div className="my-4">
{!isGlobalLoading && (
<div className="flex flex-col gap-3">
<div className="grid xs-settings:grid-cols-2 mobile-settings:grid-cols-1 gap-3">
<Localized
id="firmware_tool-flash_method_step-ota"
attrs={{ label: true, description: true }}
>
<Radio
<>
<div className="flex flex-col w-full">
<div className="flex flex-grow flex-col gap-4">
<Typography>
{l10n.getString('firmware_tool-flash_method_step-description')}
</Typography>
</div>
<div className="my-4">
{!isGlobalLoading && (
<div className="flex flex-col gap-3">
<div className="grid xs-settings:grid-cols-2 mobile-settings:grid-cols-1 gap-3">
<Localized
id="firmware_tool-flash_method_step-ota"
attrs={{ label: true, description: true }}
>
<Radio
control={control}
name="flashingMethod"
value={FirmwareUpdateMethod.OTAFirmwareUpdate.toString()}
label=""
></Radio>
</Localized>
<Localized
id="firmware_tool-flash_method_step-serial"
attrs={{ label: true, description: true }}
>
<Radio
control={control}
name="flashingMethod"
value={FirmwareUpdateMethod.SerialFirmwareUpdate.toString()}
label=""
></Radio>
</Localized>
</div>
{flashingMethod ===
FirmwareUpdateMethod.SerialFirmwareUpdate.toString() && (
<SerialDevicesList
control={control}
name="flashingMethod"
value={FirmwareUpdateMethod.OTAFirmwareUpdate.toString()}
label=""
/>
</Localized>
<Localized
id="firmware_tool-flash_method_step-serial"
attrs={{ label: true, description: true }}
>
<Radio
watch={watch}
reset={reset}
></SerialDevicesList>
)}
{flashingMethod ===
FirmwareUpdateMethod.OTAFirmwareUpdate.toString() && (
<OTADevicesList
control={control}
name="flashingMethod"
value={FirmwareUpdateMethod.SerialFirmwareUpdate.toString()}
label=""
/>
watch={watch}
reset={reset}
></OTADevicesList>
)}
<div className="flex justify-between">
<Localized id="firmware_tool-previous_step">
<Button variant="secondary" onClick={prevStep}></Button>
</Localized>
<Localized id="firmware_tool-next_step">
<Button
variant="primary"
disabled={
!isValid ||
selectedDevices === null ||
selectedDevices.length === 0
}
onClick={nextStep}
></Button>
</Localized>
</div>
</div>
)}
{isGlobalLoading && (
<div className="flex justify-center flex-col items-center gap-3 h-44">
<LoaderIcon slimeState={SlimeState.JUMPY}></LoaderIcon>
<Localized id="firmware_tool-loading">
<Typography></Typography>
</Localized>
</div>
{flashingMethod ===
FirmwareUpdateMethod.SerialFirmwareUpdate.toString() && (
<SerialDevicesList
control={control}
watch={watch}
reset={reset}
/>
)}
{flashingMethod ===
FirmwareUpdateMethod.OTAFirmwareUpdate.toString() && (
<OTADevicesList control={control} watch={watch} reset={reset} />
)}
<div className="flex justify-between">
<Localized id="firmware_tool-previous_step">
<Button variant="secondary" onClick={prevStep} />
</Localized>
<Localized id="firmware_tool-next_step">
<Button
variant="primary"
disabled={
!isValid ||
selectedDevices === null ||
selectedDevices.length === 0
}
onClick={nextStep}
/>
</Localized>
</div>
</div>
)}
{isGlobalLoading && (
<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>
</div>
</>
);
}
@@ -17,11 +17,11 @@ import {
RpcMessage,
} from 'solarxr-protocol';
import { useOnboarding } from '@/hooks/onboarding';
import { DeviceCardControl } from './DeviceCard';
import { WarningBox } from '@/components/commons/TipBox';
import { Button } from '@/components/commons/Button';
import { useNavigate } from 'react-router-dom';
import { firmwareToolS3BaseUrl } from '@/firmware-tool-api/firmwareToolFetcher';
import { DeviceCardControl } from './DeviceCard';
export function FlashingStep({
goTo,
@@ -38,17 +38,14 @@ export function FlashingStep({
useFirmwareTool();
const { state: onboardingState } = useOnboarding();
const { sendRPCPacket, useRPCPacket } = useWebsocketAPI();
const [status, setStatus] = useState<
Record<
string,
{
status: FirmwareUpdateStatus;
type: FirmwareUpdateMethod;
progress: number;
deviceNames: string[];
}
>
>({});
const [status, setStatus] = useState<{
[key: string]: {
status: FirmwareUpdateStatus;
type: FirmwareUpdateMethod;
progress: number;
deviceNames: string[];
};
}>({});
const clear = () => {
setStatus({});
@@ -164,58 +161,60 @@ export function FlashingStep({
);
return (
<div className="flex flex-col w-full">
<div className="flex flex-grow flex-col gap-4">
<Typography color="secondary">
{l10n.getString('firmware_tool-flashing_step-description')}
</Typography>
</div>
<>
<div className="flex flex-col w-full">
<div className="flex flex-grow flex-col gap-4">
<Typography>
{l10n.getString('firmware_tool-flashing_step-description')}
</Typography>
</div>
<div className="my-4 flex gap-2 flex-col">
{shouldShowRebootWarning && (
<Localized id="firmware_tool-flashing_step-warning-v2">
<WarningBox>Warning</WarningBox>
</Localized>
)}
<div className="my-4 flex gap-2 flex-col">
{shouldShowRebootWarning && (
<Localized id="firmware_tool-flashing_step-warning-v2">
<WarningBox>Warning</WarningBox>
</Localized>
)}
{Object.keys(status).map((id) => {
const val = status[id];
{Object.keys(status).map((id) => {
const val = status[id];
return (
<DeviceCardControl
status={val.status}
progress={val.progress}
key={id}
deviceNames={val.deviceNames}
/>
);
})}
<div className="flex gap-2 self-end">
<Localized id="firmware_tool-retry">
<Button
variant="secondary"
disabled={trackerWithErrors.length === 0}
onClick={retryError}
/>
</Localized>
<Localized id="firmware_tool-flashing_step-flash_more">
<Button
variant="secondary"
disabled={hasPendingTrackers}
onClick={() => goTo('FlashingMethod')}
/>
</Localized>
<Localized id="firmware_tool-flashing_step-exit">
<Button
variant="primary"
onClick={() => {
clear();
nav('/');
}}
/>
</Localized>
return (
<DeviceCardControl
status={val.status}
progress={val.progress}
key={id}
deviceNames={val.deviceNames}
></DeviceCardControl>
);
})}
<div className="flex gap-2 self-end">
<Localized id="firmware_tool-retry">
<Button
variant="secondary"
disabled={trackerWithErrors.length === 0}
onClick={retryError}
></Button>
</Localized>
<Localized id="firmware_tool-flashing_step-flash_more">
<Button
variant="secondary"
disabled={hasPendingTrackers}
onClick={() => goTo('FlashingMethod')}
></Button>
</Localized>
<Localized id="firmware_tool-flashing_step-exit">
<Button
variant="primary"
onClick={() => {
clear();
nav('/');
}}
></Button>
</Localized>
</div>
</div>
</div>
</div>
</>
);
}
@@ -24,77 +24,79 @@ export function SelectBoardStep({
const { isFetching, data: boards } = useGetFirmwaresBoards({});
return (
<div className="flex flex-col w-full">
<div className="flex flex-grow flex-col gap-4">
<Typography color="secondary">
{l10n.getString('firmware_tool-board_step-description')}
</Typography>
</div>
<div className="my-4">
{!isFetching && (
<div className="gap-2 flex flex-col">
<div className="grid sm:grid-cols-2 mobile-settings:grid-cols-1 gap-2">
{boards
?.filter(
(board) =>
!!firmwareToolToBoardType[
board as CreateBoardConfigDTO['type']
]
)
.map((board) => (
<div
key={board}
className={classNames(
'p-3 rounded-md hover:bg-background-50',
{
'bg-background-50 text-background-10':
newConfig?.boardConfig?.type === board,
'bg-background-60':
newConfig?.boardConfig?.type !== board,
}
)}
<>
<div className="flex flex-col w-full">
<div className="flex flex-grow flex-col gap-4">
<Typography>
{l10n.getString('firmware_tool-board_step-description')}
</Typography>
</div>
<div className="my-4">
{!isFetching && (
<div className="gap-2 flex flex-col">
<div className="grid sm:grid-cols-2 mobile-settings:grid-cols-1 gap-2">
{boards
?.filter(
(board) =>
!!firmwareToolToBoardType[
board as CreateBoardConfigDTO['type']
]
)
.map((board) => (
<div
key={board}
className={classNames(
'p-3 rounded-md hover:bg-background-50',
{
'bg-background-50 text-background-10':
newConfig?.boardConfig?.type === board,
'bg-background-60':
newConfig?.boardConfig?.type !== board,
}
)}
onClick={() => {
selectBoard(board as CreateBoardConfigDTO['type']);
}}
>
{l10n.getString(
`board_type-${
BoardType[
firmwareToolToBoardType[
board as CreateBoardConfigDTO['type']
] ?? BoardType.UNKNOWN
]
}`
)}
</div>
))}
</div>
<div className="flex justify-end">
<Localized id="firmware_tool-next_step">
<Button
variant="primary"
disabled={!newConfig?.boardConfig?.type}
onClick={() => {
selectBoard(board as CreateBoardConfigDTO['type']);
if (defaultConfig?.shouldOnlyUseDefaults) {
goTo('SelectFirmware');
} else {
nextStep();
}
}}
>
{l10n.getString(
`board_type-${
BoardType[
firmwareToolToBoardType[
board as CreateBoardConfigDTO['type']
] ?? BoardType.UNKNOWN
]
}`
)}
</div>
))}
></Button>
</Localized>
</div>
</div>
<div className="flex justify-end">
<Localized id="firmware_tool-next_step">
<Button
variant="primary"
disabled={!newConfig?.boardConfig?.type}
onClick={() => {
if (defaultConfig?.shouldOnlyUseDefaults) {
goTo('SelectFirmware');
} else {
nextStep();
}
}}
/>
)}
{isFetching && (
<div className="flex justify-center flex-col items-center gap-3 h-44">
<LoaderIcon slimeState={SlimeState.JUMPY}></LoaderIcon>
<Localized id="firmware_tool-loading">
<Typography></Typography>
</Localized>
</div>
</div>
)}
{isFetching && (
<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>
</div>
</>
);
}
@@ -26,94 +26,95 @@ export function SelectFirmwareStep({
const showThirdParty = watch('thirdParty');
const getName = (name: string) =>
showThirdParty ? name : name.substring(name.indexOf('/') + 1);
const getName = (name: string) => {
return showThirdParty ? name : name.substring(name.indexOf('/') + 1);
};
const filteredFirmwares = useMemo(
() =>
firmwares?.filter(
({ name }) => name.split('/')[0] === 'SlimeVR' || showThirdParty
),
[firmwares, showThirdParty]
);
const filteredFirmwares = useMemo(() => {
return firmwares?.filter(
({ name }) => name.split('/')[0] === 'SlimeVR' || showThirdParty
);
}, [firmwares, showThirdParty]);
return (
<div className="flex flex-col w-full">
<div className="flex justify-between items-center mobile:flex-col gap-4">
<Typography color="secondary">
{l10n.getString('firmware_tool-select_firmware_step-description')}
</Typography>
<div>
<Localized
id="firmware_tool-select_firmware_step-show-third-party"
attrs={{ label: true }}
>
<CheckBox
control={control}
name="thirdParty"
label="Show third party firmwares"
/>
</Localized>
</div>
</div>
<div className="my-4">
{!isFetching && (
<div className="flex flex-col gap-4">
<div className="xs-settings:max-h-96 xs-settings:overflow-y-auto xs-settings:px-2">
<div className="grid sm:grid-cols-2 mobile-settings:grid-cols-1 gap-2">
{filteredFirmwares?.map((firmware) => (
<div
key={firmware.id}
className={classNames(
'p-3 rounded-md hover:bg-background-50',
{
'bg-background-50 text-background-10':
newConfig?.version === firmware.name,
'bg-background-60':
newConfig?.version !== firmware.name,
}
)}
onClick={() => {
selectVersion(firmware.name);
}}
>
{getName(firmware.name)}
</div>
))}
</div>
</div>
<div className="flex justify-between">
<Localized id="firmware_tool-previous_step">
<Button
variant="tertiary"
onClick={() => {
if (defaultConfig?.shouldOnlyUseDefaults) {
goTo('SelectBoard');
} else {
prevStep();
}
}}
/>
</Localized>
<Localized id="firmware_tool-next_step">
<Button
variant="primary"
disabled={!newConfig?.version}
onClick={nextStep}
/>
</Localized>
</div>
</div>
)}
{isFetching && (
<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" />
<>
<div className="flex flex-col w-full">
<div className="flex justify-between items-center mobile:flex-col gap-4">
<Typography>
{l10n.getString('firmware_tool-select_firmware_step-description')}
</Typography>
<div>
<Localized
id="firmware_tool-select_firmware_step-show-third-party"
attrs={{ label: true }}
>
<CheckBox
control={control}
name="thirdParty"
label="Show third party firmwares"
></CheckBox>
</Localized>
</div>
)}
</div>
<div className="my-4">
{!isFetching && (
<div className="flex flex-col gap-4">
<div className="xs-settings:max-h-96 xs-settings:overflow-y-auto xs-settings:px-2">
<div className="grid sm:grid-cols-2 mobile-settings:grid-cols-1 gap-2">
{filteredFirmwares?.map((firmware) => (
<div
key={firmware.id}
className={classNames(
'p-3 rounded-md hover:bg-background-50',
{
'bg-background-50 text-background-10':
newConfig?.version === firmware.name,
'bg-background-60':
newConfig?.version !== firmware.name,
}
)}
onClick={() => {
selectVersion(firmware.name);
}}
>
{getName(firmware.name)}
</div>
))}
</div>
</div>
<div className="flex justify-between">
<Localized id="firmware_tool-previous_step">
<Button
variant="tertiary"
onClick={() => {
if (defaultConfig?.shouldOnlyUseDefaults) {
goTo('SelectBoard');
} else {
prevStep();
}
}}
></Button>
</Localized>
<Localized id="firmware_tool-next_step">
<Button
variant="primary"
disabled={!newConfig?.version}
onClick={nextStep}
></Button>
</Localized>
</div>
</div>
)}
{isFetching && (
<div className="flex justify-center flex-col items-center gap-3 h-44">
<LoaderIcon slimeState={SlimeState.JUMPY}></LoaderIcon>
<Localized id="firmware_tool-loading">
<Typography></Typography>
</Localized>
</div>
)}
</div>
</div>
</div>
</>
);
}
@@ -36,7 +36,7 @@ import { devicesAtom } from '@/store/app-store';
import { checkForUpdate } from '@/hooks/firmware-update';
interface FirmwareUpdateForm {
selectedDevices: Record<string, boolean>;
selectedDevices: { [key: string]: boolean };
}
interface UpdateStatus {
@@ -60,9 +60,9 @@ const DeviceList = ({
}) => {
const { l10n } = useLocalization();
return devices.map((device) => (
return devices.map((device, index) => (
<DeviceCardControl
key={device.id?.id}
key={index}
control={control}
name={`selectedDevices.${device.id?.id ?? 0}`}
deviceNames={deviceNames(device, l10n)}
@@ -74,7 +74,7 @@ const StatusList = ({ status }: { status: Record<string, UpdateStatus> }) => {
const statusKeys = Object.keys(status);
const devices = useAtomValue(devicesAtom);
return statusKeys.map((id) => {
return statusKeys.map((id, index) => {
const val = status[id];
if (!val) throw new Error('there should always be a val');
@@ -85,19 +85,19 @@ const StatusList = ({ status }: { status: Record<string, UpdateStatus> }) => {
<DeviceCardControl
status={val.status}
progress={val.progress}
key={id}
key={index}
deviceNames={val.deviceNames}
online={device?.trackers.some(
({ status }) => status === TrackerStatus.OK
)}
/>
></DeviceCardControl>
);
});
};
function MarkdownLink({ href, children }: ComponentProps<'a'>) {
return <A href={href}>{children}</A>;
}
const MarkdownLink = (props: ComponentProps<'a'>) => (
<A href={props.href}>{props.children}</A>
);
export function FirmwareUpdate() {
const navigate = useNavigate();
@@ -312,15 +312,15 @@ export function FirmwareUpdate() {
<div className="flex flex-col p-4 w-full items-center justify-center">
<div className="mobile:w-full w-10/12 h-full flex flex-col gap-2">
<Localized id="firmware_update-title">
<Typography variant="main-title" />
<Typography variant="main-title"></Typography>
</Localized>
<div className="grid md:grid-cols-2 xs:grid-cols-1 gap-5">
<div className="flex flex-col gap-2">
<Localized id="firmware_update-devices">
<Typography variant="section-title" />
<Typography variant="section-title"></Typography>
</Localized>
<Localized id="firmware_update-devices-description">
<Typography variant="standard" color="secondary" />
<Typography variant="standard"></Typography>
</Localized>
<div className="flex flex-col gap-4 overflow-y-auto xs:max-h-[530px]">
{devices.length === 0 &&
@@ -337,9 +337,9 @@ export function FirmwareUpdate() {
)}
<div className="flex flex-col gap-4 h-full">
{statusKeys.length > 0 ? (
<StatusList status={status} />
<StatusList status={status}></StatusList>
) : (
<DeviceList control={control} devices={devices} />
<DeviceList control={control} devices={devices}></DeviceList>
)}
{devices.length === 0 && statusKeys.length === 0 && (
<div
@@ -347,9 +347,9 @@ export function FirmwareUpdate() {
'rounded-xl bg-background-60 justify-center flex-col items-center flex pb-10 py-5 gap-5'
)}
>
<LoaderIcon slimeState={SlimeState.JUMPY} />
<LoaderIcon slimeState={SlimeState.JUMPY}></LoaderIcon>
<Localized id="firmware_update-looking_for_devices">
<Typography />
<Typography></Typography>
</Localized>
</div>
)}
@@ -361,7 +361,7 @@ export function FirmwareUpdate() {
id="firmware_update-changelog-title"
vars={{ version: currentFirmwareRelease?.name ?? 'unknown' }}
>
<Typography variant="main-title" />
<Typography variant="main-title"></Typography>
</Localized>
<div className="overflow-y-scroll max-h-[430px] md:h-[430px] bg-background-60 rounded-lg p-4">
<Markdown
@@ -380,21 +380,25 @@ export function FirmwareUpdate() {
</div>
<div className="flex justify-end pb-2 gap-2 mobile:flex-col">
<Localized id="firmware_update-retry">
<Button variant="secondary" disabled={!canRetry} onClick={retry} />
<Button
variant="secondary"
disabled={!canRetry}
onClick={retry}
></Button>
</Localized>
<Localized id="firmware_update-update">
<Button
variant="primary"
disabled={!canStartUpdate}
onClick={startUpdate}
/>
></Button>
</Localized>
<Localized id="firmware_update-exit">
<Button
variant="primary"
onClick={exit}
disabled={hasPendingTrackers}
/>
></Button>
</Localized>
</div>
</div>
+6 -7
View File
@@ -17,7 +17,6 @@ import classNames from 'classnames';
import { useAtomValue } from 'jotai';
import { flatTrackersAtom } from '@/store/app-store';
import { useVRCConfig } from '@/hooks/vrc-config';
import { uniqueNumberFromTracker } from '@/hooks/tracker';
const DONT_REPEAT_STATUSES = [StatusData.StatusTrackerReset];
@@ -50,7 +49,7 @@ export function Home() {
to="/vr-mode"
className="xs:hidden absolute z-50 h-12 w-12 rounded-full bg-accent-background-30 bottom-3 right-3 flex justify-center items-center fill-background-10"
>
<HeadsetIcon />
<HeadsetIcon></HeadsetIcon>
</NavLink>
<div className="h-full overflow-y-auto">
<div
@@ -75,12 +74,12 @@ export function Home() {
<WarningBox whitespace={false}>
<div className="flex gap-2 justify-between items-center w-full">
<div className="flex">
<Localized id={'vrc_config-invalid'} />
<Localized id={'vrc_config-invalid'}></Localized>
</div>
<div className="flex">
<Link to="/vrc-warnings">
<div className="rounded-md p-2 bg-background-90 bg-opacity-15 hover:bg-background-10 hover:bg-opacity-25 text-nowrap">
<Localized id={'vrc_config-show_more'} />
<Localized id={'vrc_config-show_more'}></Localized>
</div>
</Link>
</div>
@@ -99,9 +98,9 @@ export function Home() {
{!config?.debug && trackers.length > 0 && (
<div className="grid sm:grid-cols-1 md:grid-cols-2 gap-4 px-5 my-5">
{trackers.map(({ tracker, device }) => (
{trackers.map(({ tracker, device }, index) => (
<TrackerCard
key={uniqueNumberFromTracker(tracker)}
key={index}
tracker={tracker}
device={device}
onClick={() => sendToSettings(tracker)}
@@ -120,7 +119,7 @@ export function Home() {
<TrackersTable
flatTrackers={trackers}
clickedTracker={(tracker) => sendToSettings(tracker)}
/>
></TrackersTable>
</div>
)}
</div>
+13 -19
View File
@@ -127,21 +127,18 @@ export function ResetButton({
switch (type) {
case ResetType.Yaw:
return l10n.getString(
`reset-yaw${
bodyPartsToReset !== 'default' ? `-${bodyPartsToReset}` : ''
}`
'reset-yaw' +
(bodyPartsToReset !== 'default' ? '-' + bodyPartsToReset : '')
);
case ResetType.Mounting:
return l10n.getString(
`reset-mounting${
bodyPartsToReset !== 'default' ? `-${bodyPartsToReset}` : ''
}`
'reset-mounting' +
(bodyPartsToReset !== 'default' ? '-' + bodyPartsToReset : '')
);
case ResetType.Full:
return l10n.getString(
`reset-full${
bodyPartsToReset !== 'default' ? `-${bodyPartsToReset}` : ''
}`
'reset-full' +
(bodyPartsToReset !== 'default' ? '-' + bodyPartsToReset : '')
);
}
}, [type, bodyPartsToReset]);
@@ -152,17 +149,15 @@ export function ResetButton({
return <YawResetIcon width={20} />;
case ResetType.Mounting:
switch (bodyPartsToReset) {
case 'default':
return <MountingResetIcon width={20} />;
case 'feet':
return <FootIcon width={30} />;
case 'fingers':
return <FingersIcon width={20} />;
case 'default':
default:
return <MountingResetIcon width={20} />;
}
case ResetType.Full:
return <FullResetIcon width={20} />;
}
return <FullResetIcon width={20} />;
};
const maybePlaySoundOnResetEnd = (type: ResetType) => {
@@ -182,13 +177,12 @@ export function ResetButton({
maybePlaySoundOnResetStart();
};
useEffect(
() => () => {
useEffect(() => {
return () => {
if (finishedTimeoutRef.current !== -1)
clearTimeout(finishedTimeoutRef.current);
},
[]
);
};
}, []);
return size === 'small' ? (
<Button
+236 -234
View File
@@ -3,10 +3,10 @@ import { BodyPart } from 'solarxr-protocol';
import { AssignMode } from '@/hooks/config';
import { BodyInteractions } from '@/components/commons/BodyInteractions';
import { TrackerPartCard } from '@/components/tracker/TrackerPartCard';
import { BodyPartError } from './pages/trackers-assign/TrackerAssignment';
import { SIDES } from '@/components/commons/PersonFrontIcon';
import { useAtomValue } from 'jotai';
import { assignedTrackersAtom, FlatDeviceTracker } from '@/store/app-store';
import { BodyPartError } from './pages/trackers-assign/TrackerAssignment';
export const ARMS_PARTS = new Set([
BodyPart.LEFT_UPPER_ARM,
@@ -116,7 +116,7 @@ export function BodyAssignment({
const trackerPartGrouped = useMemo(
() =>
assignedTrackers.reduce<Record<number, FlatDeviceTracker[]>>(
assignedTrackers.reduce<{ [key: number]: FlatDeviceTracker[] }>(
(curr, td) => {
if (!td && onlyAssigned) return curr;
@@ -151,249 +151,251 @@ export function BodyAssignment({
);
return (
<BodyInteractions
width={width}
mirror={mirror}
dotsSize={dotSize}
assignedRoles={assignedRoles}
highlightedRoles={highlightedRoles}
onSelectRole={onRoleSelected}
leftControls={
<div className="flex flex-col justify-between h-full text-right">
<div className="flex flex-col gap-2">
{hasBodyPart(BodyPart.HEAD) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.HEAD]?.label}
td={trackerPartGrouped[BodyPart.HEAD]}
role={BodyPart.HEAD}
onClick={() => onRoleSelected(BodyPart.HEAD)}
direction="right"
/>
)}
<>
<BodyInteractions
width={width}
mirror={mirror}
dotsSize={dotSize}
assignedRoles={assignedRoles}
highlightedRoles={highlightedRoles}
onSelectRole={onRoleSelected}
leftControls={
<div className="flex flex-col justify-between h-full text-right">
<div className="flex flex-col gap-2">
{hasBodyPart(BodyPart.HEAD) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.HEAD]?.label}
td={trackerPartGrouped[BodyPart.HEAD]}
role={BodyPart.HEAD}
onClick={() => onRoleSelected(BodyPart.HEAD)}
direction="right"
/>
)}
{hasBodyPart(BodyPart.NECK) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.NECK]?.label}
td={trackerPartGrouped[BodyPart.NECK]}
role={BodyPart.NECK}
onClick={() => onRoleSelected(BodyPart.NECK)}
direction="right"
/>
)}
{hasBodyPart(BodyPart.NECK) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.NECK]?.label}
td={trackerPartGrouped[BodyPart.NECK]}
role={BodyPart.NECK}
onClick={() => onRoleSelected(BodyPart.NECK)}
direction="right"
/>
)}
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[left].shoulder) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].shoulder]?.label}
td={trackerPartGrouped[SIDES[left].shoulder]}
role={SIDES[left].shoulder}
onClick={() => onRoleSelected(SIDES[left].shoulder)}
direction="right"
/>
)}
{hasBodyPart(SIDES[left].upperArm) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].upperArm]?.label}
td={trackerPartGrouped[SIDES[left].upperArm]}
role={SIDES[left].upperArm}
onClick={() => onRoleSelected(SIDES[left].upperArm)}
direction="right"
/>
)}
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[left].lowerArm) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].lowerArm]?.label}
td={trackerPartGrouped[SIDES[left].lowerArm]}
role={SIDES[left].lowerArm}
onClick={() => onRoleSelected(SIDES[left].lowerArm)}
direction="right"
/>
)}
{hasBodyPart(SIDES[left].hand) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].hand]?.label}
td={trackerPartGrouped[SIDES[left].hand]}
role={SIDES[left].hand}
onClick={() => onRoleSelected(SIDES[left].hand)}
direction="right"
/>
)}
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[left].upperLeg) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].upperLeg]?.label}
td={trackerPartGrouped[SIDES[left].upperLeg]}
role={SIDES[left].upperLeg}
onClick={() => onRoleSelected(SIDES[left].upperLeg)}
direction="right"
/>
)}
{hasBodyPart(SIDES[left].lowerLeg) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].lowerLeg]?.label}
td={trackerPartGrouped[SIDES[left].lowerLeg]}
role={SIDES[left].lowerLeg}
onClick={() => onRoleSelected(SIDES[left].lowerLeg)}
direction="right"
/>
)}
{hasBodyPart(SIDES[left].foot) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].foot]?.label}
td={trackerPartGrouped[SIDES[left].foot]}
role={SIDES[left].foot}
onClick={() => onRoleSelected(SIDES[left].foot)}
direction="right"
/>
)}
</div>
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[left].shoulder) && (
}
rightControls={
<div className="flex flex-col justify-between h-full">
{hasBodyPart(BodyPart.UPPER_CHEST) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].shoulder]?.label}
td={trackerPartGrouped[SIDES[left].shoulder]}
role={SIDES[left].shoulder}
onClick={() => onRoleSelected(SIDES[left].shoulder)}
direction="right"
roleError={rolesWithErrors[BodyPart.UPPER_CHEST]?.label}
td={trackerPartGrouped[BodyPart.UPPER_CHEST]}
role={BodyPart.UPPER_CHEST}
onClick={() => onRoleSelected(BodyPart.UPPER_CHEST)}
direction="left"
/>
)}
{hasBodyPart(SIDES[left].upperArm) && (
{hasBodyPart(BodyPart.CHEST) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].upperArm]?.label}
td={trackerPartGrouped[SIDES[left].upperArm]}
role={SIDES[left].upperArm}
onClick={() => onRoleSelected(SIDES[left].upperArm)}
direction="right"
roleError={rolesWithErrors[BodyPart.CHEST]?.label}
td={trackerPartGrouped[BodyPart.CHEST]}
role={BodyPart.CHEST}
onClick={() => onRoleSelected(BodyPart.CHEST)}
direction="left"
/>
)}
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[right].shoulder) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].shoulder]?.label}
td={trackerPartGrouped[SIDES[right].shoulder]}
role={SIDES[right].shoulder}
onClick={() => onRoleSelected(SIDES[right].shoulder)}
direction="left"
/>
)}
{hasBodyPart(SIDES[right].upperArm) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].upperArm]?.label}
td={trackerPartGrouped[SIDES[right].upperArm]}
role={SIDES[right].upperArm}
onClick={() => onRoleSelected(SIDES[right].upperArm)}
direction="left"
/>
)}
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(BodyPart.WAIST) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.WAIST]?.label}
td={trackerPartGrouped[BodyPart.WAIST]}
onClick={() => onRoleSelected(BodyPart.WAIST)}
role={BodyPart.WAIST}
direction="left"
/>
)}
{hasBodyPart(BodyPart.HIP) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.HIP]?.label}
td={trackerPartGrouped[BodyPart.HIP]}
onClick={() => onRoleSelected(BodyPart.HIP)}
role={BodyPart.HIP}
direction="left"
/>
)}
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[right].lowerArm) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].lowerArm]?.label}
td={trackerPartGrouped[SIDES[right].lowerArm]}
role={SIDES[right].lowerArm}
onClick={() => onRoleSelected(SIDES[right].lowerArm)}
direction="left"
/>
)}
{hasBodyPart(SIDES[right].hand) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].hand]?.label}
td={trackerPartGrouped[SIDES[right].hand]}
onClick={() => onRoleSelected(SIDES[right].hand)}
role={SIDES[right].hand}
direction="left"
/>
)}
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[right].upperLeg) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].upperLeg]?.label}
td={trackerPartGrouped[SIDES[right].upperLeg]}
role={SIDES[right].upperLeg}
onClick={() => onRoleSelected(SIDES[right].upperLeg)}
direction="left"
/>
)}
{hasBodyPart(SIDES[right].lowerLeg) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].lowerLeg]?.label}
td={trackerPartGrouped[SIDES[right].lowerLeg]}
role={SIDES[right].lowerLeg}
onClick={() => onRoleSelected(SIDES[right].lowerLeg)}
direction="left"
/>
)}
{hasBodyPart(SIDES[right].foot) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].foot]?.label}
td={trackerPartGrouped[SIDES[right].foot]}
role={SIDES[right].foot}
onClick={() => onRoleSelected(SIDES[right].foot)}
direction="left"
/>
)}
</div>
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[left].lowerArm) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].lowerArm]?.label}
td={trackerPartGrouped[SIDES[left].lowerArm]}
role={SIDES[left].lowerArm}
onClick={() => onRoleSelected(SIDES[left].lowerArm)}
direction="right"
/>
)}
{hasBodyPart(SIDES[left].hand) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].hand]?.label}
td={trackerPartGrouped[SIDES[left].hand]}
role={SIDES[left].hand}
onClick={() => onRoleSelected(SIDES[left].hand)}
direction="right"
/>
)}
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[left].upperLeg) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].upperLeg]?.label}
td={trackerPartGrouped[SIDES[left].upperLeg]}
role={SIDES[left].upperLeg}
onClick={() => onRoleSelected(SIDES[left].upperLeg)}
direction="right"
/>
)}
{hasBodyPart(SIDES[left].lowerLeg) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].lowerLeg]?.label}
td={trackerPartGrouped[SIDES[left].lowerLeg]}
role={SIDES[left].lowerLeg}
onClick={() => onRoleSelected(SIDES[left].lowerLeg)}
direction="right"
/>
)}
{hasBodyPart(SIDES[left].foot) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[left].foot]?.label}
td={trackerPartGrouped[SIDES[left].foot]}
role={SIDES[left].foot}
onClick={() => onRoleSelected(SIDES[left].foot)}
direction="right"
/>
)}
</div>
</div>
}
rightControls={
<div className="flex flex-col justify-between h-full">
{hasBodyPart(BodyPart.UPPER_CHEST) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.UPPER_CHEST]?.label}
td={trackerPartGrouped[BodyPart.UPPER_CHEST]}
role={BodyPart.UPPER_CHEST}
onClick={() => onRoleSelected(BodyPart.UPPER_CHEST)}
direction="left"
/>
)}
{hasBodyPart(BodyPart.CHEST) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.CHEST]?.label}
td={trackerPartGrouped[BodyPart.CHEST]}
role={BodyPart.CHEST}
onClick={() => onRoleSelected(BodyPart.CHEST)}
direction="left"
/>
)}
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[right].shoulder) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].shoulder]?.label}
td={trackerPartGrouped[SIDES[right].shoulder]}
role={SIDES[right].shoulder}
onClick={() => onRoleSelected(SIDES[right].shoulder)}
direction="left"
/>
)}
{hasBodyPart(SIDES[right].upperArm) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].upperArm]?.label}
td={trackerPartGrouped[SIDES[right].upperArm]}
role={SIDES[right].upperArm}
onClick={() => onRoleSelected(SIDES[right].upperArm)}
direction="left"
/>
)}
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(BodyPart.WAIST) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.WAIST]?.label}
td={trackerPartGrouped[BodyPart.WAIST]}
onClick={() => onRoleSelected(BodyPart.WAIST)}
role={BodyPart.WAIST}
direction="left"
/>
)}
{hasBodyPart(BodyPart.HIP) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.HIP]?.label}
td={trackerPartGrouped[BodyPart.HIP]}
onClick={() => onRoleSelected(BodyPart.HIP)}
role={BodyPart.HIP}
direction="left"
/>
)}
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[right].lowerArm) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].lowerArm]?.label}
td={trackerPartGrouped[SIDES[right].lowerArm]}
role={SIDES[right].lowerArm}
onClick={() => onRoleSelected(SIDES[right].lowerArm)}
direction="left"
/>
)}
{hasBodyPart(SIDES[right].hand) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].hand]?.label}
td={trackerPartGrouped[SIDES[right].hand]}
onClick={() => onRoleSelected(SIDES[right].hand)}
role={SIDES[right].hand}
direction="left"
/>
)}
</div>
<div className="flex flex-col gap-2">
{hasBodyPart(SIDES[right].upperLeg) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].upperLeg]?.label}
td={trackerPartGrouped[SIDES[right].upperLeg]}
role={SIDES[right].upperLeg}
onClick={() => onRoleSelected(SIDES[right].upperLeg)}
direction="left"
/>
)}
{hasBodyPart(SIDES[right].lowerLeg) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].lowerLeg]?.label}
td={trackerPartGrouped[SIDES[right].lowerLeg]}
role={SIDES[right].lowerLeg}
onClick={() => onRoleSelected(SIDES[right].lowerLeg)}
direction="left"
/>
)}
{hasBodyPart(SIDES[right].foot) && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[SIDES[right].foot]?.label}
td={trackerPartGrouped[SIDES[right].foot]}
role={SIDES[right].foot}
onClick={() => onRoleSelected(SIDES[right].foot)}
direction="left"
/>
)}
</div>
</div>
}
/>
}
></BodyInteractions>
</>
);
}
@@ -40,7 +40,7 @@ export function NeckWarningModal({
<div className="flex w-full flex-col flex-grow items-center gap-3">
<Localized
id="tracker_selection_menu-neck_warning"
elems={{ b: <b /> }}
elems={{ b: <b></b> }}
>
<WarningBox>
<b>Warning:</b> A neck tracker can be deadly if adjusted too
@@ -15,22 +15,22 @@ export function OnboardingLayout({ children }: { children: ReactNode }) {
return !state.alonePage ? (
<div className="onboarding-layout h-full">
<div style={{ gridArea: 't' }}>
<TopBar progress={state.progress} />
<TopBar progress={state.progress}></TopBar>
</div>
<div style={{ gridArea: 'c' }} className="mt-2 relative">
<div className="absolute top-12 mobile:top-0 right-2 z-50">
<SkipSetupButton
visible
visible={true}
modalVisible={showWarning}
onClick={() => setShowWarning(true)}
/>
></SkipSetupButton>
</div>
<div className="h-full w-full overflow-y-auto">{children}</div>
<SkipSetupWarningModal
accept={skipSetup}
onClose={() => setShowWarning(false)}
isOpen={showWarning}
/>
></SkipSetupWarningModal>
</div>
</div>
) : (
@@ -11,7 +11,7 @@ export function SkipSetupButton({
modalVisible: boolean;
visible: boolean;
}) {
if (!visible) return null;
if (!visible) return <></>;
useEffect(() => {
if (modalVisible) return;
@@ -28,14 +28,14 @@ export function SkipSetupButton({
<button
type="button"
className={classNames(
'text-background-40 hover:text-background-30',
'stroke-background-40 hover:stroke-background-30',
'text-background-10 hover:text-background-20',
'stroke-background-10 hover:stroke-background-20',
'absolute xs:-top-10 xs:right-4 mobile:top-0 mobile:right-0'
)}
onClick={onClick}
>
<div className="flex flex-col justify-center items-center">
<EscapeIcon size={42} />
<EscapeIcon size={42}></EscapeIcon>
<p className="text-standard">ESC</p>
</div>
</button>
@@ -40,7 +40,7 @@ export function SkipSetupWarningModal({
>
<div className="flex w-full h-full flex-col ">
<div className="flex flex-col flex-grow items-center gap-3">
<Localized id="onboarding-setup_warning" elems={{ b: <b /> }}>
<Localized id="onboarding-setup_warning" elems={{ b: <b></b> }}>
<WarningBox>
<b>Warning:</b> The setup is needed for good tracking, this is
required if this is your first time using SlimeVR.
@@ -19,10 +19,10 @@ type StepComponentType = FC<{
variant: 'alone' | 'onboarding';
active: boolean;
}>;
export interface Step {
export type Step = {
type: 'numbered' | 'fullsize';
component: StepComponentType;
}
};
export function StepContainer({
children,
@@ -83,7 +83,9 @@ export function StepDot({
)}
onClick={onClick}
>
{active && <div className="flex h-2 w-2 rounded-full bg-background-10" />}
{active && (
<div className="flex h-2 w-2 rounded-full bg-background-10"></div>
)}
{done && <CheckIcon />}
</div>
);
@@ -160,7 +162,6 @@ export function StepperSlider({
{steps.map(({ type, component: StepComponent }, index) => (
<StepContainer
variant={variant}
// eslint-disable-next-line react/no-array-index-key
key={index}
type={type}
width={width}
@@ -180,10 +181,9 @@ export function StepperSlider({
</div>
<div className="flex justify-center items-center gap-2">
{Array.from({ length: steps.length }).map((_, index) => (
// eslint-disable-next-line react/no-array-index-key
<div key={index} className="flex items-center gap-2">
{index !== 0 && (
<div className="w-5 h-1 bg-background-50 rounded-full" />
<div className="w-5 h-1 bg-background-50 rounded-full"></div>
)}
<StepDot
active={index === step}
@@ -75,7 +75,7 @@ export function CalibrationTutorialPage() {
setCalibrationStatus(CalibrationStatus.ERROR);
abortCountdown();
}
}, [abortCountdown, calibrationStatus, rested]);
}, [calibrationStatus, rested]);
const progressBarClass = useMemo(() => {
switch (calibrationStatus) {
@@ -83,8 +83,6 @@ export function CalibrationTutorialPage() {
return 'bg-status-critical';
case CalibrationStatus.SUCCESS:
return 'bg-status-success';
default:
return undefined;
}
}, [calibrationStatus]);
@@ -117,100 +115,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 /> }}
>
<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 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>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>
<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">
<LoaderIcon slimeState={slimeStatus} />
<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>
</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/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'
)}
className={classNames('xs:ml-auto', !skipButton && 'hidden')}
>
{l10n.getString('onboarding-continue')}
{l10n.getString('onboarding-calibration_tutorial-skip')}
</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>
<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 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>
</div>
</div>
</>
);
}
@@ -12,9 +12,9 @@
grid-template:
's t' var(--connect-tracker-layout-top)
's c' calc(100% - var(--connect-tracker-layout-top))
/ calc(var(--connect-tracker-layout-sidebar)) calc(
100% - var(--connect-tracker-layout-sidebar)
);
/ calc(var(--connect-tracker-layout-sidebar)) calc(100% - var(
--connect-tracker-layout-sidebar
));
@screen mobile {
grid-template:
@@ -27,7 +27,6 @@ import { BaseModal } from '@/components/commons/BaseModal';
import { useStatusContext } from '@/hooks/status-system';
import { A } from '@/components/commons/A';
import { CONNECT_TRACKER } from '@/utils/tauri';
import { uniqueNumberFromTracker } from '@/hooks/tracker';
const statusLabelMap = {
[WifiProvisioningStatus.NONE]:
@@ -141,9 +140,7 @@ export function ConnectTrackersPage() {
if (provisioningStatus === WifiProvisioningStatus.DONE) {
return 'bg-status-success';
}
return undefined;
}, [isError, provisioningStatus]);
}, [provisioningStatus]);
const slimeStatus = useMemo(() => {
if (isError) {
@@ -168,13 +165,11 @@ export function ConnectTrackersPage() {
[connectedIMUTrackers.length]
);
const filteredStatuses = useMemo(
() =>
Object.entries(statuses).filter(
([, value]) => value.dataType == StatusData.StatusPublicNetwork
),
[statuses]
);
const filteredStatuses = useMemo(() => {
return Object.entries(statuses).filter(
([, value]) => value.dataType == StatusData.StatusPublicNetwork
);
}, [statuses]);
return (
<>
@@ -194,21 +189,21 @@ export function ConnectTrackersPage() {
>
<div className="flex flex-col items-center gap-2 ">
<Localized id={(errorLabelMap as any)[provisioningStatus]}>
<Typography variant="main-title" />
<Typography variant="main-title"></Typography>
</Localized>
<Localized id={`${(errorLabelMap as any)[provisioningStatus]}-desc`}>
<Typography
variant="standard"
whitespace="whitespace-pre-wrap"
block
/>
></Typography>
</Localized>
<video
src={CONNECT_TRACKER}
loop
autoPlay
className="w-full aspect-video rounded-md mt-2"
/>
></video>
<div className="flex gap-3 pt-5 justify-end w-full">
<Button
variant="tertiary"
@@ -226,10 +221,10 @@ export function ConnectTrackersPage() {
<Typography variant="main-title">
{l10n.getString('onboarding-connect_tracker-title')}
</Typography>
<Typography color="secondary">
<Typography>
{l10n.getString('onboarding-connect_tracker-description-p0-v1')}
</Typography>
<Typography color="secondary">
<Typography>
{l10n.getString('onboarding-connect_tracker-description-p1-v1')}
</Typography>
<div className="flex flex-col gap-2 py-5">
@@ -244,7 +239,7 @@ export function ConnectTrackersPage() {
</div>
<Localized
id={currentTip}
elems={{ em: <em className="italic" />, b: <b /> }}
elems={{ em: <em className="italic"></em>, b: <b></b> }}
>
<TipBox>Conditional tip</TipBox>
</Localized>
@@ -255,7 +250,7 @@ export function ConnectTrackersPage() {
id={`status_system-${StatusData[status.dataType]}`}
elems={{
PublicFixLink: (
<A href="https://docs.slimevr.dev/common-issues.html#network-profile-is-currently-set-to-public" />
<A href="https://docs.slimevr.dev/common-issues.html#network-profile-is-currently-set-to-public"></A>
),
}}
>
@@ -278,7 +273,7 @@ export function ConnectTrackersPage() {
'right-5 bottom-8'
)}
>
<LoaderIcon slimeState={slimeStatus} />
<LoaderIcon slimeState={slimeStatus}></LoaderIcon>
</div>
<div className="flex flex-col grow self-center">
@@ -286,16 +281,16 @@ export function ConnectTrackersPage() {
{l10n.getString('onboarding-connect_tracker-usb')}
</Typography>
<div className="flex fill-background-10 gap-1">
<Typography color="secondary">
<Typography>
{l10n.getString(statusLabelMap[provisioningStatus])}
</Typography>
</div>
<ProgressBar
progress={statusProgressMap[provisioningStatus]}
height={14}
animated
animated={true}
colorClass={progressBarClass}
/>
></ProgressBar>
</div>
</div>
<div className="flex flex-row mt-4 gap-3">
@@ -324,7 +319,7 @@ export function ConnectTrackersPage() {
</div>
</div>
<div style={{ gridArea: 't' }} className="flex items-center px-5">
<Typography color="secondary" bold>
<Typography bold>
{l10n.getString('onboarding-connect_tracker-connected_trackers', {
amount: connectedIMUTrackers.length,
})}
@@ -335,22 +330,22 @@ export function ConnectTrackersPage() {
{Array.from({
...connectedIMUTrackers,
length: Math.max(connectedIMUTrackers.length, 1),
}).map((tracker) => (
<div key={uniqueNumberFromTracker(tracker.tracker)}>
}).map((tracker, index) => (
<div key={index}>
{!tracker && (
<div
className={classNames(
'rounded-xl h-16 animate-pulse',
state.alonePage ? 'bg-background-80' : 'bg-background-70'
)}
/>
></div>
)}
{tracker && (
<TrackerCard
tracker={tracker.tracker}
device={tracker.device}
smol
/>
></TrackerCard>
)}
</div>
))}
@@ -30,21 +30,21 @@ function Error({ title, desc }: { title: string; desc: string }) {
return (
<>
<LoaderIcon slimeState={SlimeState.SAD} size={200} />
<LoaderIcon slimeState={SlimeState.SAD} size={200}></LoaderIcon>
<div>
<Localized id={title}>
<Typography variant="main-title" />
<Typography variant="main-title"></Typography>
</Localized>
<Localized id={desc}>
<Typography variant="standard" />
<Typography variant="standard"></Typography>
</Localized>
{isTauri && (
<div className="flex gap-2 justify-center mt-4">
<Localized id="websocket-error-close">
<Button variant="primary" onClick={closeApp} />
<Button variant="primary" onClick={closeApp}></Button>
</Localized>
<Localized id="websocket-error-logs">
<Button variant="secondary" onClick={openLogsFolder} />
<Button variant="secondary" onClick={openLogsFolder}></Button>
</Localized>
</div>
)}
@@ -65,10 +65,10 @@ export function ConnectionLost() {
<div className="flex flex-col items-center gap-4 -mt-12">
{isLoading && (
<>
<LoaderIcon slimeState={SlimeState.JUMPY} size={200} />
<LoaderIcon slimeState={SlimeState.JUMPY} size={200}></LoaderIcon>
<div>
<Localized id="websocket-connecting">
<Typography variant="main-title" />
<Typography variant="main-title"></Typography>
</Localized>
</div>
</>
@@ -77,10 +77,13 @@ export function ConnectionLost() {
<Error
title="websocket-connection_lost"
desc="websocket-connection_lost-desc"
/>
></Error>
)}
{isTimedOut && (
<Error title="websocket-timedout" desc="websocket-timedout-desc" />
<Error
title="websocket-timedout"
desc="websocket-timedout-desc"
></Error>
)}
</div>
</div>
+2 -2
View File
@@ -15,12 +15,12 @@ export function DonePage() {
return (
<div className="flex flex-col gap-5 h-full items-center w-full justify-center">
<div className="flex flex-col gap-5 items-center z-10">
<SlimeVRIcon />
<SlimeVRIcon></SlimeVRIcon>
<Typography variant="main-title">
{l10n.getString('onboarding-done-title')}
</Typography>
<div className="flex flex-col items-center">
<Typography color="secondary">
<Typography>
{l10n.getString('onboarding-done-description')}
</Typography>
</div>
+30 -28
View File
@@ -11,37 +11,39 @@ export function EnterVRPage() {
applyProgress(0.6);
return (
<div className="flex flex-col gap-5 h-full items-center w-full justify-center">
<div className="flex flex-col w-full h-full justify-center items-center">
<div className="flex gap-8">
<div className="flex flex-col max-w-md gap-3">
<ArrowLink to="/onboarding/trackers-assign" direction="left">
{l10n.getString('onboarding-enter_vr-back')}
</ArrowLink>
<Typography variant="main-title">
{l10n.getString('onboarding-enter_vr-title')}
</Typography>
<Typography color="secondary">
{l10n.getString('onboarding-enter_vr-description')}
</Typography>
</div>
{/* <div className="flex flex-col flex-grow gap-3 rounded-xl fill-background-50">
<>
<div className="flex flex-col gap-5 h-full items-center w-full justify-center">
<div className="flex flex-col w-full h-full justify-center items-center">
<div className="flex gap-8">
<div className="flex flex-col max-w-md gap-3">
<ArrowLink to="/onboarding/trackers-assign" direction="left">
{l10n.getString('onboarding-enter_vr-back')}
</ArrowLink>
<Typography variant="main-title">
{l10n.getString('onboarding-enter_vr-title')}
</Typography>
<Typography>
{l10n.getString('onboarding-enter_vr-description')}
</Typography>
</div>
{/* <div className="flex flex-col flex-grow gap-3 rounded-xl fill-background-50">
<Typography variant="main-title">Illustration HERE</Typography>
</div> */}
</div>
</div>
<div className="w-full py-4 flex flex-row">
<div className="flex flex-grow">
<Button variant="secondary" to="/" onClick={skipSetup}>
{l10n.getString('onboarding-skip')}
</Button>
</div>
<div className="flex gap-3">
<Button variant="primary" to="/onboarding/mounting/auto">
{l10n.getString('onboarding-enter_vr-ready')}
</Button>
</div>
</div>
</div>
<div className="w-full py-4 flex flex-row">
<div className="flex flex-grow">
<Button variant="secondary" to="/" onClick={skipSetup}>
{l10n.getString('onboarding-skip')}
</Button>
</div>
<div className="flex gap-3">
<Button variant="primary" to="/onboarding/mounting/auto">
{l10n.getString('onboarding-enter_vr-ready')}
</Button>
</div>
</div>
</div>
</>
);
}
+43 -41
View File
@@ -12,47 +12,49 @@ export function HomePage() {
applyProgress(0.1);
return (
<div className="flex relative flex-col gap-5 h-full items-center w-full justify-center px-4 overflow-clip">
<div className="flex flex-col gap-5 items-center z-10 scale-150 mb-20">
<SlimeVRIcon />
<Typography variant="mobile-title">
{l10n.getString('onboarding-home')}
</Typography>
<Button variant="primary" to="/onboarding/wifi-creds">
{l10n.getString('onboarding-home-start')}
</Button>
<>
<div className="flex relative flex-col gap-5 h-full items-center w-full justify-center px-4 overflow-clip">
<div className="flex flex-col gap-5 items-center z-10 scale-150 mb-20">
<SlimeVRIcon></SlimeVRIcon>
<Typography variant="mobile-title">
{l10n.getString('onboarding-home')}
</Typography>
<Button variant="primary" to="/onboarding/wifi-creds">
{l10n.getString('onboarding-home-start')}
</Button>
</div>
<div className="absolute right-4 bottom-4 z-50">
<LangSelector />
</div>
<div
className="absolute bg-accent-background-50 w-full rounded-full"
style={{
bottom: 'calc(-300vw / 1.04)',
height: '300vw',
width: '300vw',
}}
></div>
<img
className="absolute"
src="/images/slime-girl.webp"
style={{
width: '35%',
maxWidth: 800,
bottom: '1%',
left: '9%',
}}
/>
<img
className="absolute"
src="/images/slimes.webp"
style={{
width: '35%',
maxWidth: 800,
bottom: '1%',
right: '9%',
}}
/>
</div>
<div className="absolute right-4 bottom-4 z-50">
<LangSelector />
</div>
<div
className="absolute bg-accent-background-50 w-full rounded-full"
style={{
bottom: 'calc(-300vw / 1.04)',
height: '300vw',
width: '300vw',
}}
/>
<img
className="absolute"
src="/images/slime-girl.webp"
style={{
width: '35%',
maxWidth: 800,
bottom: '1%',
left: '9%',
}}
/>
<img
className="absolute"
src="/images/slimes.webp"
style={{
width: '35%',
maxWidth: 800,
bottom: '1%',
right: '9%',
}}
/>
</div>
</>
);
}
Loaded 100 of 221 files, more files were not shown because too many files have changed in this diff. Show more