From 919bd26e4ed6f3f0eec8a5bbcc16b35e850445e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Thu, 26 Dec 2024 18:20:47 +0800 Subject: [PATCH 01/12] Create .gitignore --- .idea/.gitignore | 10 ++++++++ .idea/workspace.xml | 62 --------------------------------------------- CHANGELOG.md | 4 --- 3 files changed, 10 insertions(+), 66 deletions(-) create mode 100644 .idea/.gitignore delete mode 100644 .idea/workspace.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..a9d7db9 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# GitHub Copilot persisted chat sessions +/copilot/chatSessions diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 5831962..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - { - "associatedIndex": 5 -} - - - - { - "keyToString": { - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.git.unshallow": "true", - "git-widget-placeholder": "main", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "settings.editor.selected.configurable": "preferences.pluginManager", - "vue.rearranger.settings.migration": "true" - } -} - - - - - - - - - - - 1735159526651 - - - - - - \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 864fd8a..0bb4df3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,5 @@ [![](https://img.shields.io/badge/Windows%20(x64)-v0.6.4-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.4/icontroller-v0.6.4-portable-win-x64.zip) -[![](https://img.shields.io/badge/Windows%20(x64)-v0.6.3-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.3/icontroller-v0.6.3-portable-win-x64.zip) - [![](https://img.shields.io/badge/Windows%20(x64)-v0.6.2-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.2/icontroller-v0.6.2-portable-win-x64.zip) [![](https://img.shields.io/badge/Windows%20(x64)-v0.6.1-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.1/icontroller-v0.6.1-portable-win-x64.zip) @@ -81,8 +79,6 @@ # [iController v0.6.3](https://github.com/Mehver/iController/releases/tag/v0.6.3) -[![](https://img.shields.io/badge/Windows%20(x64)-v0.6.3-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.3/icontroller-v0.6.3-portable-win-x64.zip) - ### Release Notes - Security Updates From 05e77740772e10afade81acf058e9889cc4d38ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Fri, 27 Dec 2024 05:36:44 +0800 Subject: [PATCH 02/12] Reformat Files --- .github/workflows/build-for-release.yml | 24 +- ClientBrowserUI/.gitignore | 205 ++++++++++++++++++ .../package-lock.json | 0 package.json => ClientBrowserUI/package.json | 4 +- {public => ClientBrowserUI/public}/256a.png | Bin {public => ClientBrowserUI/public}/256b.jpg | Bin {public => ClientBrowserUI/public}/index.html | 6 +- {src => ClientBrowserUI/src}/api/dpad.js | 0 {src => ClientBrowserUI/src}/api/keyboard.js | 0 .../src}/api/mousebutton.js | 0 .../src}/api/mousewheel.js | 0 {src => ClientBrowserUI/src}/api/system.js | 0 {src => ClientBrowserUI/src}/api/touchpad.js | 0 {src => ClientBrowserUI/src}/api/volume.js | 0 .../src}/components/GeneralDidMount.jsx | 0 .../src}/components/Screen/DPad.jsx | 0 .../src}/components/Screen/MouseButtons.jsx | 0 .../src}/components/Screen/Touchpad.jsx | 0 .../src}/components/Screen/index.jsx | 0 .../src}/components/SideBar/KeyboardMenu.jsx | 0 .../components/SideBar/ModulesSettingMenu.jsx | 0 .../components/SideBar/MouseWheelMenu.jsx | 0 .../src}/components/SideBar/SettingMenu.jsx | 0 .../src}/components/SideBar/ThemeMenu.jsx | 0 .../src}/components/SideBar/VolumeMenu.jsx | 0 .../src}/components/SideBar/index.jsx | 0 .../src}/components/TopBar.jsx | 0 {src => ClientBrowserUI/src}/index.css | 0 {src => ClientBrowserUI/src}/index.jsx | 0 .../src}/storage/CookieIO.js | 0 .../src}/utils/Context.jsx | 0 {src => ClientBrowserUI/src}/utils/Theme.js | 0 {modules => ServerApp}/config.py | 0 {modules => ServerApp}/get_address.py | 2 +- .../http_server/__init__.py | 32 +-- .../http_server/hook/ip_checker.py | 2 +- .../http_server/hook/ip_log.py | 4 +- .../http_server/route/dpad.py | 2 +- .../http_server/route/index.py | 0 .../http_server/route/keyboard.py | 2 +- .../http_server/route/mousebutton.py | 2 +- .../http_server/route/mousewheel.py | 4 +- .../http_server/route/system.py | 2 +- .../http_server/route/touchpad.py | 4 +- .../http_server/route/volume.py | 4 +- {modules => ServerApp}/log_manager.py | 2 +- {modules => ServerApp}/pyinstaller_context.py | 0 .../volume_controller/__init__.py | 6 +- .../volume_controller/base.py | 0 .../volume_controller/mac.py | 2 +- .../volume_controller/windows.py | 2 +- bin/ClearTemplateFiles.bat | 9 + bin/PyInstallerOneFile.bat | 21 +- bin/Reset&InitAllEnv.bat | 12 - iController.py | 8 +- iController.spec | 2 +- 56 files changed, 294 insertions(+), 69 deletions(-) create mode 100644 ClientBrowserUI/.gitignore rename package-lock.json => ClientBrowserUI/package-lock.json (100%) rename package.json => ClientBrowserUI/package.json (89%) rename {public => ClientBrowserUI/public}/256a.png (100%) rename {public => ClientBrowserUI/public}/256b.jpg (100%) rename {public => ClientBrowserUI/public}/index.html (80%) rename {src => ClientBrowserUI/src}/api/dpad.js (100%) rename {src => ClientBrowserUI/src}/api/keyboard.js (100%) rename {src => ClientBrowserUI/src}/api/mousebutton.js (100%) rename {src => ClientBrowserUI/src}/api/mousewheel.js (100%) rename {src => ClientBrowserUI/src}/api/system.js (100%) rename {src => ClientBrowserUI/src}/api/touchpad.js (100%) rename {src => ClientBrowserUI/src}/api/volume.js (100%) rename {src => ClientBrowserUI/src}/components/GeneralDidMount.jsx (100%) rename {src => ClientBrowserUI/src}/components/Screen/DPad.jsx (100%) rename {src => ClientBrowserUI/src}/components/Screen/MouseButtons.jsx (100%) rename {src => ClientBrowserUI/src}/components/Screen/Touchpad.jsx (100%) rename {src => ClientBrowserUI/src}/components/Screen/index.jsx (100%) rename {src => ClientBrowserUI/src}/components/SideBar/KeyboardMenu.jsx (100%) rename {src => ClientBrowserUI/src}/components/SideBar/ModulesSettingMenu.jsx (100%) rename {src => ClientBrowserUI/src}/components/SideBar/MouseWheelMenu.jsx (100%) rename {src => ClientBrowserUI/src}/components/SideBar/SettingMenu.jsx (100%) rename {src => ClientBrowserUI/src}/components/SideBar/ThemeMenu.jsx (100%) rename {src => ClientBrowserUI/src}/components/SideBar/VolumeMenu.jsx (100%) rename {src => ClientBrowserUI/src}/components/SideBar/index.jsx (100%) rename {src => ClientBrowserUI/src}/components/TopBar.jsx (100%) rename {src => ClientBrowserUI/src}/index.css (100%) rename {src => ClientBrowserUI/src}/index.jsx (100%) rename {src => ClientBrowserUI/src}/storage/CookieIO.js (100%) rename {src => ClientBrowserUI/src}/utils/Context.jsx (100%) rename {src => ClientBrowserUI/src}/utils/Theme.js (100%) rename {modules => ServerApp}/config.py (100%) rename {modules => ServerApp}/get_address.py (98%) rename {modules => ServerApp}/http_server/__init__.py (58%) rename {modules => ServerApp}/http_server/hook/ip_checker.py (95%) rename {modules => ServerApp}/http_server/hook/ip_log.py (67%) rename {modules => ServerApp}/http_server/route/dpad.py (93%) rename {modules => ServerApp}/http_server/route/index.py (100%) rename {modules => ServerApp}/http_server/route/keyboard.py (98%) rename {modules => ServerApp}/http_server/route/mousebutton.py (93%) rename {modules => ServerApp}/http_server/route/mousewheel.py (91%) rename {modules => ServerApp}/http_server/route/system.py (92%) rename {modules => ServerApp}/http_server/route/touchpad.py (94%) rename {modules => ServerApp}/http_server/route/volume.py (91%) rename {modules => ServerApp}/log_manager.py (97%) rename {modules => ServerApp}/pyinstaller_context.py (100%) rename {modules => ServerApp}/volume_controller/__init__.py (60%) rename {modules => ServerApp}/volume_controller/base.py (100%) rename {modules => ServerApp}/volume_controller/mac.py (84%) rename {modules => ServerApp}/volume_controller/windows.py (96%) create mode 100644 bin/ClearTemplateFiles.bat delete mode 100644 bin/Reset&InitAllEnv.bat diff --git a/.github/workflows/build-for-release.yml b/.github/workflows/build-for-release.yml index 640d6a6..92f5794 100644 --- a/.github/workflows/build-for-release.yml +++ b/.github/workflows/build-for-release.yml @@ -9,20 +9,29 @@ jobs: runs-on: windows-2022 steps: - uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '16' + + - name: React Build Frontend + run: | + cd ClientBrowserUI + npm install + npm run build + - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.10.10' + - name: Python Install Dependencies run: pip install -r requirements.txt - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '16' - - name: React Build Frontend - run: npm install && npm run build + - name: PyInstaller Build iController.exe run: pyinstaller iController.spec + - name: Create Zip Package run: | $folderName = "icontroller-${{ github.event.release.tag_name }}-portable-win-x64" @@ -34,6 +43,7 @@ jobs: Compress-Archive -Path $folderPath -DestinationPath ".\dist\$folderName.zip" echo "ARTIFACT_PATH=./dist/$folderName.zip" >> $env:GITHUB_ENV shell: pwsh + - name: Upload to Release uses: actions/upload-release-asset@v1 env: @@ -42,4 +52,4 @@ jobs: upload_url: ${{ github.event.release.upload_url }} asset_path: ${{ env.ARTIFACT_PATH }} asset_name: icontroller-${{ github.event.release.tag_name }}-portable-win-x64.zip - asset_content_type: application/zip + asset_content_type: application/zip \ No newline at end of file diff --git a/ClientBrowserUI/.gitignore b/ClientBrowserUI/.gitignore new file mode 100644 index 0000000..9de7bd4 --- /dev/null +++ b/ClientBrowserUI/.gitignore @@ -0,0 +1,205 @@ +# 调试用的配置文件 +config.yaml + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +#*.spec + +# All build packs +pack-* +icontroller-v* +output +dist + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +.idea/workspace.xml diff --git a/package-lock.json b/ClientBrowserUI/package-lock.json similarity index 100% rename from package-lock.json rename to ClientBrowserUI/package-lock.json diff --git a/package.json b/ClientBrowserUI/package.json similarity index 89% rename from package.json rename to ClientBrowserUI/package.json index df7a13d..7df5637 100644 --- a/package.json +++ b/ClientBrowserUI/package.json @@ -1,8 +1,8 @@ { "name": "iController", "scripts": { - "start": "react-scripts start", - "build": "react-scripts build" + "start": "npx react-scripts start", + "build": "npx react-scripts build" }, "dependencies": { "@emotion/react": "^11.11.0", diff --git a/public/256a.png b/ClientBrowserUI/public/256a.png similarity index 100% rename from public/256a.png rename to ClientBrowserUI/public/256a.png diff --git a/public/256b.jpg b/ClientBrowserUI/public/256b.jpg similarity index 100% rename from public/256b.jpg rename to ClientBrowserUI/public/256b.jpg diff --git a/public/index.html b/ClientBrowserUI/public/index.html similarity index 80% rename from public/index.html rename to ClientBrowserUI/public/index.html index 2870e38..aa3b2db 100644 --- a/public/index.html +++ b/ClientBrowserUI/public/index.html @@ -2,13 +2,13 @@ - + iController - - + + {##} diff --git a/src/api/dpad.js b/ClientBrowserUI/src/api/dpad.js similarity index 100% rename from src/api/dpad.js rename to ClientBrowserUI/src/api/dpad.js diff --git a/src/api/keyboard.js b/ClientBrowserUI/src/api/keyboard.js similarity index 100% rename from src/api/keyboard.js rename to ClientBrowserUI/src/api/keyboard.js diff --git a/src/api/mousebutton.js b/ClientBrowserUI/src/api/mousebutton.js similarity index 100% rename from src/api/mousebutton.js rename to ClientBrowserUI/src/api/mousebutton.js diff --git a/src/api/mousewheel.js b/ClientBrowserUI/src/api/mousewheel.js similarity index 100% rename from src/api/mousewheel.js rename to ClientBrowserUI/src/api/mousewheel.js diff --git a/src/api/system.js b/ClientBrowserUI/src/api/system.js similarity index 100% rename from src/api/system.js rename to ClientBrowserUI/src/api/system.js diff --git a/src/api/touchpad.js b/ClientBrowserUI/src/api/touchpad.js similarity index 100% rename from src/api/touchpad.js rename to ClientBrowserUI/src/api/touchpad.js diff --git a/src/api/volume.js b/ClientBrowserUI/src/api/volume.js similarity index 100% rename from src/api/volume.js rename to ClientBrowserUI/src/api/volume.js diff --git a/src/components/GeneralDidMount.jsx b/ClientBrowserUI/src/components/GeneralDidMount.jsx similarity index 100% rename from src/components/GeneralDidMount.jsx rename to ClientBrowserUI/src/components/GeneralDidMount.jsx diff --git a/src/components/Screen/DPad.jsx b/ClientBrowserUI/src/components/Screen/DPad.jsx similarity index 100% rename from src/components/Screen/DPad.jsx rename to ClientBrowserUI/src/components/Screen/DPad.jsx diff --git a/src/components/Screen/MouseButtons.jsx b/ClientBrowserUI/src/components/Screen/MouseButtons.jsx similarity index 100% rename from src/components/Screen/MouseButtons.jsx rename to ClientBrowserUI/src/components/Screen/MouseButtons.jsx diff --git a/src/components/Screen/Touchpad.jsx b/ClientBrowserUI/src/components/Screen/Touchpad.jsx similarity index 100% rename from src/components/Screen/Touchpad.jsx rename to ClientBrowserUI/src/components/Screen/Touchpad.jsx diff --git a/src/components/Screen/index.jsx b/ClientBrowserUI/src/components/Screen/index.jsx similarity index 100% rename from src/components/Screen/index.jsx rename to ClientBrowserUI/src/components/Screen/index.jsx diff --git a/src/components/SideBar/KeyboardMenu.jsx b/ClientBrowserUI/src/components/SideBar/KeyboardMenu.jsx similarity index 100% rename from src/components/SideBar/KeyboardMenu.jsx rename to ClientBrowserUI/src/components/SideBar/KeyboardMenu.jsx diff --git a/src/components/SideBar/ModulesSettingMenu.jsx b/ClientBrowserUI/src/components/SideBar/ModulesSettingMenu.jsx similarity index 100% rename from src/components/SideBar/ModulesSettingMenu.jsx rename to ClientBrowserUI/src/components/SideBar/ModulesSettingMenu.jsx diff --git a/src/components/SideBar/MouseWheelMenu.jsx b/ClientBrowserUI/src/components/SideBar/MouseWheelMenu.jsx similarity index 100% rename from src/components/SideBar/MouseWheelMenu.jsx rename to ClientBrowserUI/src/components/SideBar/MouseWheelMenu.jsx diff --git a/src/components/SideBar/SettingMenu.jsx b/ClientBrowserUI/src/components/SideBar/SettingMenu.jsx similarity index 100% rename from src/components/SideBar/SettingMenu.jsx rename to ClientBrowserUI/src/components/SideBar/SettingMenu.jsx diff --git a/src/components/SideBar/ThemeMenu.jsx b/ClientBrowserUI/src/components/SideBar/ThemeMenu.jsx similarity index 100% rename from src/components/SideBar/ThemeMenu.jsx rename to ClientBrowserUI/src/components/SideBar/ThemeMenu.jsx diff --git a/src/components/SideBar/VolumeMenu.jsx b/ClientBrowserUI/src/components/SideBar/VolumeMenu.jsx similarity index 100% rename from src/components/SideBar/VolumeMenu.jsx rename to ClientBrowserUI/src/components/SideBar/VolumeMenu.jsx diff --git a/src/components/SideBar/index.jsx b/ClientBrowserUI/src/components/SideBar/index.jsx similarity index 100% rename from src/components/SideBar/index.jsx rename to ClientBrowserUI/src/components/SideBar/index.jsx diff --git a/src/components/TopBar.jsx b/ClientBrowserUI/src/components/TopBar.jsx similarity index 100% rename from src/components/TopBar.jsx rename to ClientBrowserUI/src/components/TopBar.jsx diff --git a/src/index.css b/ClientBrowserUI/src/index.css similarity index 100% rename from src/index.css rename to ClientBrowserUI/src/index.css diff --git a/src/index.jsx b/ClientBrowserUI/src/index.jsx similarity index 100% rename from src/index.jsx rename to ClientBrowserUI/src/index.jsx diff --git a/src/storage/CookieIO.js b/ClientBrowserUI/src/storage/CookieIO.js similarity index 100% rename from src/storage/CookieIO.js rename to ClientBrowserUI/src/storage/CookieIO.js diff --git a/src/utils/Context.jsx b/ClientBrowserUI/src/utils/Context.jsx similarity index 100% rename from src/utils/Context.jsx rename to ClientBrowserUI/src/utils/Context.jsx diff --git a/src/utils/Theme.js b/ClientBrowserUI/src/utils/Theme.js similarity index 100% rename from src/utils/Theme.js rename to ClientBrowserUI/src/utils/Theme.js diff --git a/modules/config.py b/ServerApp/config.py similarity index 100% rename from modules/config.py rename to ServerApp/config.py diff --git a/modules/get_address.py b/ServerApp/get_address.py similarity index 98% rename from modules/get_address.py rename to ServerApp/get_address.py index 8769821..e8889f8 100644 --- a/modules/get_address.py +++ b/ServerApp/get_address.py @@ -1,6 +1,6 @@ import socket import platform -from modules.config import Config +from ServerApp.config import Config def port_checker(port): diff --git a/modules/http_server/__init__.py b/ServerApp/http_server/__init__.py similarity index 58% rename from modules/http_server/__init__.py rename to ServerApp/http_server/__init__.py index 9b9d38d..5bee8b6 100644 --- a/modules/http_server/__init__.py +++ b/ServerApp/http_server/__init__.py @@ -1,25 +1,25 @@ from quart import Quart, send_from_directory -from modules.http_server.route.dpad import dpad -from modules.http_server.route.keyboard import keyboard_buttons -from modules.http_server.route.keyboard import keyboard_typewriting -from modules.http_server.route.keyboard import keyboard_pastetext -from modules.http_server.route.system import get_system_info -from modules.http_server.route.mousebutton import mousebutton -from modules.http_server.route.mousewheel import mousewheel -from modules.http_server.route.touchpad import touchpad -from modules.http_server.route.touchpad import touchpad_reposition -from modules.http_server.route.volume import volume_get -from modules.http_server.route.volume import volume_set -from modules.http_server.hook.ip_checker import ip_checker -from modules.http_server.hook.ip_log import ip_log -from modules.pyinstaller_context import PyInstallerContext +from ServerApp.http_server.route.dpad import dpad +from ServerApp.http_server.route.keyboard import keyboard_buttons +from ServerApp.http_server.route.keyboard import keyboard_typewriting +from ServerApp.http_server.route.keyboard import keyboard_pastetext +from ServerApp.http_server.route.system import get_system_info +from ServerApp.http_server.route.mousebutton import mousebutton +from ServerApp.http_server.route.mousewheel import mousewheel +from ServerApp.http_server.route.touchpad import touchpad +from ServerApp.http_server.route.touchpad import touchpad_reposition +from ServerApp.http_server.route.volume import volume_get +from ServerApp.http_server.route.volume import volume_set +from ServerApp.http_server.hook.ip_checker import ip_checker +from ServerApp.http_server.hook.ip_log import ip_log +from ServerApp.pyinstaller_context import PyInstallerContext -def HttpServer(static_folder='build') -> Quart: +def HttpServer(static_folder) -> Quart: """ Http server for iController. - :param static_folder: The folder for static files build by React, default is "build". + :param static_folder: The folder for static files build by React :return: Quart server object. """ pyinstallerContext = PyInstallerContext() diff --git a/modules/http_server/hook/ip_checker.py b/ServerApp/http_server/hook/ip_checker.py similarity index 95% rename from modules/http_server/hook/ip_checker.py rename to ServerApp/http_server/hook/ip_checker.py index abf5d31..bc23cc8 100644 --- a/modules/http_server/hook/ip_checker.py +++ b/ServerApp/http_server/hook/ip_checker.py @@ -1,5 +1,5 @@ from quart import request, abort -from modules.config import Config +from ServerApp.config import Config async def ip_checker(): diff --git a/modules/http_server/hook/ip_log.py b/ServerApp/http_server/hook/ip_log.py similarity index 67% rename from modules/http_server/hook/ip_log.py rename to ServerApp/http_server/hook/ip_log.py index 4be6cb0..fdcaf3d 100644 --- a/modules/http_server/hook/ip_log.py +++ b/ServerApp/http_server/hook/ip_log.py @@ -1,6 +1,6 @@ from quart import request -from modules.log_manager import LogManager -from modules.config import Config +from ServerApp.log_manager import LogManager +from ServerApp.config import Config async def ip_log(): diff --git a/modules/http_server/route/dpad.py b/ServerApp/http_server/route/dpad.py similarity index 93% rename from modules/http_server/route/dpad.py rename to ServerApp/http_server/route/dpad.py index 291d2e2..f323a63 100644 --- a/modules/http_server/route/dpad.py +++ b/ServerApp/http_server/route/dpad.py @@ -1,6 +1,6 @@ from quart import jsonify, request import pyautogui -from modules.log_manager import LogManager +from ServerApp.log_manager import LogManager async def dpad(): diff --git a/modules/http_server/route/index.py b/ServerApp/http_server/route/index.py similarity index 100% rename from modules/http_server/route/index.py rename to ServerApp/http_server/route/index.py diff --git a/modules/http_server/route/keyboard.py b/ServerApp/http_server/route/keyboard.py similarity index 98% rename from modules/http_server/route/keyboard.py rename to ServerApp/http_server/route/keyboard.py index 3e58205..dc4cd61 100644 --- a/modules/http_server/route/keyboard.py +++ b/ServerApp/http_server/route/keyboard.py @@ -2,7 +2,7 @@ import pyautogui import pyperclip import platform -from modules.log_manager import LogManager +from ServerApp.log_manager import LogManager async def keyboard_buttons(): diff --git a/modules/http_server/route/mousebutton.py b/ServerApp/http_server/route/mousebutton.py similarity index 93% rename from modules/http_server/route/mousebutton.py rename to ServerApp/http_server/route/mousebutton.py index 1e2766f..0bd604c 100644 --- a/modules/http_server/route/mousebutton.py +++ b/ServerApp/http_server/route/mousebutton.py @@ -1,6 +1,6 @@ from quart import request, jsonify import pyautogui -from modules.log_manager import LogManager +from ServerApp.log_manager import LogManager async def mousebutton(): diff --git a/modules/http_server/route/mousewheel.py b/ServerApp/http_server/route/mousewheel.py similarity index 91% rename from modules/http_server/route/mousewheel.py rename to ServerApp/http_server/route/mousewheel.py index f200a36..1d3874e 100644 --- a/modules/http_server/route/mousewheel.py +++ b/ServerApp/http_server/route/mousewheel.py @@ -1,7 +1,7 @@ from quart import request, jsonify import pyautogui -from modules.config import Config -from modules.log_manager import LogManager +from ServerApp.config import Config +from ServerApp.log_manager import LogManager async def mousewheel(): diff --git a/modules/http_server/route/system.py b/ServerApp/http_server/route/system.py similarity index 92% rename from modules/http_server/route/system.py rename to ServerApp/http_server/route/system.py index 8880e0e..480972c 100644 --- a/modules/http_server/route/system.py +++ b/ServerApp/http_server/route/system.py @@ -1,6 +1,6 @@ from quart import jsonify import platform -from modules.log_manager import LogManager +from ServerApp.log_manager import LogManager async def get_system_info(): diff --git a/modules/http_server/route/touchpad.py b/ServerApp/http_server/route/touchpad.py similarity index 94% rename from modules/http_server/route/touchpad.py rename to ServerApp/http_server/route/touchpad.py index c788b85..55412aa 100644 --- a/modules/http_server/route/touchpad.py +++ b/ServerApp/http_server/route/touchpad.py @@ -2,8 +2,8 @@ import pyautogui import struct from quart import request, jsonify -from modules.config import Config -from modules.log_manager import LogManager +from ServerApp.config import Config +from ServerApp.log_manager import LogManager def handle_touchpad(data): diff --git a/modules/http_server/route/volume.py b/ServerApp/http_server/route/volume.py similarity index 91% rename from modules/http_server/route/volume.py rename to ServerApp/http_server/route/volume.py index fa06d9f..215cf25 100644 --- a/modules/http_server/route/volume.py +++ b/ServerApp/http_server/route/volume.py @@ -1,6 +1,6 @@ from quart import request, jsonify -from modules.volume_controller import get_volume_controller -from modules.log_manager import LogManager +from ServerApp.volume_controller import get_volume_controller +from ServerApp.log_manager import LogManager async def volume_get(): diff --git a/modules/log_manager.py b/ServerApp/log_manager.py similarity index 97% rename from modules/log_manager.py rename to ServerApp/log_manager.py index 0e316ad..8fb311d 100644 --- a/modules/log_manager.py +++ b/ServerApp/log_manager.py @@ -1,6 +1,6 @@ import os from datetime import datetime -from modules.config import Config +from ServerApp.config import Config class LogManager: diff --git a/modules/pyinstaller_context.py b/ServerApp/pyinstaller_context.py similarity index 100% rename from modules/pyinstaller_context.py rename to ServerApp/pyinstaller_context.py diff --git a/modules/volume_controller/__init__.py b/ServerApp/volume_controller/__init__.py similarity index 60% rename from modules/volume_controller/__init__.py rename to ServerApp/volume_controller/__init__.py index 8a0ac50..c5a3520 100644 --- a/modules/volume_controller/__init__.py +++ b/ServerApp/volume_controller/__init__.py @@ -1,14 +1,14 @@ -from modules.volume_controller.base import BaseVolumeController +from ServerApp.volume_controller.base import BaseVolumeController import platform def get_volume_controller() -> BaseVolumeController: os_name = platform.system() if os_name == 'Windows': - from modules.volume_controller.windows import WindowsVolumeController + from ServerApp.volume_controller.windows import WindowsVolumeController return WindowsVolumeController() elif os_name == 'Darwin': - from modules.volume_controller.mac import MacVolumeController + from ServerApp.volume_controller.mac import MacVolumeController return MacVolumeController() else: raise NotImplementedError("This OS is not supported for volume control") diff --git a/modules/volume_controller/base.py b/ServerApp/volume_controller/base.py similarity index 100% rename from modules/volume_controller/base.py rename to ServerApp/volume_controller/base.py diff --git a/modules/volume_controller/mac.py b/ServerApp/volume_controller/mac.py similarity index 84% rename from modules/volume_controller/mac.py rename to ServerApp/volume_controller/mac.py index 4539aba..378ddf6 100644 --- a/modules/volume_controller/mac.py +++ b/ServerApp/volume_controller/mac.py @@ -1,4 +1,4 @@ -from modules.volume_controller.base import BaseVolumeController +from ServerApp.volume_controller.base import BaseVolumeController import os diff --git a/modules/volume_controller/windows.py b/ServerApp/volume_controller/windows.py similarity index 96% rename from modules/volume_controller/windows.py rename to ServerApp/volume_controller/windows.py index b745fab..d8c7f33 100644 --- a/modules/volume_controller/windows.py +++ b/ServerApp/volume_controller/windows.py @@ -1,4 +1,4 @@ -from modules.volume_controller.base import BaseVolumeController +from ServerApp.volume_controller.base import BaseVolumeController from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume from comtypes import CLSCTX_ALL, CoInitializeEx, COINIT_MULTITHREADED, CoUninitialize from ctypes import cast, POINTER diff --git a/bin/ClearTemplateFiles.bat b/bin/ClearTemplateFiles.bat new file mode 100644 index 0000000..3b1454d --- /dev/null +++ b/bin/ClearTemplateFiles.bat @@ -0,0 +1,9 @@ +cd /d %~dp0 +cd ../ +for /d /r . %%d in (__pycache__) do @if exist "%%d" rd /s /q "%%d" +for /r . %%i in (*.toc) do @del "%%i" +rd /s /q dist +rd /s /q build +rd /s /q venv +rd /s /q logs +pause diff --git a/bin/PyInstallerOneFile.bat b/bin/PyInstallerOneFile.bat index fbd5a42..a7ac9ae 100644 --- a/bin/PyInstallerOneFile.bat +++ b/bin/PyInstallerOneFile.bat @@ -1,13 +1,26 @@ cd /d %~dp0 cd ../ + for /d /r . %%d in (__pycache__) do @if exist "%%d" rd /s /q "%%d" for /r . %%i in (*.toc) do @del "%%i" rd /s /q dist rd /s /q build -docker run -it --rm -v %cd%:/docker -w /docker node:16-bullseye bash -c "npm i; npm run build; exit" -rd /s /q /venv +rd /s /q venv +rd /s /q logs + +where docker >nul 2>nul +if %errorlevel% neq 0 ( + cd ClientBrowserUI + npm install + npm run build + cd .. +) else ( + docker run -it --rm -v %cd%:/docker -w /docker node:16-bullseye bash -c "cd ClientBrowserUI; npm i; npm run build; exit" +) + python -m venv venv call venv\Scripts\activate pip install -r requirements.txt -pyinstaller --noconfirm --onefile --console --icon "#README/icon/256a.ico" --add-data "build;build/" --add-data "modules;modules/" "iController.py" -pause +pyinstaller iController.spec + +pause \ No newline at end of file diff --git a/bin/Reset&InitAllEnv.bat b/bin/Reset&InitAllEnv.bat deleted file mode 100644 index b4d08c2..0000000 --- a/bin/Reset&InitAllEnv.bat +++ /dev/null @@ -1,12 +0,0 @@ -cd /d %~dp0 -cd ../ -for /d /r . %%d in (__pycache__) do @if exist "%%d" rd /s /q "%%d" -for /r . %%i in (*.toc) do @del "%%i" -rd /s /q dist -rd /s /q build -docker run -it --rm -v %cd%:/docker -w /docker node:16-bullseye bash -c "npm i; npm run build; exit" -rd /s /q /venv -python -m venv venv -call venv\Scripts\activate -pip install -r requirements.txt -pause diff --git a/iController.py b/iController.py index 981c92d..3d17ae7 100644 --- a/iController.py +++ b/iController.py @@ -1,9 +1,9 @@ import asyncio from hypercorn.config import Config as HypercornConfig from hypercorn.asyncio import serve -from modules.http_server import HttpServer -from modules.get_address import get_address -from modules.config import Config +from ServerApp.http_server import HttpServer +from ServerApp.get_address import get_address +from ServerApp.config import Config print(""" _ ___ _ _ _ @@ -18,7 +18,7 @@ """) Config.init() -app = HttpServer() +app = HttpServer("ClientBrowserUI/build") config = HypercornConfig() config.bind = [get_address()] asyncio.run(serve(app, config)) diff --git a/iController.spec b/iController.spec index afc52a8..dc356a2 100644 --- a/iController.spec +++ b/iController.spec @@ -5,7 +5,7 @@ a = Analysis( ['iController.py'], pathex=[], binaries=[], - datas=[('build', 'build/'), ('modules', 'modules/')], + datas=[('ClientBrowserUI/build', 'ClientBrowserUI/build/'), ('ServerApp', 'ServerApp/')], hiddenimports=[], hookspath=[], hooksconfig={}, From 0ca958bc6fd34c8594aa064d0bf1a2da3b0f2e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Sat, 28 Dec 2024 04:09:22 +0800 Subject: [PATCH 03/12] Add .idea to gitignore --- .gitignore | 4 ++++ .idea/.gitignore | 10 ---------- .idea/iController.iml | 12 ------------ .idea/modules.xml | 8 -------- .idea/vcs.xml | 6 ------ ServerApp/http_server/__init__.py | 3 +-- 6 files changed, 5 insertions(+), 38 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/iController.iml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.gitignore b/.gitignore index 9de7bd4..486ea46 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ # 调试用的配置文件 config.yaml +# JetBrains IDE +.idea + # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. @@ -203,3 +206,4 @@ cython_debug/ #.idea/ .idea/workspace.xml +.idea/iController.iml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index a9d7db9..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# GitHub Copilot persisted chat sessions -/copilot/chatSessions diff --git a/.idea/iController.iml b/.idea/iController.iml deleted file mode 100644 index 24643cc..0000000 --- a/.idea/iController.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 4f6f21f..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/ServerApp/http_server/__init__.py b/ServerApp/http_server/__init__.py index 5bee8b6..72245e7 100644 --- a/ServerApp/http_server/__init__.py +++ b/ServerApp/http_server/__init__.py @@ -22,8 +22,7 @@ def HttpServer(static_folder) -> Quart: :param static_folder: The folder for static files build by React :return: Quart server object. """ - pyinstallerContext = PyInstallerContext() - app = Quart(__name__, static_folder=pyinstallerContext.resource_path(static_folder), static_url_path='') + app = Quart(__name__, static_folder=PyInstallerContext().resource_path(static_folder), static_url_path='') app.before_request(ip_checker) app.before_request(ip_log) From 3a917fe650feb6675430f2dacc2dfeaca95c68ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Sat, 28 Dec 2024 04:27:39 +0800 Subject: [PATCH 04/12] Fix dependabot/43 CVE-2024-49767 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3d1f9ab..d5324d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Quart~=0.19.5 +Quart>=0.20.0 pyautogui==0.9.54 pyinstaller==6.5.0 #auto-py-to-exe==2.42.0 From 49d01a6fce4c117ae13a55cbd027b348d755e183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Sat, 28 Dec 2024 05:21:13 +0800 Subject: [PATCH 05/12] Update to React19 --- ClientBrowserUI/package-lock.json | 783 +++++++++++++----------------- ClientBrowserUI/package.json | 14 +- ClientBrowserUI/src/index.jsx | 5 +- bin/ClearTemplateFiles.bat | 4 + bin/NpmCheckUpdates.bat | 9 + bin/PyInstallerOneFile.bat | 2 + 6 files changed, 374 insertions(+), 443 deletions(-) create mode 100644 bin/NpmCheckUpdates.bat diff --git a/ClientBrowserUI/package-lock.json b/ClientBrowserUI/package-lock.json index b2f4635..11c355e 100644 --- a/ClientBrowserUI/package-lock.json +++ b/ClientBrowserUI/package-lock.json @@ -6,15 +6,15 @@ "": { "name": "iController", "dependencies": { - "@emotion/react": "^11.11.0", - "@emotion/styled": "^11.11.0", - "@mui/icons-material": "^5.11.16", - "@mui/material": "^5.13.1", + "@emotion/react": "^11.14.0", + "@emotion/styled": "^11.14.0", + "@mui/icons-material": "^6.3.0", + "@mui/material": "^6.3.0", "lodash": "^4.17.21", - "primereact": "^10.5.3", - "react": "18.2.0", + "primereact": "^10.8.5", + "react": "19.0.0", "react-color": "^2.19.3", - "react-dom": "18.2.0", + "react-dom": "19.0.0", "react-scripts": "5.0.1" }, "devDependencies": { @@ -1975,9 +1975,9 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "node_modules/@babel/runtime": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", - "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -2307,15 +2307,15 @@ } }, "node_modules/@emotion/babel-plugin": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", - "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", + "version": "11.13.5", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz", + "integrity": "sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==", "dependencies": { "@babel/helper-module-imports": "^7.16.7", "@babel/runtime": "^7.18.3", - "@emotion/hash": "^0.9.1", - "@emotion/memoize": "^0.8.1", - "@emotion/serialize": "^1.1.2", + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/serialize": "^1.3.3", "babel-plugin-macros": "^3.1.0", "convert-source-map": "^1.5.0", "escape-string-regexp": "^4.0.0", @@ -2325,47 +2325,47 @@ } }, "node_modules/@emotion/cache": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", - "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", - "dependencies": { - "@emotion/memoize": "^0.8.1", - "@emotion/sheet": "^1.2.2", - "@emotion/utils": "^1.2.1", - "@emotion/weak-memoize": "^0.3.1", + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.14.0.tgz", + "integrity": "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==", + "dependencies": { + "@emotion/memoize": "^0.9.0", + "@emotion/sheet": "^1.4.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", "stylis": "4.2.0" } }, "node_modules/@emotion/hash": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", - "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", + "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==" }, "node_modules/@emotion/is-prop-valid": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", - "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz", + "integrity": "sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw==", "dependencies": { - "@emotion/memoize": "^0.8.1" + "@emotion/memoize": "^0.9.0" } }, "node_modules/@emotion/memoize": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", + "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==" }, "node_modules/@emotion/react": { - "version": "11.11.4", - "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.4.tgz", - "integrity": "sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==", + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", + "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", "dependencies": { "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.11.0", - "@emotion/cache": "^11.11.0", - "@emotion/serialize": "^1.1.3", - "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", - "@emotion/utils": "^1.2.1", - "@emotion/weak-memoize": "^0.3.1", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/cache": "^11.14.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", "hoist-non-react-statics": "^3.3.1" }, "peerDependencies": { @@ -2378,33 +2378,33 @@ } }, "node_modules/@emotion/serialize": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.3.tgz", - "integrity": "sha512-iD4D6QVZFDhcbH0RAG1uVu1CwVLMWUkCvAqqlewO/rxf8+87yIBAlt4+AxMiiKPLs5hFc0owNk/sLLAOROw3cA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz", + "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==", "dependencies": { - "@emotion/hash": "^0.9.1", - "@emotion/memoize": "^0.8.1", - "@emotion/unitless": "^0.8.1", - "@emotion/utils": "^1.2.1", + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/unitless": "^0.10.0", + "@emotion/utils": "^1.4.2", "csstype": "^3.0.2" } }, "node_modules/@emotion/sheet": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", - "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", + "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==" }, "node_modules/@emotion/styled": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.0.tgz", - "integrity": "sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==", + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.0.tgz", + "integrity": "sha512-XxfOnXFffatap2IyCeJyNov3kiDQWoR08gPUQxvbL7fxKryGBKUZUkG6Hz48DZwVrJSVh9sJboyV1Ds4OW6SgA==", "dependencies": { "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.11.0", - "@emotion/is-prop-valid": "^1.2.1", - "@emotion/serialize": "^1.1.2", - "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", - "@emotion/utils": "^1.2.1" + "@emotion/babel-plugin": "^11.13.5", + "@emotion/is-prop-valid": "^1.3.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2" }, "peerDependencies": { "@emotion/react": "^11.0.0-rc.0", @@ -2417,27 +2417,27 @@ } }, "node_modules/@emotion/unitless": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", - "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", + "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==" }, "node_modules/@emotion/use-insertion-effect-with-fallbacks": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", - "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.2.0.tgz", + "integrity": "sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg==", "peerDependencies": { "react": ">=16.8.0" } }, "node_modules/@emotion/utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", - "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz", + "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==" }, "node_modules/@emotion/weak-memoize": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", - "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", + "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==" }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", @@ -2532,40 +2532,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@floating-ui/core": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", - "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==", - "dependencies": { - "@floating-ui/utils": "^0.2.1" - } - }, - "node_modules/@floating-ui/dom": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", - "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", - "dependencies": { - "@floating-ui/core": "^1.0.0", - "@floating-ui/utils": "^0.2.0" - } - }, - "node_modules/@floating-ui/react-dom": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.8.tgz", - "integrity": "sha512-HOdqOt3R3OGeTKidaLvJKcgg75S6tibQ3Tif4eyd91QnIJWr0NLvoXFpJA/j8HqkFSL68GDca9AuyWEHlhyClw==", - "dependencies": { - "@floating-ui/dom": "^1.6.1" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, - "node_modules/@floating-ui/utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz", - "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -3416,64 +3382,33 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, - "node_modules/@mui/base": { - "version": "5.0.0-beta.37", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.37.tgz", - "integrity": "sha512-/o3anbb+DeCng8jNsd3704XtmmLDZju1Fo8R2o7ugrVtPQ/QpcqddwKNzKPZwa0J5T8YNW3ZVuHyQgbTnQLisQ==", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@floating-ui/react-dom": "^2.0.8", - "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.11", - "@popperjs/core": "^2.11.8", - "clsx": "^2.1.0", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.11.tgz", - "integrity": "sha512-JVrJ9Jo4gyU707ujnRzmE8ABBWpXd6FwL9GYULmwZRtfPg89ggXs/S3MStQkpJ1JRWfdLL6S5syXmgQGq5EDAw==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.3.0.tgz", + "integrity": "sha512-/d8NwSuC3rMwCjswmGB3oXC4sdDuhIUJ8inVQAxGrADJhf0eq/kmy+foFKvpYhHl2siOZR+MLdFttw6/Bzqtqg==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" } }, "node_modules/@mui/icons-material": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.11.tgz", - "integrity": "sha512-R5ZoQqnKpd+5Ew7mBygTFLxgYsQHPhgR3TDXSgIHYIjGzYuyPLmGLSdcPUoMdi6kxiYqHlpPj4NJxlbaFD0UHA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-6.3.0.tgz", + "integrity": "sha512-3uWws6DveDn5KxCS34p+sUNMxehuclQY6OmoJeJJ+Sfg9L7LGBpksY/nX5ywKAqickTZnn+sQyVcp963ep9jvw==", "dependencies": { - "@babel/runtime": "^7.23.9" + "@babel/runtime": "^7.26.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@mui/material": "^5.0.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" + "@mui/material": "^6.3.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -3482,25 +3417,25 @@ } }, "node_modules/@mui/material": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.11.tgz", - "integrity": "sha512-FA3eEuEZaDaxgN3CgfXezMWbCZ4VCeU/sv0F0/PK5n42qIgsPVD6q+j71qS7/62sp6wRFMHtDMpXRlN+tT/7NA==", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/base": "5.0.0-beta.37", - "@mui/core-downloads-tracker": "^5.15.11", - "@mui/system": "^5.15.11", - "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.11", - "@types/react-transition-group": "^4.4.10", - "clsx": "^2.1.0", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.3.0.tgz", + "integrity": "sha512-qhlTFyRMxfoVPxUtA5e8IvqxP0dWo2Ij7cvot7Orag+etUlZH+3UwD8gZGt+3irOoy7Ms3UNBflYjwEikUXtAQ==", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/core-downloads-tracker": "^6.3.0", + "@mui/system": "^6.3.0", + "@mui/types": "^7.2.20", + "@mui/utils": "^6.3.0", + "@popperjs/core": "^2.11.8", + "@types/react-transition-group": "^4.4.12", + "clsx": "^2.1.1", "csstype": "^3.1.3", "prop-types": "^15.8.1", - "react-is": "^18.2.0", + "react-is": "^19.0.0", "react-transition-group": "^4.4.5" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", @@ -3509,9 +3444,10 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@mui/material-pigment-css": "^6.3.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { @@ -3520,30 +3456,38 @@ "@emotion/styled": { "optional": true }, + "@mui/material-pigment-css": { + "optional": true + }, "@types/react": { "optional": true } } }, + "node_modules/@mui/material/node_modules/react-is": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", + "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==" + }, "node_modules/@mui/private-theming": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.11.tgz", - "integrity": "sha512-jY/696SnSxSzO1u86Thym7ky5T9CgfidU3NFJjguldqK4f3Z5S97amZ6nffg8gTD0HBjY9scB+4ekqDEUmxZOA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.3.0.tgz", + "integrity": "sha512-tdS8jvqMokltNTXg6ioRCCbVdDmZUJZa/T9VtTnX2Lwww3FTgCakst9tWLZSxm1fEE9Xp0m7onZJmgeUmWQYVw==", "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/utils": "^5.15.11", + "@babel/runtime": "^7.26.0", + "@mui/utils": "^6.3.0", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -3552,17 +3496,19 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.11.tgz", - "integrity": "sha512-So21AhAngqo07ces4S/JpX5UaMU2RHXpEA6hNzI6IQjd/1usMPxpgK8wkGgTe3JKmC2KDmH8cvoycq5H3Ii7/w==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.3.0.tgz", + "integrity": "sha512-iWA6eyiPkO07AlHxRUvI7dwVRSc+84zV54kLmjUms67GJeOWVuXlu8ZO+UhCnwJxHacghxnabsMEqet5PYQmHg==", "dependencies": { - "@babel/runtime": "^7.23.9", - "@emotion/cache": "^11.11.0", + "@babel/runtime": "^7.26.0", + "@emotion/cache": "^11.13.5", + "@emotion/serialize": "^1.3.3", + "@emotion/sheet": "^1.4.0", "csstype": "^3.1.3", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", @@ -3571,7 +3517,7 @@ "peerDependencies": { "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "react": "^17.0.0 || ^18.0.0" + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { @@ -3583,21 +3529,21 @@ } }, "node_modules/@mui/system": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.11.tgz", - "integrity": "sha512-9j35suLFq+MgJo5ktVSHPbkjDLRMBCV17NMBdEQurh6oWyGnLM4uhU4QGZZQ75o0vuhjJghOCA1jkO3+79wKsA==", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/private-theming": "^5.15.11", - "@mui/styled-engine": "^5.15.11", - "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.11", - "clsx": "^2.1.0", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.3.0.tgz", + "integrity": "sha512-L+8hUHMNlfReKSqcnVslFrVhoNfz/jw7Fe9NfDE85R3KarvZ4O3MU9daF/lZeqEAvnYxEilkkTfDwQ7qCgJdFg==", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/private-theming": "^6.3.0", + "@mui/styled-engine": "^6.3.0", + "@mui/types": "^7.2.20", + "@mui/utils": "^6.3.0", + "clsx": "^2.1.1", "csstype": "^3.1.3", "prop-types": "^15.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", @@ -3606,8 +3552,8 @@ "peerDependencies": { "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@emotion/react": { @@ -3622,11 +3568,11 @@ } }, "node_modules/@mui/types": { - "version": "7.2.13", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.13.tgz", - "integrity": "sha512-qP9OgacN62s+l8rdDhSFRe05HWtLLJ5TGclC9I1+tQngbssu0m2dmFZs+Px53AcOs9fD7TbYd4gc9AXzVqO/+g==", + "version": "7.2.20", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.20.tgz", + "integrity": "sha512-straFHD7L8v05l/N5vcWk+y7eL9JF0C2mtph/y4BPm3gn2Eh61dDwDB65pa8DLss3WJfDXYC7Kx5yjP0EmXpgw==", "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -3635,25 +3581,27 @@ } }, "node_modules/@mui/utils": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.11.tgz", - "integrity": "sha512-D6bwqprUa9Stf8ft0dcMqWyWDKEo7D+6pB1k8WajbqlYIRA8J8Kw9Ra7PSZKKePGBGWO+/xxrX1U8HpG/aXQCw==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.3.0.tgz", + "integrity": "sha512-MkDBF08OPVwXhAjedyMykRojgvmf0y/jxkBWjystpfI/pasyTYrfdv4jic6s7j3y2+a+SJzS9qrD6X8ZYj/8AQ==", "dependencies": { - "@babel/runtime": "^7.23.9", - "@types/prop-types": "^15.7.11", + "@babel/runtime": "^7.26.0", + "@mui/types": "^7.2.20", + "@types/prop-types": "^15.7.14", + "clsx": "^2.1.1", "prop-types": "^15.8.1", - "react-is": "^18.2.0" + "react-is": "^19.0.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -3661,6 +3609,11 @@ } } }, + "node_modules/@mui/utils/node_modules/react-is": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", + "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==" + }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -4326,9 +4279,9 @@ "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==" }, "node_modules/@types/prop-types": { - "version": "15.7.11", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", - "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" + "version": "15.7.14", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz", + "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==" }, "node_modules/@types/q": { "version": "1.5.8", @@ -4349,6 +4302,7 @@ "version": "18.2.61", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.61.tgz", "integrity": "sha512-NURTN0qNnJa7O/k4XUkEW2yfygA+NxS0V5h1+kp9jPwhzZy95q3ADoGMP0+JypMhrZBTTgjKAUlTctde1zzeQA==", + "peer": true, "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -4356,10 +4310,10 @@ } }, "node_modules/@types/react-transition-group": { - "version": "4.4.10", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", - "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", - "dependencies": { + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", + "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", + "peerDependencies": { "@types/react": "*" } }, @@ -4379,7 +4333,8 @@ "node_modules/@types/scheduler": { "version": "0.16.8", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", - "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==" + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", + "peer": true }, "node_modules/@types/semver": { "version": "7.5.8", @@ -6054,9 +6009,9 @@ } }, "node_modules/clsx": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", - "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", "engines": { "node": ">=6" } @@ -14572,9 +14527,9 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, "node_modules/primereact": { - "version": "10.5.3", - "resolved": "https://registry.npmjs.org/primereact/-/primereact-10.5.3.tgz", - "integrity": "sha512-uKfGU6jWdDnTOnfAj9IjbRuzJVtFqzbgZVSVe5OgxVVxT6JoImF28uj/iQlFJJs17WHi1SWtOmXTjSBqtL8fUg==", + "version": "10.8.5", + "resolved": "https://registry.npmjs.org/primereact/-/primereact-10.8.5.tgz", + "integrity": "sha512-B1LeJdNGGAB8P1VRJE0TDYz6rZSDwxE7Ft8PLFjRYLO44+mIJNDsLYSB56LRJOoqUNRhQrRIe/5ctS5eyQAzwQ==", "dependencies": { "@types/react-transition-group": "^4.4.1", "react-transition-group": "^4.4.1" @@ -14583,9 +14538,9 @@ "node": ">=14.0.0" }, "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -14771,12 +14726,9 @@ } }, "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", "engines": { "node": ">=0.10.0" } @@ -14926,15 +14878,14 @@ } }, "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", + "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.25.0" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^19.0.0" } }, "node_modules/react-error-overlay": { @@ -15585,12 +15536,9 @@ } }, "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", - "dependencies": { - "loose-envify": "^1.1.0" - } + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==" }, "node_modules/schema-utils": { "version": "3.3.0", @@ -19553,9 +19501,9 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "@babel/runtime": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", - "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "requires": { "regenerator-runtime": "^0.14.0" } @@ -19729,15 +19677,15 @@ "requires": {} }, "@emotion/babel-plugin": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", - "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", + "version": "11.13.5", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz", + "integrity": "sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==", "requires": { "@babel/helper-module-imports": "^7.16.7", "@babel/runtime": "^7.18.3", - "@emotion/hash": "^0.9.1", - "@emotion/memoize": "^0.8.1", - "@emotion/serialize": "^1.1.2", + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/serialize": "^1.3.3", "babel-plugin-macros": "^3.1.0", "convert-source-map": "^1.5.0", "escape-string-regexp": "^4.0.0", @@ -19747,100 +19695,100 @@ } }, "@emotion/cache": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", - "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", - "requires": { - "@emotion/memoize": "^0.8.1", - "@emotion/sheet": "^1.2.2", - "@emotion/utils": "^1.2.1", - "@emotion/weak-memoize": "^0.3.1", + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.14.0.tgz", + "integrity": "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==", + "requires": { + "@emotion/memoize": "^0.9.0", + "@emotion/sheet": "^1.4.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", "stylis": "4.2.0" } }, "@emotion/hash": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", - "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", + "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==" }, "@emotion/is-prop-valid": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", - "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz", + "integrity": "sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw==", "requires": { - "@emotion/memoize": "^0.8.1" + "@emotion/memoize": "^0.9.0" } }, "@emotion/memoize": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", - "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", + "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==" }, "@emotion/react": { - "version": "11.11.4", - "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.4.tgz", - "integrity": "sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==", + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", + "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", "requires": { "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.11.0", - "@emotion/cache": "^11.11.0", - "@emotion/serialize": "^1.1.3", - "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", - "@emotion/utils": "^1.2.1", - "@emotion/weak-memoize": "^0.3.1", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/cache": "^11.14.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", "hoist-non-react-statics": "^3.3.1" } }, "@emotion/serialize": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.3.tgz", - "integrity": "sha512-iD4D6QVZFDhcbH0RAG1uVu1CwVLMWUkCvAqqlewO/rxf8+87yIBAlt4+AxMiiKPLs5hFc0owNk/sLLAOROw3cA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz", + "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==", "requires": { - "@emotion/hash": "^0.9.1", - "@emotion/memoize": "^0.8.1", - "@emotion/unitless": "^0.8.1", - "@emotion/utils": "^1.2.1", + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/unitless": "^0.10.0", + "@emotion/utils": "^1.4.2", "csstype": "^3.0.2" } }, "@emotion/sheet": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", - "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", + "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==" }, "@emotion/styled": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.0.tgz", - "integrity": "sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==", + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.0.tgz", + "integrity": "sha512-XxfOnXFffatap2IyCeJyNov3kiDQWoR08gPUQxvbL7fxKryGBKUZUkG6Hz48DZwVrJSVh9sJboyV1Ds4OW6SgA==", "requires": { "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.11.0", - "@emotion/is-prop-valid": "^1.2.1", - "@emotion/serialize": "^1.1.2", - "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", - "@emotion/utils": "^1.2.1" + "@emotion/babel-plugin": "^11.13.5", + "@emotion/is-prop-valid": "^1.3.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2" } }, "@emotion/unitless": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", - "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", + "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==" }, "@emotion/use-insertion-effect-with-fallbacks": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", - "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.2.0.tgz", + "integrity": "sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg==", "requires": {} }, "@emotion/utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", - "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz", + "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==" }, "@emotion/weak-memoize": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", - "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", + "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==" }, "@eslint-community/eslint-utils": { "version": "4.4.0", @@ -19904,36 +19852,6 @@ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==" }, - "@floating-ui/core": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", - "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==", - "requires": { - "@floating-ui/utils": "^0.2.1" - } - }, - "@floating-ui/dom": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", - "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", - "requires": { - "@floating-ui/core": "^1.0.0", - "@floating-ui/utils": "^0.2.0" - } - }, - "@floating-ui/react-dom": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.8.tgz", - "integrity": "sha512-HOdqOt3R3OGeTKidaLvJKcgg75S6tibQ3Tif4eyd91QnIJWr0NLvoXFpJA/j8HqkFSL68GDca9AuyWEHlhyClw==", - "requires": { - "@floating-ui/dom": "^1.6.1" - } - }, - "@floating-ui/utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz", - "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" - }, "@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -20553,103 +20471,107 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, - "@mui/base": { - "version": "5.0.0-beta.37", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.37.tgz", - "integrity": "sha512-/o3anbb+DeCng8jNsd3704XtmmLDZju1Fo8R2o7ugrVtPQ/QpcqddwKNzKPZwa0J5T8YNW3ZVuHyQgbTnQLisQ==", - "requires": { - "@babel/runtime": "^7.23.9", - "@floating-ui/react-dom": "^2.0.8", - "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.11", - "@popperjs/core": "^2.11.8", - "clsx": "^2.1.0", - "prop-types": "^15.8.1" - } - }, "@mui/core-downloads-tracker": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.11.tgz", - "integrity": "sha512-JVrJ9Jo4gyU707ujnRzmE8ABBWpXd6FwL9GYULmwZRtfPg89ggXs/S3MStQkpJ1JRWfdLL6S5syXmgQGq5EDAw==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.3.0.tgz", + "integrity": "sha512-/d8NwSuC3rMwCjswmGB3oXC4sdDuhIUJ8inVQAxGrADJhf0eq/kmy+foFKvpYhHl2siOZR+MLdFttw6/Bzqtqg==" }, "@mui/icons-material": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.11.tgz", - "integrity": "sha512-R5ZoQqnKpd+5Ew7mBygTFLxgYsQHPhgR3TDXSgIHYIjGzYuyPLmGLSdcPUoMdi6kxiYqHlpPj4NJxlbaFD0UHA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-6.3.0.tgz", + "integrity": "sha512-3uWws6DveDn5KxCS34p+sUNMxehuclQY6OmoJeJJ+Sfg9L7LGBpksY/nX5ywKAqickTZnn+sQyVcp963ep9jvw==", "requires": { - "@babel/runtime": "^7.23.9" + "@babel/runtime": "^7.26.0" } }, "@mui/material": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.11.tgz", - "integrity": "sha512-FA3eEuEZaDaxgN3CgfXezMWbCZ4VCeU/sv0F0/PK5n42qIgsPVD6q+j71qS7/62sp6wRFMHtDMpXRlN+tT/7NA==", - "requires": { - "@babel/runtime": "^7.23.9", - "@mui/base": "5.0.0-beta.37", - "@mui/core-downloads-tracker": "^5.15.11", - "@mui/system": "^5.15.11", - "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.11", - "@types/react-transition-group": "^4.4.10", - "clsx": "^2.1.0", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.3.0.tgz", + "integrity": "sha512-qhlTFyRMxfoVPxUtA5e8IvqxP0dWo2Ij7cvot7Orag+etUlZH+3UwD8gZGt+3irOoy7Ms3UNBflYjwEikUXtAQ==", + "requires": { + "@babel/runtime": "^7.26.0", + "@mui/core-downloads-tracker": "^6.3.0", + "@mui/system": "^6.3.0", + "@mui/types": "^7.2.20", + "@mui/utils": "^6.3.0", + "@popperjs/core": "^2.11.8", + "@types/react-transition-group": "^4.4.12", + "clsx": "^2.1.1", "csstype": "^3.1.3", "prop-types": "^15.8.1", - "react-is": "^18.2.0", + "react-is": "^19.0.0", "react-transition-group": "^4.4.5" + }, + "dependencies": { + "react-is": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", + "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==" + } } }, "@mui/private-theming": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.11.tgz", - "integrity": "sha512-jY/696SnSxSzO1u86Thym7ky5T9CgfidU3NFJjguldqK4f3Z5S97amZ6nffg8gTD0HBjY9scB+4ekqDEUmxZOA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.3.0.tgz", + "integrity": "sha512-tdS8jvqMokltNTXg6ioRCCbVdDmZUJZa/T9VtTnX2Lwww3FTgCakst9tWLZSxm1fEE9Xp0m7onZJmgeUmWQYVw==", "requires": { - "@babel/runtime": "^7.23.9", - "@mui/utils": "^5.15.11", + "@babel/runtime": "^7.26.0", + "@mui/utils": "^6.3.0", "prop-types": "^15.8.1" } }, "@mui/styled-engine": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.11.tgz", - "integrity": "sha512-So21AhAngqo07ces4S/JpX5UaMU2RHXpEA6hNzI6IQjd/1usMPxpgK8wkGgTe3JKmC2KDmH8cvoycq5H3Ii7/w==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.3.0.tgz", + "integrity": "sha512-iWA6eyiPkO07AlHxRUvI7dwVRSc+84zV54kLmjUms67GJeOWVuXlu8ZO+UhCnwJxHacghxnabsMEqet5PYQmHg==", "requires": { - "@babel/runtime": "^7.23.9", - "@emotion/cache": "^11.11.0", + "@babel/runtime": "^7.26.0", + "@emotion/cache": "^11.13.5", + "@emotion/serialize": "^1.3.3", + "@emotion/sheet": "^1.4.0", "csstype": "^3.1.3", "prop-types": "^15.8.1" } }, "@mui/system": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.11.tgz", - "integrity": "sha512-9j35suLFq+MgJo5ktVSHPbkjDLRMBCV17NMBdEQurh6oWyGnLM4uhU4QGZZQ75o0vuhjJghOCA1jkO3+79wKsA==", - "requires": { - "@babel/runtime": "^7.23.9", - "@mui/private-theming": "^5.15.11", - "@mui/styled-engine": "^5.15.11", - "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.11", - "clsx": "^2.1.0", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.3.0.tgz", + "integrity": "sha512-L+8hUHMNlfReKSqcnVslFrVhoNfz/jw7Fe9NfDE85R3KarvZ4O3MU9daF/lZeqEAvnYxEilkkTfDwQ7qCgJdFg==", + "requires": { + "@babel/runtime": "^7.26.0", + "@mui/private-theming": "^6.3.0", + "@mui/styled-engine": "^6.3.0", + "@mui/types": "^7.2.20", + "@mui/utils": "^6.3.0", + "clsx": "^2.1.1", "csstype": "^3.1.3", "prop-types": "^15.8.1" } }, "@mui/types": { - "version": "7.2.13", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.13.tgz", - "integrity": "sha512-qP9OgacN62s+l8rdDhSFRe05HWtLLJ5TGclC9I1+tQngbssu0m2dmFZs+Px53AcOs9fD7TbYd4gc9AXzVqO/+g==", + "version": "7.2.20", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.20.tgz", + "integrity": "sha512-straFHD7L8v05l/N5vcWk+y7eL9JF0C2mtph/y4BPm3gn2Eh61dDwDB65pa8DLss3WJfDXYC7Kx5yjP0EmXpgw==", "requires": {} }, "@mui/utils": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.11.tgz", - "integrity": "sha512-D6bwqprUa9Stf8ft0dcMqWyWDKEo7D+6pB1k8WajbqlYIRA8J8Kw9Ra7PSZKKePGBGWO+/xxrX1U8HpG/aXQCw==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.3.0.tgz", + "integrity": "sha512-MkDBF08OPVwXhAjedyMykRojgvmf0y/jxkBWjystpfI/pasyTYrfdv4jic6s7j3y2+a+SJzS9qrD6X8ZYj/8AQ==", "requires": { - "@babel/runtime": "^7.23.9", - "@types/prop-types": "^15.7.11", + "@babel/runtime": "^7.26.0", + "@mui/types": "^7.2.20", + "@types/prop-types": "^15.7.14", + "clsx": "^2.1.1", "prop-types": "^15.8.1", - "react-is": "^18.2.0" + "react-is": "^19.0.0" + }, + "dependencies": { + "react-is": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.0.0.tgz", + "integrity": "sha512-H91OHcwjZsbq3ClIDHMzBShc1rotbfACdWENsmEf0IFvZ3FgGPtdHMcsv45bQ1hAbgdfiA8SnxTKfDS+x/8m2g==" + } } }, "@nicolo-ribaudo/eslint-scope-5-internals": { @@ -21133,9 +21055,9 @@ "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==" }, "@types/prop-types": { - "version": "15.7.11", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", - "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" + "version": "15.7.14", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz", + "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==" }, "@types/q": { "version": "1.5.8", @@ -21156,6 +21078,7 @@ "version": "18.2.61", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.61.tgz", "integrity": "sha512-NURTN0qNnJa7O/k4XUkEW2yfygA+NxS0V5h1+kp9jPwhzZy95q3ADoGMP0+JypMhrZBTTgjKAUlTctde1zzeQA==", + "peer": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -21163,12 +21086,10 @@ } }, "@types/react-transition-group": { - "version": "4.4.10", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", - "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", - "requires": { - "@types/react": "*" - } + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", + "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", + "requires": {} }, "@types/resolve": { "version": "1.17.1", @@ -21186,7 +21107,8 @@ "@types/scheduler": { "version": "0.16.8", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", - "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==" + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", + "peer": true }, "@types/semver": { "version": "7.5.8", @@ -22412,9 +22334,9 @@ } }, "clsx": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", - "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==" }, "co": { "version": "4.6.0", @@ -28319,9 +28241,9 @@ } }, "primereact": { - "version": "10.5.3", - "resolved": "https://registry.npmjs.org/primereact/-/primereact-10.5.3.tgz", - "integrity": "sha512-uKfGU6jWdDnTOnfAj9IjbRuzJVtFqzbgZVSVe5OgxVVxT6JoImF28uj/iQlFJJs17WHi1SWtOmXTjSBqtL8fUg==", + "version": "10.8.5", + "resolved": "https://registry.npmjs.org/primereact/-/primereact-10.8.5.tgz", + "integrity": "sha512-B1LeJdNGGAB8P1VRJE0TDYz6rZSDwxE7Ft8PLFjRYLO44+mIJNDsLYSB56LRJOoqUNRhQrRIe/5ctS5eyQAzwQ==", "requires": { "@types/react-transition-group": "^4.4.1", "react-transition-group": "^4.4.1" @@ -28463,12 +28385,9 @@ } }, "react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "requires": { - "loose-envify": "^1.1.0" - } + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==" }, "react-app-polyfill": { "version": "3.0.0", @@ -28586,12 +28505,11 @@ } }, "react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", + "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", "requires": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.25.0" } }, "react-error-overlay": { @@ -29038,12 +28956,9 @@ } }, "scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", - "requires": { - "loose-envify": "^1.1.0" - } + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==" }, "schema-utils": { "version": "3.3.0", diff --git a/ClientBrowserUI/package.json b/ClientBrowserUI/package.json index 7df5637..3142397 100644 --- a/ClientBrowserUI/package.json +++ b/ClientBrowserUI/package.json @@ -5,15 +5,15 @@ "build": "npx react-scripts build" }, "dependencies": { - "@emotion/react": "^11.11.0", - "@emotion/styled": "^11.11.0", - "@mui/icons-material": "^5.11.16", - "@mui/material": "^5.13.1", + "@emotion/react": "^11.14.0", + "@emotion/styled": "^11.14.0", + "@mui/icons-material": "^6.3.0", + "@mui/material": "^6.3.0", "lodash": "^4.17.21", - "primereact": "^10.5.3", - "react": "18.2.0", + "primereact": "^10.8.5", + "react": "19.0.0", "react-color": "^2.19.3", - "react-dom": "18.2.0", + "react-dom": "19.0.0", "react-scripts": "5.0.1" }, "browserslist": { diff --git a/ClientBrowserUI/src/index.jsx b/ClientBrowserUI/src/index.jsx index b8e4030..5225671 100644 --- a/ClientBrowserUI/src/index.jsx +++ b/ClientBrowserUI/src/index.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import ReactDOM from 'react-dom'; +import ReactDOM from 'react-dom/client'; import './index.css'; import {ContextProvider} from './utils/Context'; import GeneralDidMount from "./components/GeneralDidMount"; @@ -20,7 +20,8 @@ const handleResize = () => { // 监听屏幕大小改变或旋转事件 window.addEventListener('resize', handleResize); -ReactDOM.render( +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render(
diff --git a/bin/ClearTemplateFiles.bat b/bin/ClearTemplateFiles.bat index 3b1454d..7a50013 100644 --- a/bin/ClearTemplateFiles.bat +++ b/bin/ClearTemplateFiles.bat @@ -2,8 +2,12 @@ cd /d %~dp0 cd ../ for /d /r . %%d in (__pycache__) do @if exist "%%d" rd /s /q "%%d" for /r . %%i in (*.toc) do @del "%%i" +del config.yaml rd /s /q dist rd /s /q build rd /s /q venv rd /s /q logs +rd /s /q node_modules +rd /s /q ClientBrowserUI\build +rd /s /q ClientBrowserUI\node_modules pause diff --git a/bin/NpmCheckUpdates.bat b/bin/NpmCheckUpdates.bat new file mode 100644 index 0000000..d083aa3 --- /dev/null +++ b/bin/NpmCheckUpdates.bat @@ -0,0 +1,9 @@ +cd /d %~dp0 +cd ../ + +rd /s /q ClientBrowserUI\build +rd /s /q ClientBrowserUI\node_modules + +docker run -it --rm -v %cd%:/docker -w /docker node:16-bullseye bash -c "npm install -g npm-check-updates; cd ClientBrowserUI; ncu -u; npm i; npm run build; exit" + +pause diff --git a/bin/PyInstallerOneFile.bat b/bin/PyInstallerOneFile.bat index a7ac9ae..1327b80 100644 --- a/bin/PyInstallerOneFile.bat +++ b/bin/PyInstallerOneFile.bat @@ -3,10 +3,12 @@ cd ../ for /d /r . %%d in (__pycache__) do @if exist "%%d" rd /s /q "%%d" for /r . %%i in (*.toc) do @del "%%i" +del config.yaml rd /s /q dist rd /s /q build rd /s /q venv rd /s /q logs +rd /s /q ClientBrowserUI\build where docker >nul 2>nul if %errorlevel% neq 0 ( From b5f7b27e6843661101e1183e331e1813890d22cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Tue, 21 Jan 2025 01:48:09 -0500 Subject: [PATCH 06/12] Rename dir `#README` to `docs` --- bin/UpdateVersionNumber.py | 2 +- {#README => docs}/0.png | Bin {#README => docs}/1.jpg | Bin {#README => docs}/A.png | Bin {#README => docs}/B.png | Bin {#README => docs}/C.png | Bin {#README => docs}/D.png | Bin {#README => docs}/README-cn.md | 0 {#README => docs}/icon/1080.png | Bin {#README => docs}/icon/1080.psd | Bin {#README => docs}/icon/1080a.png | Bin {#README => docs}/icon/1080b.jpg | Bin {#README => docs}/icon/256.png | Bin {#README => docs}/icon/256a.icns | Bin {#README => docs}/icon/256a.ico | Bin {#README => docs}/icon/256a.png | Bin {#README => docs}/icon/256b.jpg | Bin .../icon/repository-open-graph-template.png | Bin {#README => docs}/roadmap.md | 0 {#README => docs}/shields-badge/MacOS(arm64).svg | 0 {#README => docs}/shields-badge/MacOS(x64).svg | 0 {#README => docs}/shields-badge/README.md | 0 {#README => docs}/shields-badge/Windows(x64).svg | 0 iController.spec | 2 +- 24 files changed, 2 insertions(+), 2 deletions(-) rename {#README => docs}/0.png (100%) rename {#README => docs}/1.jpg (100%) rename {#README => docs}/A.png (100%) rename {#README => docs}/B.png (100%) rename {#README => docs}/C.png (100%) rename {#README => docs}/D.png (100%) rename {#README => docs}/README-cn.md (100%) rename {#README => docs}/icon/1080.png (100%) rename {#README => docs}/icon/1080.psd (100%) rename {#README => docs}/icon/1080a.png (100%) rename {#README => docs}/icon/1080b.jpg (100%) rename {#README => docs}/icon/256.png (100%) rename {#README => docs}/icon/256a.icns (100%) rename {#README => docs}/icon/256a.ico (100%) rename {#README => docs}/icon/256a.png (100%) rename {#README => docs}/icon/256b.jpg (100%) rename {#README => docs}/icon/repository-open-graph-template.png (100%) rename {#README => docs}/roadmap.md (100%) rename {#README => docs}/shields-badge/MacOS(arm64).svg (100%) rename {#README => docs}/shields-badge/MacOS(x64).svg (100%) rename {#README => docs}/shields-badge/README.md (100%) rename {#README => docs}/shields-badge/Windows(x64).svg (100%) diff --git a/bin/UpdateVersionNumber.py b/bin/UpdateVersionNumber.py index 2105e48..b9be377 100644 --- a/bin/UpdateVersionNumber.py +++ b/bin/UpdateVersionNumber.py @@ -15,5 +15,5 @@ def UpdateVersionNumber(filename, encoder, lines_list, old_version, new_version) UpdateVersionNumber('README.md', "utf-8", [3, 6], OLD_VERSION, NEW_VERSION) -UpdateVersionNumber('#README/README-cn.md', "utf-8", [3, 6], OLD_VERSION, NEW_VERSION) +UpdateVersionNumber('docs/README-cn.md', "utf-8", [3, 6], OLD_VERSION, NEW_VERSION) UpdateVersionNumber('iController.py', "utf-8", [16], OLD_VERSION, NEW_VERSION) diff --git a/#README/0.png b/docs/0.png similarity index 100% rename from #README/0.png rename to docs/0.png diff --git a/#README/1.jpg b/docs/1.jpg similarity index 100% rename from #README/1.jpg rename to docs/1.jpg diff --git a/#README/A.png b/docs/A.png similarity index 100% rename from #README/A.png rename to docs/A.png diff --git a/#README/B.png b/docs/B.png similarity index 100% rename from #README/B.png rename to docs/B.png diff --git a/#README/C.png b/docs/C.png similarity index 100% rename from #README/C.png rename to docs/C.png diff --git a/#README/D.png b/docs/D.png similarity index 100% rename from #README/D.png rename to docs/D.png diff --git a/#README/README-cn.md b/docs/README-cn.md similarity index 100% rename from #README/README-cn.md rename to docs/README-cn.md diff --git a/#README/icon/1080.png b/docs/icon/1080.png similarity index 100% rename from #README/icon/1080.png rename to docs/icon/1080.png diff --git a/#README/icon/1080.psd b/docs/icon/1080.psd similarity index 100% rename from #README/icon/1080.psd rename to docs/icon/1080.psd diff --git a/#README/icon/1080a.png b/docs/icon/1080a.png similarity index 100% rename from #README/icon/1080a.png rename to docs/icon/1080a.png diff --git a/#README/icon/1080b.jpg b/docs/icon/1080b.jpg similarity index 100% rename from #README/icon/1080b.jpg rename to docs/icon/1080b.jpg diff --git a/#README/icon/256.png b/docs/icon/256.png similarity index 100% rename from #README/icon/256.png rename to docs/icon/256.png diff --git a/#README/icon/256a.icns b/docs/icon/256a.icns similarity index 100% rename from #README/icon/256a.icns rename to docs/icon/256a.icns diff --git a/#README/icon/256a.ico b/docs/icon/256a.ico similarity index 100% rename from #README/icon/256a.ico rename to docs/icon/256a.ico diff --git a/#README/icon/256a.png b/docs/icon/256a.png similarity index 100% rename from #README/icon/256a.png rename to docs/icon/256a.png diff --git a/#README/icon/256b.jpg b/docs/icon/256b.jpg similarity index 100% rename from #README/icon/256b.jpg rename to docs/icon/256b.jpg diff --git a/#README/icon/repository-open-graph-template.png b/docs/icon/repository-open-graph-template.png similarity index 100% rename from #README/icon/repository-open-graph-template.png rename to docs/icon/repository-open-graph-template.png diff --git a/#README/roadmap.md b/docs/roadmap.md similarity index 100% rename from #README/roadmap.md rename to docs/roadmap.md diff --git a/#README/shields-badge/MacOS(arm64).svg b/docs/shields-badge/MacOS(arm64).svg similarity index 100% rename from #README/shields-badge/MacOS(arm64).svg rename to docs/shields-badge/MacOS(arm64).svg diff --git a/#README/shields-badge/MacOS(x64).svg b/docs/shields-badge/MacOS(x64).svg similarity index 100% rename from #README/shields-badge/MacOS(x64).svg rename to docs/shields-badge/MacOS(x64).svg diff --git a/#README/shields-badge/README.md b/docs/shields-badge/README.md similarity index 100% rename from #README/shields-badge/README.md rename to docs/shields-badge/README.md diff --git a/#README/shields-badge/Windows(x64).svg b/docs/shields-badge/Windows(x64).svg similarity index 100% rename from #README/shields-badge/Windows(x64).svg rename to docs/shields-badge/Windows(x64).svg diff --git a/iController.spec b/iController.spec index dc356a2..79d6b39 100644 --- a/iController.spec +++ b/iController.spec @@ -34,5 +34,5 @@ exe = EXE( target_arch=None, codesign_identity=None, entitlements_file=None, - icon=['#README\\icon\\256a.ico'], + icon=['docs\\icon\\256a.ico'], ) From 5ce861a8cf7e424ee10ecdd9b796256df11e0bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Tue, 21 Jan 2025 02:00:53 -0500 Subject: [PATCH 07/12] Update README.md --- README.md | 16 ++++++++-------- docs/README-cn.md | 14 +++++++------- docs/shields-badge/README.md | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 8bf9855..cfb3654 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
- +

iController v0.6.4

-

English | 简体中文

+

English | 简体中文

    @@ -16,16 +16,16 @@ A host LAN controller software running on `Windows` and `macOS` (read descriptio
- + - + - + - +
@@ -47,7 +47,7 @@ Download portable application from the [Release](https://github.com/Mehver/iCont Currently, the program is CLI interactive. When starting, you can manually provide the port number, and the program will automatically detect to ensure that the port is available and conflict-free. After starting, use the mobile browser to access the LAN IP address and port of the computer. - + ### 2.2 macOS @@ -60,7 +60,7 @@ Note: For macOS, due to permission issues, the directly downloaded iController cannot be trusted by the system, the only solution at present is to open the switch of `Settings > Privacy & Security > Developer Tools > Terminal`. - + ## 3 Development diff --git a/docs/README-cn.md b/docs/README-cn.md index 80d0e12..293768d 100644 --- a/docs/README-cn.md +++ b/docs/README-cn.md @@ -1,5 +1,5 @@
- +

iController v0.6.4

English | 简体中文

@@ -16,16 +16,16 @@
- + - + - + - +
@@ -47,7 +47,7 @@ 目前程序是CLI交互的,启动时,你可以手动提供端口号,程序会自动检测确保端口可用且无冲突,启动后使用手机浏览器通过电脑的局域网IP地址和端口访问。 - + ### 2.2 macOS @@ -58,7 +58,7 @@ 注意:对于 `macOS`,由于权限问题,直接下载的 iController 无法被系统信任,目前唯一的解决方法是打开 `设置 > 隐私与安全性 > 开发者工具 > 终端` 这一开关。 - + ## 3 开发 diff --git a/docs/shields-badge/README.md b/docs/shields-badge/README.md index 65238e9..898d3f1 100644 --- a/docs/shields-badge/README.md +++ b/docs/shields-badge/README.md @@ -1,11 +1,11 @@ ![MacOS(x64)](https://shields.io/badge/MacOS%20(x64)--9cf?logo=Apple&style=social) -![MacOS(x64)](https://github.com/Mehver/iController/raw/main/%23README/shields-badge/MacOS(x64).svg) +![MacOS(x64)](https://github.com/Mehver/iController/raw/main/docs/shields-badge/MacOS(x64).svg) ![MacOS(arm64)](https://shields.io/badge/MacOS%20(arm64)--9cf?logo=Apple&style=social) -![MacOS(arm64)](https://github.com/Mehver/iController/raw/main/%23README/shields-badge/MacOS(arm64).svg) +![MacOS(arm64)](https://github.com/Mehver/iController/raw/main/docs/shields-badge/MacOS(arm64).svg) ![Windows(x64)](https://shields.io/badge/Windows%20(x64)--9cf?logo=Windows&style=social) -![Windows(x64)](https://github.com/Mehver/iController/raw/main/%23README/shields-badge/Windows(x64).svg) +![Windows(x64)](https://github.com/Mehver/iController/raw/main/docs/shields-badge/Windows(x64).svg)   From 142c85e8ee80f12137df6e68b43120f2512f9b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:18:13 -0500 Subject: [PATCH 08/12] Reformat Files --- CHANGELOG.md | 308 ------------------ ClientBrowserUI/src/utils/Context.jsx | 2 +- .../src/{storage => utils}/CookieIO.js | 0 ServerApp/http_server/__init__.py | 3 +- iController.py | 4 +- 5 files changed, 5 insertions(+), 312 deletions(-) delete mode 100644 CHANGELOG.md rename ClientBrowserUI/src/{storage => utils}/CookieIO.js (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 0bb4df3..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,308 +0,0 @@ -[![](https://img.shields.io/badge/Windows%20(x64)-v0.6.4-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.4/icontroller-v0.6.4-portable-win-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.6.2-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.2/icontroller-v0.6.2-portable-win-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.6.1-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.1/icontroller-v0.6.1-portable-win-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.6.0-yellow?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.0/icontroller-v0.6.0-portable-win-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.5.1-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.5.1/icontroller-v0.5.1-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.5.1-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.5.1/icontroller-v0.5.1-portable-mac-arm64.zip) -[![](https://img.shields.io/badge/MacOS%20(x64)-v0.5.1-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.5.1/icontroller-v0.5.1-portable-mac-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.5.0-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.5.0/icontroller-v0.5.0-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.5.0-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.5.0/icontroller-v0.5.0-portable-mac-arm64.zip) -[![](https://img.shields.io/badge/MacOS%20(x64)-v0.5.0-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.5.0/icontroller-v0.5.0-portable-mac-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.5-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.5/icontroller-v0.4.5-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.4.5-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.5/icontroller-v0.4.5-portable-mac-arm64.zip) -[![](https://img.shields.io/badge/MacOS%20(x64)-v0.4.5-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.5/icontroller-v0.4.5-portable-mac-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.4-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.4/icontroller-v0.4.4-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.4.4-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.4/icontroller-v0.4.4-portable-mac-arm64.zip) -[![](https://img.shields.io/badge/MacOS%20(x64)-v0.4.4-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.4/icontroller-v0.4.4-portable-mac-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.3-yellow?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.3/icontroller-v0.4.3-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.4.3-yellow?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.3/icontroller-v0.4.3-portable-mac-arm64.zip) -[![](https://img.shields.io/badge/MacOS%20(x64)-v0.4.3-yellow?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.3/icontroller-v0.4.3-portable-mac-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.2-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.2/icontroller-v0.4.2-portable-win-x64.exe) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.1-yellow?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.1/icontroller-v0.4.1-portable-win-x64.exe) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.0-yellow?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.0/icontroller-v0.4.0-portable-win-x64.exe) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.3.4-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.3.4/icontroller-v0.3.4-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.3.4-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.4/icontroller-v0.3.4-portable-mac-arm64.zip) -[![](https://img.shields.io/badge/MacOS%20(x64)-v0.3.4-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.4/icontroller-v0.3.4-portable-mac-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.3.3-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.3.3/icontroller-v0.3.3-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.3.3-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.3/icontroller-v0.3.3-portable-mac-arm64.zip) -[![](https://img.shields.io/badge/MacOS%20(x64)-v0.3.3-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.3/icontroller-v0.3.3-portable-mac-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.3.2-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.3.2/icontroller-v0.3.2-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.3.2-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.2/icontroller-v0.3.2-portable-mac-arm64.zip) -[![](https://img.shields.io/badge/MacOS%20(x64)-v0.3.2-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.2/icontroller-v0.3.2-portable-mac-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.3.1-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.3.1/icontroller-v0.3.1-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.3.1-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.1/icontroller-v0.3.1-portable-mac-arm64.zip) -[![](https://img.shields.io/badge/MacOS%20(x64)-v0.3.1-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.1/icontroller-v0.3.1-portable-mac-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.2.2-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.2.2/icontroller-v0.2.2-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.2.2-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.2.2/icontroller-v0.2.2-portable-mac-arm64.zip) -[![](https://img.shields.io/badge/MacOS%20(x64)-v0.2.2-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.2.2/icontroller-v0.2.2-portable-mac-x64.zip) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.2.0-yellow?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.2.0/icontroller-v0.2.0-portable-win-x64.exe) -[![](https://img.shields.io/badge/MacOS%20(arm64)-v0.2.0-yellow?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.2.0/icontroller-v0.2.0-portable-mac-arm64.zip) - - ---- - -# [iController v0.6.4](https://github.com/Mehver/iController/releases/tag/v0.6.4) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.6.4-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.4/icontroller-v0.6.4-portable-win-x64.zip) - -### Release Notes -- Security Updates - -### What's Changed -* Bump body-parser and express by @dependabot in https://github.com/Mehver/iController/pull/20 -* Bump rollup from 2.79.1 to 2.79.2 by @dependabot in https://github.com/Mehver/iController/pull/21 -* Bump cookie and express by @dependabot in https://github.com/Mehver/iController/pull/22 -* Bump http-proxy-middleware from 2.0.6 to 2.0.7 by @dependabot in https://github.com/Mehver/iController/pull/23 -* Bump nanoid from 3.3.7 to 3.3.8 by @dependabot in https://github.com/Mehver/iController/pull/26 -* Bump cross-spawn from 7.0.3 to 7.0.6 by @dependabot in https://github.com/Mehver/iController/pull/24 -* Bump path-to-regexp and express by @dependabot in https://github.com/Mehver/iController/pull/25 - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.6.3...v0.6.4 - - -# [iController v0.6.3](https://github.com/Mehver/iController/releases/tag/v0.6.3) - -### Release Notes -- Security Updates - -### What's Changed -* Bump ejs from 3.1.9 to 3.1.10 by @dependabot in https://github.com/Mehver/iController/pull/16 -* Bump micromatch from 4.0.5 to 4.0.8 by @dependabot in https://github.com/Mehver/iController/pull/18 -* Bump webpack from 5.90.3 to 5.94.0 by @dependabot in https://github.com/Mehver/iController/pull/17 - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.6.2...v0.6.3 - - -# [iController v0.6.2](https://github.com/Mehver/iController/releases/tag/v0.6.2) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.6.2-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.2/icontroller-v0.6.2-portable-win-x64.zip) - -### Release Notes -- Persistent Log Files - - -# [iController v0.6.1](https://github.com/Mehver/iController/releases/tag/v0.6.1) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.6.1-blue?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.1/icontroller-v0.6.1-portable-win-x64.zip) - -### Release Notes -- Improved Access Security - - Blacklist Mode - - Whitelist Mode -- Persistent Configuration File Auto Update - -### What's Changed -* [ImgBot] Optimize images by @imgbot in https://github.com/Mehver/iController/pull/14 - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.5.1...v0.6.1 - -# [iController v0.6.0](https://github.com/Mehver/iController/releases/tag/v0.6.0) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.6.0-yellow?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.6.0/icontroller-v0.6.0-portable-win-x64.zip) - -### Release Notes -- Persistent Configuration File - -### What's Changed -* [ImgBot] Optimize images by @imgbot in https://github.com/Mehver/iController/pull/14 - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.5.1...v0.6.0 - -# [iController v0.5.1](https://github.com/Mehver/iController/releases/tag/v0.5.1) - -> [!IMPORTANT] -> Due to the introduction of additional features in the next version, it is difficult to perfectly support macOS through the portable way. Therefore, the packaging file for macOS will not be provided for the time being. Currently, `v0.5.1` will be a temporary final version for macOS, and subsequent versions will be launched on Windows first for testing. - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.5.1-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.5.1/icontroller-v0.5.1-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.5.1-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.5.1/icontroller-v0.5.1-portable-mac-arm64.zip) [![](https://img.shields.io/badge/MacOS%20(x64)-v0.5.1-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.5.1/icontroller-v0.5.1-portable-mac-x64.zip) - -### Release Notes -- Optimize Console Port Setting - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.5.0...v0.5.1 - -# [iController v0.5.0](https://github.com/Mehver/iController/releases/tag/v0.5.0) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.5.0-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.5.0/icontroller-v0.5.0-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.5.0-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.5.0/icontroller-v0.5.0-portable-mac-arm64.zip) [![](https://img.shields.io/badge/MacOS%20(x64)-v0.5.0-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.5.0/icontroller-v0.5.0-portable-mac-x64.zip) - -### Release Notes -- Flask Migration to Quart -- Optimize Console Output - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.4.5...v0.5.0 - -# [iController v0.4.5](https://github.com/Mehver/iController/releases/tag/v0.4.5) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.5-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.5/icontroller-v0.4.5-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.4.5-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.5/icontroller-v0.4.5-portable-mac-arm64.zip) [![](https://img.shields.io/badge/MacOS%20(x64)-v0.4.5-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.5/icontroller-v0.4.5-portable-mac-x64.zip) - -### Release Notes -- Color Scheme Panel -- Reorganized Sidebar Menus -- Fix Known Issues - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.4.4...v0.4.5 - -# [iController v0.4.4](https://github.com/Mehver/iController/releases/tag/v0.4.4) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.4-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.4/icontroller-v0.4.4-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.4.4-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.4/icontroller-v0.4.4-portable-mac-arm64.zip) [![](https://img.shields.io/badge/MacOS%20(x64)-v0.4.4-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.4/icontroller-v0.4.4-portable-mac-x64.zip) - -### Release Notes -- Improved UI Operation Experience -- Improved Server System Compatibility -- Fix Server Errors - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.4.3...v0.4.4 - -# [iController v0.4.3](https://github.com/Mehver/iController/releases/tag/v0.4.3) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.3-yellow?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.3/icontroller-v0.4.3-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.4.3-yellow?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.3/icontroller-v0.4.3-portable-mac-arm64.zip) [![](https://img.shields.io/badge/MacOS%20(x64)-v0.4.3-yellow?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.4.3/icontroller-v0.4.3-portable-mac-x64.zip) - -### Release Notes -- Fix System Compatibility Errors on MacOS - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.4.2...v0.4.3 - -# [iController v0.4.2](https://github.com/Mehver/iController/releases/tag/v0.4.2) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.2-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.2/icontroller-v0.4.2-portable-win-x64.exe) - -### Release Notes -- Improved UI Operation Experience -- Add Port Checker for Server - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.4.1...v0.4.2 - -# [iController v0.4.1](https://github.com/Mehver/iController/releases/tag/v0.4.1) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.1-yellow?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.1/icontroller-v0.4.1-portable-win-x64.exe) - -### Release Notes -- Implement Setting Menu -- Sensitivity Modifiable -- Improved UI Operation Experience - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.4.0...v0.4.1 - -# [iController v0.4.0](https://github.com/Mehver/iController/releases/tag/v0.4.0) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.4.0-yellow?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.4.0/icontroller-v0.4.0-portable-win-x64.exe) - -### Release Notes -- Implement Keyboard -- Implement Mouse Wheel -- Implement Volume Slider - -### What's Changed -* Bump express from 4.18.3 to 4.19.2 by @dependabot in https://github.com/Mehver/iController/pull/11 -* [ImgBot] Optimize images by @imgbot in https://github.com/Mehver/iController/pull/12 - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.3.4...v0.4.0 - -# [iController v0.3.4](https://github.com/Mehver/iController/releases/tag/v0.3.4) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.3.4-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.3.4/icontroller-v0.3.4-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.3.4-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.4/icontroller-v0.3.4-portable-mac-arm64.zip) [![](https://img.shields.io/badge/MacOS%20(x64)-v0.3.4-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.4/icontroller-v0.3.4-portable-mac-x64.zip) -### Release Notes -- Improved Adaptation For Ultra-Small Screens -- Fixed Icon Errors - -### What's Changed -* Bump webpack-dev-middleware from 5.3.3 to 5.3.4 by @dependabot in https://github.com/Mehver/iController/pull/10 - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.3.3...v0.3.4 - -# [iController v0.3.3](https://github.com/Mehver/iController/releases/tag/v0.3.3) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.3.3-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.3.3/icontroller-v0.3.3-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.3.3-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.3/icontroller-v0.3.3-portable-mac-arm64.zip) [![](https://img.shields.io/badge/MacOS%20(x64)-v0.3.3-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.3/icontroller-v0.3.3-portable-mac-x64.zip) -### Release Notes -- Improved UI -- Update Icon Color -- Replaced AntD Elements with MUI - -### What's Changed -* [ImgBot] Optimize images by @imgbot in https://github.com/Mehver/iController/pull/9 - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.3.2...v0.3.3 - -# [iController v0.3.2](https://github.com/Mehver/iController/releases/tag/v0.3.2) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.3.2-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.3.2/icontroller-v0.3.2-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.3.2-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.2/icontroller-v0.3.2-portable-mac-arm64.zip) [![](https://img.shields.io/badge/MacOS%20(x64)-v0.3.2-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.2/icontroller-v0.3.2-portable-mac-x64.zip) -### Release Notes -- Update New Logo -- Improved iPhone UI Adaptation - -### What's Changed -* Bump follow-redirects from 1.15.5 to 1.15.6 by @dependabot in https://github.com/Mehver/iController/pull/2 -* Bump shell-quote and react-scripts by @dependabot in https://github.com/Mehver/iController/pull/3 -* Bump minimatch and react-scripts by @dependabot in https://github.com/Mehver/iController/pull/4 -* Bump ejs and react-scripts by @dependabot in https://github.com/Mehver/iController/pull/5 -* Bump node-forge and react-scripts by @dependabot in https://github.com/Mehver/iController/pull/6 -* Bump postcss and react-scripts by @dependabot in https://github.com/Mehver/iController/pull/7 -* [ImgBot] Optimize images by @imgbot in https://github.com/Mehver/iController/pull/8 - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.3.1...v0.3.2 - -# [iController v0.3.1](https://github.com/Mehver/iController/releases/tag/v0.3.1) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.3.1-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.3.1/icontroller-v0.3.1-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.3.1-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.1/icontroller-v0.3.1-portable-mac-arm64.zip) [![](https://img.shields.io/badge/MacOS%20(x64)-v0.3.1-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.3.1/icontroller-v0.3.1-portable-mac-x64.zip) - -### Release Notes -- Improved UI Operation Experience - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.3.0...v0.3.1 - -# [iController v0.3.0](https://github.com/Mehver/iController/releases/tag/v0.3.0) - -### Release Notes -- Settings Now Support Cookie Memory -- Better Setting Menu - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.2.2...v0.3.0 - -# [iController v0.2.2](https://github.com/Mehver/iController/releases/tag/v0.2.2) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.2.2-green?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.2.2/icontroller-v0.2.2-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.2.2-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.2.2/icontroller-v0.2.2-portable-mac-arm64.zip) [![](https://img.shields.io/badge/MacOS%20(x64)-v0.2.2-green?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.2.2/icontroller-v0.2.2-portable-mac-x64.zip) - -### Release Notes -- Setup GitHub Actions for macOS x64 And macOS arm64 - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.2.1...v0.2.2 - -# [iController v0.2.1](https://github.com/Mehver/iController/releases/tag/v0.2.1) - -### Release Notes -- Manually Input Port Number - -**Full Changelog**: https://github.com/Mehver/iController/compare/v0.2.0...v0.2.1 - -# [iController v0.2.0](https://github.com/Mehver/iController/releases/tag/v0.2.0) - -[![](https://img.shields.io/badge/Windows%20(x64)-v0.2.0-yellow?logo=Windows)](https://github.com/Mehver/iController/releases/download/v0.2.0/icontroller-v0.2.0-portable-win-x64.exe) [![](https://img.shields.io/badge/MacOS%20(arm64)-v0.2.0-yellow?logo=Apple)](https://github.com/Mehver/iController/releases/download/v0.2.0/icontroller-v0.2.0-portable-mac-arm64.zip) - -### Release Notes -- Update Web UI -- Compile Windows EXE App - -**Full Changelog**: https://github.com/Mehver/iController/commits/v0.2.0 - -# [iController v0.1.0](https://github.com/Mehver/iController/releases/tag/v0.1.0) - -### Release Notes -- First Release - -**Full Changelog**: https://github.com/Mehver/iController/commits/v0.1.0 \ No newline at end of file diff --git a/ClientBrowserUI/src/utils/Context.jsx b/ClientBrowserUI/src/utils/Context.jsx index 57302a1..9bd2cd4 100644 --- a/ClientBrowserUI/src/utils/Context.jsx +++ b/ClientBrowserUI/src/utils/Context.jsx @@ -1,6 +1,6 @@ // Context.jsx import React, {createContext, Component} from 'react'; -import {setCookie, getCookie} from '../storage/CookieIO'; +import {setCookie, getCookie} from './CookieIO'; // 创建Context export const Context = createContext(undefined); diff --git a/ClientBrowserUI/src/storage/CookieIO.js b/ClientBrowserUI/src/utils/CookieIO.js similarity index 100% rename from ClientBrowserUI/src/storage/CookieIO.js rename to ClientBrowserUI/src/utils/CookieIO.js diff --git a/ServerApp/http_server/__init__.py b/ServerApp/http_server/__init__.py index 72245e7..7fc3a29 100644 --- a/ServerApp/http_server/__init__.py +++ b/ServerApp/http_server/__init__.py @@ -12,7 +12,6 @@ from ServerApp.http_server.route.volume import volume_set from ServerApp.http_server.hook.ip_checker import ip_checker from ServerApp.http_server.hook.ip_log import ip_log -from ServerApp.pyinstaller_context import PyInstallerContext def HttpServer(static_folder) -> Quart: @@ -22,7 +21,7 @@ def HttpServer(static_folder) -> Quart: :param static_folder: The folder for static files build by React :return: Quart server object. """ - app = Quart(__name__, static_folder=PyInstallerContext().resource_path(static_folder), static_url_path='') + app = Quart(__name__, static_folder=static_folder, static_url_path='') app.before_request(ip_checker) app.before_request(ip_log) diff --git a/iController.py b/iController.py index 3d17ae7..8cd2348 100644 --- a/iController.py +++ b/iController.py @@ -4,6 +4,7 @@ from ServerApp.http_server import HttpServer from ServerApp.get_address import get_address from ServerApp.config import Config +from ServerApp.pyinstaller_context import PyInstallerContext print(""" _ ___ _ _ _ @@ -18,7 +19,8 @@ """) Config.init() -app = HttpServer("ClientBrowserUI/build") +static_folder = PyInstallerContext().resource_path("ClientBrowserUI/build") +app = HttpServer(static_folder) config = HypercornConfig() config.bind = [get_address()] asyncio.run(serve(app, config)) From 130ad60857fc1e66cdc0e3e307a5c4122c994254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Sat, 22 Feb 2025 14:26:31 -0500 Subject: [PATCH 09/12] Optimize frontend code structure --- .../src/components/GeneralDidMount.jsx | 9 +- .../src/components/Screen/DPad.jsx | 18 +- .../src/components/Screen/MouseButtons.jsx | 18 +- .../src/components/Screen/index.jsx | 3 - .../src/components/SideBar/KeyboardMenu.jsx | 92 ++---- .../components/SideBar/ModulesSettingMenu.jsx | 19 +- .../src/components/SideBar/MouseWheelMenu.jsx | 15 +- .../src/components/SideBar/SettingMenu.jsx | 34 ++- .../src/components/SideBar/ThemeMenu.jsx | 23 +- .../src/components/SideBar/VolumeMenu.jsx | 17 +- .../src/components/SideBar/index.jsx | 9 +- ClientBrowserUI/src/components/TopBar.jsx | 7 +- ClientBrowserUI/src/index.css | 60 ---- ClientBrowserUI/src/index.jsx | 67 ++++- ClientBrowserUI/src/utils/Context.jsx | 278 +++++------------- ClientBrowserUI/src/utils/Theme.js | 89 ++---- .../mac-node16_bullseye-p3000.sh | 0 .../mac-node16_bullseye.sh | 0 .../win-node16_bullseye-p3000.bat | 0 .../win-node16_bullseye.bat | 0 .../win-python3(10)_bullseye-p3000.bat | 0 .../win-python3(10)_bullseye.bat | 0 bin/PyInstallerOneFile.bat | 12 +- 23 files changed, 305 insertions(+), 465 deletions(-) delete mode 100644 ClientBrowserUI/src/index.css rename bin/{dev => DevDockerEnv}/mac-node16_bullseye-p3000.sh (100%) rename bin/{dev => DevDockerEnv}/mac-node16_bullseye.sh (100%) rename bin/{dev => DevDockerEnv}/win-node16_bullseye-p3000.bat (100%) rename bin/{dev => DevDockerEnv}/win-node16_bullseye.bat (100%) rename bin/{dev => DevDockerEnv}/win-python3(10)_bullseye-p3000.bat (100%) rename bin/{dev => DevDockerEnv}/win-python3(10)_bullseye.bat (100%) diff --git a/ClientBrowserUI/src/components/GeneralDidMount.jsx b/ClientBrowserUI/src/components/GeneralDidMount.jsx index be11a39..14ffc5c 100644 --- a/ClientBrowserUI/src/components/GeneralDidMount.jsx +++ b/ClientBrowserUI/src/components/GeneralDidMount.jsx @@ -1,9 +1,6 @@ import React, {Component} from 'react'; import {Context} from '../utils/Context'; -import { - setPrimaryColor as theme_setPrimaryColor, - setSecondaryColor as theme_setSecondaryColor -} from '../utils/Theme'; +import {updateColorCSS} from '../utils/Theme'; class GeneralDidMount extends Component { constructor(props) { @@ -11,10 +8,8 @@ class GeneralDidMount extends Component { } componentDidMount() { - theme_setPrimaryColor(this.context.primaryColor); - theme_setSecondaryColor(this.context.secondaryColor); + updateColorCSS(this.context.primaryColor, this.context.secondaryColor); // 禁用页面滚动 - // 主要用于 Touchpad 组件 document.body.style.overflow = 'hidden'; document.documentElement.style.overflow = 'hidden'; } diff --git a/ClientBrowserUI/src/components/Screen/DPad.jsx b/ClientBrowserUI/src/components/Screen/DPad.jsx index cc2459e..217a172 100644 --- a/ClientBrowserUI/src/components/Screen/DPad.jsx +++ b/ClientBrowserUI/src/components/Screen/DPad.jsx @@ -8,8 +8,8 @@ import { KeyboardArrowLeftOutlined, KeyboardArrowRightOutlined } from '@mui/icons-material'; -import {ThemeProvider} from '@mui/material/styles'; -import {customTheme, primaryColorTrans} from '../../utils/Theme'; +import {createTheme, ThemeProvider} from '@mui/material/styles'; +import {convertHexToRGBA} from '../../utils/Theme'; import {Context} from '../../utils/Context'; import {api_dpad} from '../../api/dpad'; @@ -27,11 +27,23 @@ class DPad extends Component { borderRadius: '18%', // 使用 !important 否则按下时边框不会变粗 borderWidth: '5px !important', - borderColor: primaryColorTrans + ' !important', + borderColor: convertHexToRGBA(this.context.primaryColor) + ' !important', }; let iconSX = { fontSize: dPadButtonSize * 0.4, }; + + let customTheme = createTheme({ + palette: { + primary: { + main: this.context.primaryColor, + }, + secondary: { + main: this.context.secondaryColor, + }, + }, + }); + return ( diff --git a/ClientBrowserUI/src/components/Screen/index.jsx b/ClientBrowserUI/src/components/Screen/index.jsx index 8b507f0..913df7b 100644 --- a/ClientBrowserUI/src/components/Screen/index.jsx +++ b/ClientBrowserUI/src/components/Screen/index.jsx @@ -1,8 +1,5 @@ import {Component} from 'react'; import {Context} from '../../utils/Context'; -import { - Box, -} from "@mui/material"; import DPad from "./DPad"; import MouseButtons from "./MouseButtons"; import Touchpad from "./Touchpad"; diff --git a/ClientBrowserUI/src/components/SideBar/KeyboardMenu.jsx b/ClientBrowserUI/src/components/SideBar/KeyboardMenu.jsx index 56e9375..733f3f2 100644 --- a/ClientBrowserUI/src/components/SideBar/KeyboardMenu.jsx +++ b/ClientBrowserUI/src/components/SideBar/KeyboardMenu.jsx @@ -13,12 +13,7 @@ import { BackspaceOutlined, SubdirectoryArrowLeftOutlined } from '@mui/icons-material'; -import {ThemeProvider} from '@mui/material/styles'; -import { - customTheme, - primaryColor, - secondaryColor -} from '../../utils/Theme'; +import {createTheme, ThemeProvider} from '@mui/material/styles'; import { api_keyboard_buttons, api_keyboard_typewriting, @@ -47,10 +42,6 @@ class KeyboardMenu extends Component { }); } - handleRadioChange = (event) => { - this.context.setKeyboardDataSendMod(event.target.value); - }; - // 输入框实时更新 handleInputChange = (event) => { this.setState({inputText: event.target.value}); @@ -78,6 +69,17 @@ class KeyboardMenu extends Component { }; render() { + let customTheme = createTheme({ + palette: { + primary: { + main: this.context.primaryColor, + }, + secondary: { + main: this.context.secondaryColor, + }, + }, + }); + return ( @@ -86,9 +88,9 @@ class KeyboardMenu extends Component {
@@ -99,8 +101,8 @@ class KeyboardMenu extends Component { style={{ border: 'none', // 移除input的默认边框 outline: 'none', // 移除聚焦时的轮廓 - caretColor: secondaryColor, // 修改光标颜色 - color: secondaryColor, // 修改文字颜色 + caretColor: this.context.secondaryColor, // 修改光标颜色 + color: this.context.secondaryColor, // 修改文字颜色 backgroundColor: 'transparent', width: '100%', fontSize: '1rem', @@ -113,62 +115,26 @@ class KeyboardMenu extends Component { width: '40px', height: '40px', borderRadius: '8%', - backgroundColor: secondaryColor, - color: primaryColor, + backgroundColor: this.context.secondaryColor, + color: this.context.primaryColor, '&:hover': { - backgroundColor: secondaryColor, - color: primaryColor, + backgroundColor: this.context.secondaryColor, + color: this.context.primaryColor, }, 'focus': { - backgroundColor: secondaryColor, - color: primaryColor, + backgroundColor: this.context.secondaryColor, + color: this.context.primaryColor, }, }} onClick={this.handleSendText} > - + {this.state.serverIsMac ? ( *MacOS ASCII Only ) : ( - // - // - // } - // label="Paste" - // /> - // - // } - // label="Type" - // /> - // <> this.handleSendButton('Enter')} style={{marginLeft: '10px'}} > - + this.handleSendButton('Backspace')} style={{marginRight: '10px'}} > - + diff --git a/ClientBrowserUI/src/components/SideBar/ModulesSettingMenu.jsx b/ClientBrowserUI/src/components/SideBar/ModulesSettingMenu.jsx index 1a45a6c..d428672 100644 --- a/ClientBrowserUI/src/components/SideBar/ModulesSettingMenu.jsx +++ b/ClientBrowserUI/src/components/SideBar/ModulesSettingMenu.jsx @@ -19,10 +19,7 @@ import { VisibilityOffOutlined, VisibilityOutlined } from '@mui/icons-material'; -import {ThemeProvider} from '@mui/material/styles'; -import { - customTheme -} from '../../utils/Theme'; +import {createTheme, ThemeProvider} from '@mui/material/styles'; class ModuleSettingMenu extends Component { constructor(props) { @@ -37,6 +34,18 @@ class ModuleSettingMenu extends Component { iconSizeSX.fontSize = `${fontSize}rem`; boxIconSX.marginRight = '-50px'; } + + let customTheme = createTheme({ + palette: { + primary: { + main: this.context.primaryColor, + }, + secondary: { + main: this.context.secondaryColor, + }, + }, + }); + return ( @@ -84,7 +93,7 @@ class ModuleSettingMenu extends Component { { this.context.setMouseWheelMenuType((this.context.mouseWheelMenuType + 1) % 3); }}> - + {this.context.mouseWheelMenuType === 0 ? : diff --git a/ClientBrowserUI/src/components/SideBar/MouseWheelMenu.jsx b/ClientBrowserUI/src/components/SideBar/MouseWheelMenu.jsx index 45d0c95..783e55d 100644 --- a/ClientBrowserUI/src/components/SideBar/MouseWheelMenu.jsx +++ b/ClientBrowserUI/src/components/SideBar/MouseWheelMenu.jsx @@ -4,9 +4,8 @@ import {List, ListItem, Box, IconButton, Divider, Collapse} from "@mui/material" import AddIcon from '@mui/icons-material/Add'; import RemoveIcon from '@mui/icons-material/Remove'; import {Context} from '../../utils/Context'; -import {primaryColor, secondaryColor, secondaryColorTrans} from '../../utils/Theme'; +import {convertHexToRGBA} from '../../utils/Theme'; import {api_mousewheel} from "../../api/mousewheel"; -import ModulesSettingMenu from "./ModulesSettingMenu"; class MouseWheelMenu extends Component { constructor(props) { @@ -52,16 +51,16 @@ class MouseWheelMenu extends Component { + style={{backgroundColor: this.context.primaryColor, width: '100%'}}> this.updateValue(e.value)} - textColor={secondaryColor} - valueColor={secondaryColor} - rangeColor={secondaryColorTrans} + textColor={this.context.secondaryColor} + valueColor={this.context.secondaryColor} + rangeColor={convertHexToRGBA(this.context.secondaryColor, 0.5)} strokeWidth={10} valueTemplate="{value}" /> @@ -75,13 +74,13 @@ class MouseWheelMenu extends Component { const newValue = Math.max(this.state.value - 1, -4); this.updateValue(newValue); }} disabled={this.state.value === -4}> - + { const newValue = Math.min(this.state.value + 1, 4); this.updateValue(newValue); }} disabled={this.state.value === 4}> - + diff --git a/ClientBrowserUI/src/components/SideBar/SettingMenu.jsx b/ClientBrowserUI/src/components/SideBar/SettingMenu.jsx index ac1a9c8..0a31623 100644 --- a/ClientBrowserUI/src/components/SideBar/SettingMenu.jsx +++ b/ClientBrowserUI/src/components/SideBar/SettingMenu.jsx @@ -16,11 +16,7 @@ import { CheckBoxOutlineBlankRounded, CheckBoxRounded } from '@mui/icons-material'; -import {ThemeProvider} from '@mui/material/styles'; -import { - customTheme, - secondaryColor -} from '../../utils/Theme'; +import {createTheme, ThemeProvider} from '@mui/material/styles'; class SettingMenu extends Component { constructor(props) { @@ -78,6 +74,18 @@ class SettingMenu extends Component { iconSizeSX.fontSize = `${window.innerWidth / 300.0}rem`; boxIconSX.marginRight = '-50px'; } + + let customTheme = createTheme({ + palette: { + primary: { + main: this.context.primaryColor, + }, + secondary: { + main: this.context.secondaryColor, + }, + }, + }); + return ( @@ -109,9 +117,9 @@ class SettingMenu extends Component { value="l" control={ { this.context.setPrimaryColor(color.hex); - theme_setPrimaryColor(color.hex); + updateColorCSS(color.hex, this.context.secondaryColor); } handleSecondaryColorChange = (color) => { this.context.setSecondaryColor(color.hex); - theme_setSecondaryColor(color.hex); + updateColorCSS(this.context.primaryColor, color.hex); } render() { @@ -45,7 +40,7 @@ class ThemeMenu extends Component { { this.handlePrimaryColorChange(color); }} @@ -53,10 +48,10 @@ class ThemeMenu extends Component { @@ -82,4 +93,6 @@ class VolumeMenu extends Component { } } +VolumeMenu.contextType = Context; + export default VolumeMenu; diff --git a/ClientBrowserUI/src/components/SideBar/index.jsx b/ClientBrowserUI/src/components/SideBar/index.jsx index c40eeac..c7ae8c5 100644 --- a/ClientBrowserUI/src/components/SideBar/index.jsx +++ b/ClientBrowserUI/src/components/SideBar/index.jsx @@ -18,7 +18,6 @@ import { ColorLensRounded, Settings } from '@mui/icons-material'; -import {primaryColor, secondaryColor} from '../../utils/Theme'; import ModulesSettingMenu from './ModulesSettingMenu'; import MouseWheelMenu from './MouseWheelMenu'; import KeyboardMenu from './KeyboardMenu'; @@ -35,8 +34,8 @@ class SideBar extends Component { let drawerWidth = '280px'; let drawerPaperProps = { sx: { - backgroundColor: primaryColor, - color: secondaryColor, + backgroundColor: this.context.primaryColor, + color: this.context.secondaryColor, width: drawerWidth, }, }; @@ -58,8 +57,8 @@ class SideBar extends Component { }; drawerPaperProps = { sx: { - backgroundColor: primaryColor, - color: secondaryColor, + backgroundColor: this.context.primaryColor, + color: this.context.secondaryColor, width: drawerWidth, // 调整字体和图标大小 '& .MuiListItemIcon-root': { diff --git a/ClientBrowserUI/src/components/TopBar.jsx b/ClientBrowserUI/src/components/TopBar.jsx index 5612e49..76b2bfb 100644 --- a/ClientBrowserUI/src/components/TopBar.jsx +++ b/ClientBrowserUI/src/components/TopBar.jsx @@ -1,7 +1,6 @@ import React from 'react'; import IconButton from '@mui/material/IconButton'; import MenuIcon from '@mui/icons-material/Menu'; -import {primaryColor, secondaryColor} from '../utils/Theme'; import {Context} from '../utils/Context'; class TopBar extends React.Component { @@ -23,7 +22,7 @@ class TopBar extends React.Component { marginTop: '10px', width: '20px', height: '20px', - color: secondaryColor, + color: this.context.secondaryColor, // 增加透明的伪元素以扩大触发区域 '&:after': { content: '""', @@ -41,12 +40,12 @@ class TopBar extends React.Component { top: '-5px', width: '100%', height: '35px', - backgroundColor: primaryColor, + backgroundColor: this.context.primaryColor, }}>

{ + if (value === null || value === undefined) return defaultValue; + switch (type) { + case 'int': + return parseInt(value, 10) || defaultValue; + case 'float': + return parseFloat(value) || defaultValue; + case 'boolean': + return value === 'true'; + default: + return value; + } +}; + export class ContextProvider extends Component { - state = { - /////////////////////////////////////////////////////////////////////////////////// - drawerOpen: false, - setDrawerOpen: (value) => { - this.setState({drawerOpen: value}); - }, - /////////////////////////////////////////////////////////////////////////////////// - // drawerRL 是用 char 类型保存的可切换状态值, 'l' 表示左侧,'r' 表示右侧 - drawerRL: getCookie('drawerRL') || 'l', - setDrawerRL: (value) => { - this.setState( - {drawerRL: value}, () => { - setCookie('drawerRL', value, 7); - return {drawerRL: value}; - } - ); - }, - /////////////////////////////////////////////////////////////////////////////////// - // tPadSensitivity 是用 float 类型保存的可切换状态值, 是灵敏度系数,默认为 1.0,必须大于 0 - tPadSensitivity: parseFloat(getCookie('tPadSensitivity')) || 1.0, - setTPadSensitivity: (value) => { - this.setState( - {tPadSensitivity: value}, () => { - setCookie('tPadSensitivity', value, 7); - return {tPadSensitivity: value}; - } - ); - }, - /////////////////////////////////////////////////////////////////////////////////// - mWheelSensitivity: parseFloat(getCookie('mWheelSensitivity')) || 1.0, - setMWheelSensitivity: (value) => { - this.setState( - {mWheelSensitivity: value}, () => { - setCookie('mWheelSensitivity', value, 7); - return {mWheelSensitivity: value}; - } - ); - }, - /////////////////////////////////////////////////////////////////////////////////// - buttonSW1: getCookie('buttonSW1') === 'false', - toggleButtonSW1: () => { - this.setState(prevState => { - const newValue = !prevState.buttonSW1; - setCookie('buttonSW1', newValue, 7); - return {buttonSW1: newValue}; - }); - }, - buttonSW4: getCookie('buttonSW4') === 'true', - toggleButtonSW4: () => { - this.setState(prevState => { - const newValue = !prevState.buttonSW4; - setCookie('buttonSW4', newValue, 7); - return {buttonSW4: newValue}; - }); - }, - button23: parseInt(getCookie('button23'), 10) || 0, - setButton23: (value) => { - this.setState( - {button23: value}, () => - setCookie('button23', value, 7)); - }, - ///////////////////////////////////////////////////////////////////////////////// - autoCollapse: getCookie('autoCollapse') === 'true', - toggleAutoCollapse: () => { - this.setState(prevState => { - const newValue = !prevState.autoCollapse; - setCookie('autoCollapse', newValue, 7); - return {autoCollapse: newValue}; - }); - }, - ///////////////////////////////////////////////////////////////////////////////// - mouseWheelMenuType: parseInt(getCookie('mouseWheelMenuType'), 10) || 0, - setMouseWheelMenuType: (value) => { - this.setState( - {mouseWheelMenuType: value}, () => - setCookie('mouseWheelMenuType', value, 7)); - }, - ///////////////////////////////////////////////////////////////////////////////// - sidebarModulesSettingMenu: getCookie('sidebarModulesSettingMenu') === 'false', - toggleSidebarModulesSettingMenu: () => { - this.setState(prevState => { - const newValue = !prevState.sidebarModulesSettingMenu; - setCookie('sidebarModulesSettingMenu', newValue, 7); - return {sidebarModulesSettingMenu: newValue}; - }); - }, - sidebarMouseWheelMenu: getCookie('sidebarMouseWheelMenu') === 'false', - toggleSidebarMouseWheelMenu: () => { - this.setState(prevState => { - const newValue = !prevState.sidebarMouseWheelMenu; - setCookie('sidebarMouseWheelMenu', newValue, 7); - return {sidebarMouseWheelMenu: newValue}; - }); - }, - sidebarKeyboardMenu: getCookie('sidebarKeyboardMenu') === 'false', - toggleSidebarKeyboardMenu: () => { - this.setState(prevState => { - const newValue = !prevState.sidebarKeyboardMenu; - setCookie('sidebarKeyboardMenu', newValue, 7); - return {sidebarKeyboardMenu: newValue}; - }); - }, - sidebarVolumeMenu: getCookie('sidebarVolumeMenu') === 'false', - toggleSidebarVolumeMenu: () => { - this.setState(prevState => { - const newValue = !prevState.sidebarVolumeMenu; - setCookie('sidebarVolumeMenu', newValue, 7); - return {sidebarVolumeMenu: newValue}; - }); - }, - sidebarSettingMenu: getCookie('sidebarSettingMenu') === 'false', - toggleSidebarSettingMenu: () => { - this.setState(prevState => { - const newValue = !prevState.sidebarSettingMenu; - setCookie('sidebarSettingMenu', newValue, 7); - return {sidebarSettingMenu: newValue}; - }); - }, - sidebarThemeMenu: getCookie('sidebarThemeMenu') === 'false', - toggleSidebarThemeMenu: () => { - this.setState(prevState => { - const newValue = !prevState.sidebarThemeMenu; - setCookie('sidebarThemeMenu', newValue, 7); - return {sidebarThemeMenu: newValue}; - }); - }, - ///////////////////////////////////////////////////////////////////////////////// - primaryColor: getCookie('primaryColor') || '#6df', - setPrimaryColor: (value) => { - this.setState( - {primaryColor: value}, () => - setCookie('primaryColor', value, 7)); - }, - secondaryColor: getCookie('secondaryColor') || '#333', - setSecondaryColor: (value) => { - this.setState( - {secondaryColor: value}, () => - setCookie('secondaryColor', value, 7)); - }, - ///////////////////////////////////////////////////////////////////////////////// - // openMenuSW 是用 int 类型保存的可切换状态值,0 表示关闭,1 表示打开键盘菜单,2 表示打开鼠标滚轮菜单,3 表示打开音量菜单... - openMenuSW: parseInt(getCookie('openMenuSW'), 10) || 0, - setOpenMenuSW: (value) => { - this.setState( - {openMenuSW: value}, () => - setCookie('openMenuSW', value, 7)); - }, - /////////////////////////////////////////////////////////////////////////////////// - // keyboardDataSendMod 是用 char 类型保存的可切换状态值 - keyboardDataSendMod: getCookie('keyboardDataSendMod') || 'a', - setKeyboardDataSendMod: (value) => { - this.setState( - {keyboardDataSendMod: value}, () => { - setCookie('keyboardDataSendMod', value, 7); - return {keyboardDataSendMod: value}; - } - ); - }, - /////////////////////////////////////////////////////////////////////////////////// - }; + constructor(props) { + super(props); + const state = {}; + + // 遍历配置,为每个状态项初始化值(优先使用 cookie 值,否则使用默认值) + Object.keys(settingsConfig).forEach(key => { + const {default: def, type, cookie} = settingsConfig[key]; + const cookieValue = cookie ? getCookie(cookie) : undefined; + state[key] = parseValue(cookieValue, type, def); + }); + + // 自动生成更新函数 + Object.keys(settingsConfig).forEach(key => { + const {cookie, toggle} = settingsConfig[key]; + const capitalizedKey = key.charAt(0).toUpperCase() + key.slice(1); - componentDidMount() { - // 从cookie初始化状态 - const buttonSW1 = getCookie('buttonSW1'); - const button23 = getCookie('button23'); - const buttonSW4 = getCookie('buttonSW4'); - const drawerRL = getCookie('drawerRL'); - const tPadSensitivity = getCookie('tPadSensitivity'); - const mWheelSensitivity = getCookie('mWheelSensitivity'); - const autoCollapse = getCookie('autoCollapse'); - const mouseWheelMenuType = getCookie('mouseWheelMenuType'); - const sidebarModulesSettingMenu = getCookie('sidebarModulesSettingMenu'); - const sidebarMouseWheelMenu = getCookie('sidebarMouseWheelMenu'); - const sidebarSettingMenu = getCookie('sidebarSettingMenu'); - const sidebarVolumeMenu = getCookie('sidebarVolumeMenu'); - const sidebarKeyboardMenu = getCookie('sidebarKeyboardMenu'); - const sidebarThemeMenu = getCookie('sidebarThemeMenu'); - const primaryColor = getCookie('primaryColor'); - const secondaryColor = getCookie('secondaryColor'); - const openMenuSW = getCookie('openMenuSW'); - const keyboardDataSendMod = getCookie('keyboardDataSendMod'); - this.setState({ - buttonSW1: buttonSW1 ? buttonSW1 === 'true' : this.state.buttonSW1, - button23: button23 ? parseInt(button23, 10) : this.state.button23, - buttonSW4: buttonSW4 ? buttonSW4 === 'true' : this.state.buttonSW4, - drawerRL: drawerRL || this.state.drawerRL, - tPadSensitivity: tPadSensitivity ? parseFloat(tPadSensitivity) : this.state.tPadSensitivity, - mWheelSensitivity: mWheelSensitivity ? parseFloat(mWheelSensitivity) : this.state.mWheelSensitivity, - autoCollapse: autoCollapse ? autoCollapse === 'true' : this.state.autoCollapse, - mouseWheelMenuType: mouseWheelMenuType ? parseInt(mouseWheelMenuType, 10) : this.state.mouseWheelMenuType, - sidebarModulesSettingMenu: sidebarModulesSettingMenu ? sidebarModulesSettingMenu === 'true' : this.state.sidebarModulesSettingMenu, - sidebarMouseWheelMenu: sidebarMouseWheelMenu ? sidebarMouseWheelMenu === 'true' : this.state.sidebarMouseWheelMenu, - sidebarSettingMenu: sidebarSettingMenu ? sidebarSettingMenu === 'true' : this.state.sidebarSettingMenu, - sidebarVolumeMenu: sidebarVolumeMenu ? sidebarVolumeMenu === 'true' : this.state.sidebarVolumeMenu, - sidebarKeyboardMenu: sidebarKeyboardMenu ? sidebarKeyboardMenu === 'true' : this.state.sidebarKeyboardMenu, - sidebarThemeMenu: sidebarThemeMenu ? sidebarThemeMenu === 'true' : this.state.sidebarThemeMenu, - primaryColor: primaryColor || this.state.primaryColor, - secondaryColor: secondaryColor || this.state.secondaryColor, - openMenuSW: openMenuSW ? parseInt(openMenuSW, 10) : this.state.openMenuSW, - keyboardDataSendMod: keyboardDataSendMod || this.state.keyboardDataSendMod, + // 生成 setter:更新状态并同步 cookie(如果配置了 cookie) + state[`set${capitalizedKey}`] = (value) => { + this.setState({[key]: value}, () => { + if (cookie) { + setCookie(cookie, value, 7); + } + }); + }; + + // 如果配置了 toggle,则生成 toggle 方法 + if (toggle) { + state[`toggle${capitalizedKey}`] = () => { + this.setState(prevState => { + const newValue = !prevState[key]; + if (cookie) { + setCookie(cookie, newValue, 7); + } + return {[key]: newValue}; + }); + }; + } }); + + this.state = state; } render() { diff --git a/ClientBrowserUI/src/utils/Theme.js b/ClientBrowserUI/src/utils/Theme.js index 61e68a2..99ba040 100644 --- a/ClientBrowserUI/src/utils/Theme.js +++ b/ClientBrowserUI/src/utils/Theme.js @@ -1,12 +1,8 @@ -import {createTheme} from "@mui/material/styles"; - -export let primaryColor = '#6df'; -export let primaryColorTrans = 'rgba(102, 204, 255, 0.5)'; -export let secondaryColor = '#333'; -export let secondaryColorTrans = 'rgba(51, 51, 51, 0.5)'; +export let defaultPrimaryColor = '#6DF'; +export let defaultSecondaryColor = '#333'; // 自动检测颜色格式并转换为半透明颜色值 -const convertHexToRGBA = (hex, opacity) => { +export const convertHexToRGBA = (hex, opacity) => { let tempHex = hex.replace('#', ''); // 检测并转换3位十六进制颜色为6位 if (tempHex.length === 3) { @@ -22,63 +18,28 @@ const convertHexToRGBA = (hex, opacity) => { return `rgba(${r}, ${g}, ${b}, ${opacity})`; }; -// 更新主题 -const updateTheme = () => { - customTheme.palette.primary.main = primaryColor; - customTheme.palette.secondary.main = secondaryColor; -}; - -export const setPrimaryColor = (color) => { - const newColorTrans = convertHexToRGBA(color, 0.5); - if (newColorTrans) { - primaryColor = color; - primaryColorTrans = newColorTrans; - updateTheme(); - // 修改 head 中的 - const metaThemeColor = document.querySelector("meta[name=theme-color]"); - if (metaThemeColor) { - metaThemeColor.setAttribute("content", color); - } - // 改变CSS中的background-color - const html = document.querySelector("html"); - const body = document.querySelector("body"); - const fullScreenBackground = document.querySelector(".full-screen-background"); - const appHeader = document.querySelector(".App-header"); - if (html) { - html.style.backgroundColor = color; - } - if (body) { - body.style.backgroundColor = color; - } - if (fullScreenBackground) { - fullScreenBackground.style.backgroundColor = color; - } - if (appHeader) { - appHeader.style.color = color; - } +export const updateColorCSS = (primaryColor, secondaryColor) => { + // 修改 head 中的 + const metaThemeColor = document.querySelector("meta[name=theme-color]"); + if (metaThemeColor) { + metaThemeColor.setAttribute("content", primaryColor); } -}; - -export const setSecondaryColor = (color) => { - const newColorTrans = convertHexToRGBA(color, 0.5); - if (newColorTrans) { - secondaryColor = color; - secondaryColorTrans = newColorTrans; - updateTheme(); - const appHeader = document.querySelector(".App-header"); - if (appHeader) { - appHeader.style.backgroundColor = color; - } + const html = document.querySelector("html"); + const body = document.querySelector("body"); + const fullScreenBackground = document.querySelector(".full-screen-background"); + const appHeader = document.querySelector(".App-header"); + if (html) { + html.style.backgroundColor = primaryColor; } -}; + if (body) { + body.style.backgroundColor = primaryColor; + } + if (fullScreenBackground) { + fullScreenBackground.style.backgroundColor = primaryColor; + } + if (appHeader) { + appHeader.style.color = primaryColor; + appHeader.style.backgroundColor = secondaryColor; + } +} -export let customTheme = createTheme({ - palette: { - primary: { - main: primaryColor, - }, - secondary: { - main: secondaryColor, - }, - }, -}); diff --git a/bin/dev/mac-node16_bullseye-p3000.sh b/bin/DevDockerEnv/mac-node16_bullseye-p3000.sh similarity index 100% rename from bin/dev/mac-node16_bullseye-p3000.sh rename to bin/DevDockerEnv/mac-node16_bullseye-p3000.sh diff --git a/bin/dev/mac-node16_bullseye.sh b/bin/DevDockerEnv/mac-node16_bullseye.sh similarity index 100% rename from bin/dev/mac-node16_bullseye.sh rename to bin/DevDockerEnv/mac-node16_bullseye.sh diff --git a/bin/dev/win-node16_bullseye-p3000.bat b/bin/DevDockerEnv/win-node16_bullseye-p3000.bat similarity index 100% rename from bin/dev/win-node16_bullseye-p3000.bat rename to bin/DevDockerEnv/win-node16_bullseye-p3000.bat diff --git a/bin/dev/win-node16_bullseye.bat b/bin/DevDockerEnv/win-node16_bullseye.bat similarity index 100% rename from bin/dev/win-node16_bullseye.bat rename to bin/DevDockerEnv/win-node16_bullseye.bat diff --git a/bin/dev/win-python3(10)_bullseye-p3000.bat b/bin/DevDockerEnv/win-python3(10)_bullseye-p3000.bat similarity index 100% rename from bin/dev/win-python3(10)_bullseye-p3000.bat rename to bin/DevDockerEnv/win-python3(10)_bullseye-p3000.bat diff --git a/bin/dev/win-python3(10)_bullseye.bat b/bin/DevDockerEnv/win-python3(10)_bullseye.bat similarity index 100% rename from bin/dev/win-python3(10)_bullseye.bat rename to bin/DevDockerEnv/win-python3(10)_bullseye.bat diff --git a/bin/PyInstallerOneFile.bat b/bin/PyInstallerOneFile.bat index 1327b80..6ece652 100644 --- a/bin/PyInstallerOneFile.bat +++ b/bin/PyInstallerOneFile.bat @@ -8,17 +8,11 @@ rd /s /q dist rd /s /q build rd /s /q venv rd /s /q logs +rd /s /q node_modules rd /s /q ClientBrowserUI\build +rd /s /q ClientBrowserUI\node_modules -where docker >nul 2>nul -if %errorlevel% neq 0 ( - cd ClientBrowserUI - npm install - npm run build - cd .. -) else ( - docker run -it --rm -v %cd%:/docker -w /docker node:16-bullseye bash -c "cd ClientBrowserUI; npm i; npm run build; exit" -) +docker run -it --rm -v %cd%:/docker -w /docker node:16-bullseye bash -c "cd ClientBrowserUI; npm i; npm run build; exit" python -m venv venv call venv\Scripts\activate From 7fe3e19421e7344ef8f036991dfd6a9c0e994864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Fri, 4 Apr 2025 10:18:40 -0400 Subject: [PATCH 10/12] =?UTF-8?q?Set=20up=20i18n=20framework,=20add=20Simp?= =?UTF-8?q?lified=20Chinese=20=E6=B7=BB=E5=8A=A0=E7=AE=80=E4=BD=93?= =?UTF-8?q?=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/SideBar/KeyboardMenu.jsx | 8 +- .../src/components/SideBar/LanguageMenu.jsx | 61 ++++++++++ ...sSettingMenu.jsx => LayoutSettingMenu.jsx} | 19 +-- .../src/components/SideBar/SettingMenu.jsx | 11 +- .../src/components/SideBar/ThemeMenu.jsx | 5 +- .../src/components/SideBar/index.jsx | 64 ++++++++-- ClientBrowserUI/src/utils/Context.jsx | 4 +- ClientBrowserUI/src/utils/i18n.js | 111 ++++++++++++++++++ 8 files changed, 251 insertions(+), 32 deletions(-) create mode 100644 ClientBrowserUI/src/components/SideBar/LanguageMenu.jsx rename ClientBrowserUI/src/components/SideBar/{ModulesSettingMenu.jsx => LayoutSettingMenu.jsx} (85%) create mode 100644 ClientBrowserUI/src/utils/i18n.js diff --git a/ClientBrowserUI/src/components/SideBar/KeyboardMenu.jsx b/ClientBrowserUI/src/components/SideBar/KeyboardMenu.jsx index 733f3f2..062baf1 100644 --- a/ClientBrowserUI/src/components/SideBar/KeyboardMenu.jsx +++ b/ClientBrowserUI/src/components/SideBar/KeyboardMenu.jsx @@ -20,6 +20,7 @@ import { api_keyboard_pastetext } from "../../api/keyboard"; import {api_get_system_info} from "../../api/system"; +import i18n from '../../utils/i18n'; class KeyboardMenu extends Component { constructor(props) { @@ -133,7 +134,8 @@ class KeyboardMenu extends Component { {this.state.serverIsMac ? ( - *MacOS ASCII Only + // If it's MacOS, then it only supports ASCII + {i18n.Sidebar.KeyboardMenu.MacOSOnlyMode[this.context.i18n]} ) : ( <> - Paste + {i18n.Sidebar.KeyboardMenu.Paste[this.context.i18n]} { @@ -167,7 +169,7 @@ class KeyboardMenu extends Component { }} color='secondary' /> - Type + {i18n.Sidebar.KeyboardMenu.Type[this.context.i18n]} )}

diff --git a/ClientBrowserUI/src/components/SideBar/LanguageMenu.jsx b/ClientBrowserUI/src/components/SideBar/LanguageMenu.jsx new file mode 100644 index 0000000..facc03d --- /dev/null +++ b/ClientBrowserUI/src/components/SideBar/LanguageMenu.jsx @@ -0,0 +1,61 @@ +import React, {Component} from 'react'; +import {Context} from '../../utils/Context'; +import {ListItem, Typography, TextField} from "@mui/material"; +import {createTheme, ThemeProvider} from "@mui/material/styles"; +import i18n from '../../utils/i18n'; + +class LanguageMenu extends Component { + static contextType = Context; + + // 处理语言选择变化,更新 Context 后自动刷新页面 + handleLanguageChange = (event) => { + const newLang = event.target.value; + this.context.setI18n(newLang); + // window.location.reload(); + }; + + render() { + let customTheme = createTheme({ + palette: { + primary: { + main: this.context.primaryColor, + }, + secondary: { + main: this.context.secondaryColor, + }, + }, + }); + + return ( + + +   +
+ + + + + + + ); + } +} + +export default LanguageMenu; diff --git a/ClientBrowserUI/src/components/SideBar/ModulesSettingMenu.jsx b/ClientBrowserUI/src/components/SideBar/LayoutSettingMenu.jsx similarity index 85% rename from ClientBrowserUI/src/components/SideBar/ModulesSettingMenu.jsx rename to ClientBrowserUI/src/components/SideBar/LayoutSettingMenu.jsx index d428672..cc7a72f 100644 --- a/ClientBrowserUI/src/components/SideBar/ModulesSettingMenu.jsx +++ b/ClientBrowserUI/src/components/SideBar/LayoutSettingMenu.jsx @@ -20,14 +20,17 @@ import { VisibilityOutlined } from '@mui/icons-material'; import {createTheme, ThemeProvider} from '@mui/material/styles'; +import i18n from '../../utils/i18n'; -class ModuleSettingMenu extends Component { +class LayoutSettingMenu extends Component { constructor(props) { super(props); } render() { - let iconSizeSX = {}; + let iconSizeSX = { + marginRight: '20px', + }; let boxIconSX = {}; if (window.innerWidth < 280) { const fontSize = window.innerWidth / 300.0; @@ -56,7 +59,7 @@ class ModuleSettingMenu extends Component { }}> - + {this.context.buttonSW1 ? : @@ -68,7 +71,7 @@ class ModuleSettingMenu extends Component { this.context.toggleButtonSW4(); }}> - + {this.context.buttonSW4 ? : @@ -80,7 +83,7 @@ class ModuleSettingMenu extends Component { this.context.setButton23((this.context.button23 + 1) % 3); }}> - + {this.context.button23 === 0 ? : this.context.button23 === 1 ? @@ -94,7 +97,7 @@ class ModuleSettingMenu extends Component { this.context.setMouseWheelMenuType((this.context.mouseWheelMenuType + 1) % 3); }}> - + {this.context.mouseWheelMenuType === 0 ? : this.context.mouseWheelMenuType === 1 ? @@ -110,6 +113,6 @@ class ModuleSettingMenu extends Component { } } -ModuleSettingMenu.contextType = Context; +LayoutSettingMenu.contextType = Context; -export default ModuleSettingMenu; +export default LayoutSettingMenu; diff --git a/ClientBrowserUI/src/components/SideBar/SettingMenu.jsx b/ClientBrowserUI/src/components/SideBar/SettingMenu.jsx index 0a31623..37c8eaa 100644 --- a/ClientBrowserUI/src/components/SideBar/SettingMenu.jsx +++ b/ClientBrowserUI/src/components/SideBar/SettingMenu.jsx @@ -17,6 +17,7 @@ import { CheckBoxRounded } from '@mui/icons-material'; import {createTheme, ThemeProvider} from '@mui/material/styles'; +import i18n from '../../utils/i18n'; class SettingMenu extends Component { constructor(props) { @@ -90,7 +91,7 @@ class SettingMenu extends Component { - Auto-Collapse Submenus + {i18n.Sidebar.SettingMenu.AutoCollapseSubmenus[this.context.i18n]}
{ this.context.toggleAutoCollapse(); @@ -102,7 +103,7 @@ class SettingMenu extends Component { - Sidebar Toggle + {i18n.Sidebar.SettingMenu.SidebarToggle[this.context.i18n]}
- Adjustment Parameters + {i18n.Sidebar.SettingMenu.AdjustmentParameters[this.context.i18n]}
 
this.handleTextFieldChange(e, 'tPadSensitivity')} @@ -174,7 +175,7 @@ class SettingMenu extends Component {  
this.handleTextFieldChange(e, 'mWheelSensitivity')} diff --git a/ClientBrowserUI/src/components/SideBar/ThemeMenu.jsx b/ClientBrowserUI/src/components/SideBar/ThemeMenu.jsx index a8cf336..ca347a4 100644 --- a/ClientBrowserUI/src/components/SideBar/ThemeMenu.jsx +++ b/ClientBrowserUI/src/components/SideBar/ThemeMenu.jsx @@ -11,6 +11,7 @@ import { TwitterPicker } from 'react-color'; import {defaultPrimaryColor,defaultSecondaryColor,updateColorCSS} from '../../utils/Theme'; +import i18n from '../../utils/i18n'; class ThemeMenu extends Component { constructor(props) { @@ -35,7 +36,7 @@ class ThemeMenu extends Component { disablePadding > - Primary Color + {i18n.Sidebar.ThemeMenu.PrimaryColor[this.context.i18n]}
@@ -69,7 +70,7 @@ class ThemeMenu extends Component { /> - Secondary Color + {i18n.Sidebar.ThemeMenu.SecondaryColor[this.context.i18n]}
diff --git a/ClientBrowserUI/src/components/SideBar/index.jsx b/ClientBrowserUI/src/components/SideBar/index.jsx index c7ae8c5..a3fe06d 100644 --- a/ClientBrowserUI/src/components/SideBar/index.jsx +++ b/ClientBrowserUI/src/components/SideBar/index.jsx @@ -16,14 +16,17 @@ import { FilterTiltShift, Tune, ColorLensRounded, + GTranslate, Settings } from '@mui/icons-material'; -import ModulesSettingMenu from './ModulesSettingMenu'; +import LayoutSettingMenu from './LayoutSettingMenu'; import MouseWheelMenu from './MouseWheelMenu'; import KeyboardMenu from './KeyboardMenu'; import VolumeMenu from './VolumeMenu'; import ThemeMenu from './ThemeMenu'; +import LanguageMenu from './LanguageMenu'; import SettingMenu from './SettingMenu'; +import i18n from '../../utils/i18n'; class SideBar extends Component { constructor(props) { @@ -90,7 +93,7 @@ class SideBar extends Component { this.context.setOpenMenuSW(1); } } else { - this.context.toggleSidebarModulesSettingMenu(); + this.context.toggleSidebarLayoutSettingMenu(); } } }}> @@ -99,21 +102,21 @@ class SideBar extends Component { fontSize: '1rem', fontWeight: 'bold', }}> -    Modules Settings +    {i18n.Sidebar.index.LayoutSettings[this.context.i18n]} {this.context.autoCollapse ? this.context.openMenuSW === 1 ? : : - this.context.sidebarModulesSettingMenu ? + this.context.sidebarLayoutSettingMenu ? : } - + in={this.context.autoCollapse ? this.context.openMenuSW === 1 : this.context.sidebarLayoutSettingMenu}> + { @@ -134,7 +137,7 @@ class SideBar extends Component { fontSize: '1rem', fontWeight: 'bold', }}> -    Keyboard +    {i18n.Sidebar.index.Keyboard[this.context.i18n]} {this.context.autoCollapse ? this.context.openMenuSW === 2 ? @@ -169,7 +172,7 @@ class SideBar extends Component { fontSize: '1rem', fontWeight: 'bold', }}> -    Mouse Wheel +    {i18n.Sidebar.index.MouseWheel[this.context.i18n]} {this.context.autoCollapse ? this.context.openMenuSW === 3 ? @@ -204,7 +207,7 @@ class SideBar extends Component { fontSize: '1rem', fontWeight: 'bold', }}> -    Volume +    {i18n.Sidebar.index.Volume[this.context.i18n]} {this.context.autoCollapse ? this.context.openMenuSW === 4 ? @@ -239,7 +242,7 @@ class SideBar extends Component { fontSize: '1rem', fontWeight: 'bold', }}> -    Color Scheme +    {i18n.Sidebar.index.ColorScheme[this.context.i18n]} {this.context.autoCollapse ? this.context.openMenuSW === 5 ? @@ -264,6 +267,41 @@ class SideBar extends Component { } else { this.context.setOpenMenuSW(6); } + } else { + this.context.toggleSidebarLanguageMenu(); + } + } + }}> + + +    {i18n.Sidebar.index.Language[this.context.i18n]} + + {this.context.autoCollapse ? + this.context.openMenuSW === 6 ? + : + : + this.context.sidebarLanguageMenu ? + : + + } + + + + + + + { + { + if (this.context.autoCollapse) { + if (this.context.openMenuSW === 7) { + this.context.setOpenMenuSW(0); + } else { + this.context.setOpenMenuSW(7); + } } else { this.context.toggleSidebarSettingMenu(); } @@ -274,10 +312,10 @@ class SideBar extends Component { fontSize: '1rem', fontWeight: 'bold', }}> -    Advanced Settings +    {i18n.Sidebar.index.AdvancedSettings[this.context.i18n]} {this.context.autoCollapse ? - this.context.openMenuSW === 6 ? + this.context.openMenuSW === 7 ? : : this.context.sidebarSettingMenu ? @@ -287,7 +325,7 @@ class SideBar extends Component { + in={this.context.autoCollapse ? this.context.openMenuSW === 7 : this.context.sidebarSettingMenu}> diff --git a/ClientBrowserUI/src/utils/Context.jsx b/ClientBrowserUI/src/utils/Context.jsx index 0d74fd0..61aeca7 100644 --- a/ClientBrowserUI/src/utils/Context.jsx +++ b/ClientBrowserUI/src/utils/Context.jsx @@ -16,16 +16,18 @@ const settingsConfig = { button23: {default: 0, cookie: 'button23', type: 'int'}, autoCollapse: {default: false, cookie: 'autoCollapse', type: 'boolean', toggle: true}, mouseWheelMenuType: {default: 0, cookie: 'mouseWheelMenuType', type: 'int'}, - sidebarModulesSettingMenu: {default: false, cookie: 'sidebarModulesSettingMenu', type: 'boolean', toggle: true}, + sidebarLayoutSettingMenu: {default: false, cookie: 'sidebarModulesSettingMenu', type: 'boolean', toggle: true}, sidebarMouseWheelMenu: {default: false, cookie: 'sidebarMouseWheelMenu', type: 'boolean', toggle: true}, sidebarKeyboardMenu: {default: false, cookie: 'sidebarKeyboardMenu', type: 'boolean', toggle: true}, sidebarVolumeMenu: {default: false, cookie: 'sidebarVolumeMenu', type: 'boolean', toggle: true}, sidebarSettingMenu: {default: false, cookie: 'sidebarSettingMenu', type: 'boolean', toggle: true}, sidebarThemeMenu: {default: false, cookie: 'sidebarThemeMenu', type: 'boolean', toggle: true}, + sidebarLanguageMenu: {default: false, cookie: 'sidebarLanguageMenu', type: 'boolean', toggle: true}, primaryColor: {default: defaultPrimaryColor, cookie: 'primaryColor'}, secondaryColor: {default: defaultSecondaryColor, cookie: 'secondaryColor'}, openMenuSW: {default: 0, cookie: 'openMenuSW', type: 'int'}, keyboardDataSendMod: {default: 'a', cookie: 'keyboardDataSendMod'}, + i18n: {default: 'en', cookie: 'i18n'}, }; // 根据配置解析 cookie 值 diff --git a/ClientBrowserUI/src/utils/i18n.js b/ClientBrowserUI/src/utils/i18n.js new file mode 100644 index 0000000..b1b2d27 --- /dev/null +++ b/ClientBrowserUI/src/utils/i18n.js @@ -0,0 +1,111 @@ +import KeyboardMenu from "../components/SideBar/KeyboardMenu"; +import ThemeMenu from "../components/SideBar/ThemeMenu"; +import LayoutSettingMenu from "../components/SideBar/LayoutSettingMenu"; + +const i18n = { + Screen: {}, + Sidebar: { + index: { + LayoutSettings: { + en: "Layout Settings", + zh: "布局调整", + }, + Keyboard: { + en: "Keyboard", + zh: "模拟键盘", + }, + MouseWheel: { + en: "Mouse Wheel", + zh: "模拟滚轮", + }, + Volume: { + en: "Volume", + zh: "音量调整", + }, + ColorScheme: { + en: "Color Scheme", + zh: "主题配色调整", + }, + Language: { + en: "Language", + zh: "语言 (Language)", + }, + AdvancedSettings: { + en: "Advanced Settings", + zh: "更多设置", + }, + }, + LayoutSettingMenu: { + Touchpad: { + en: "Touchpad", + zh: "触摸板", + }, + DPad: { + en: "D-Pad", + zh: "方向键", + }, + MouseButtons: { + en: "Mouse Buttons", + zh: "鼠标按钮", + }, + MouseWheel: { + en: "Mouse Wheel", + zh: "鼠标滚轮", + }, + }, + KeyboardMenu: { + MacOSOnlyMode: { + en: "*MacOS ASCII Only", + zh: "*MacOS 仅限 ASCII", + }, + Paste: { + en: "Paste", + zh: "粘贴", + }, + Type: { + en: "Type", + zh: "输入", + }, + }, + ThemeMenu: { + PrimaryColor: { + en: "Primary Color", + zh: "主色", + }, + SecondaryColor: { + en: "Secondary Color", + zh: "对比色", + }, + }, + LanguageMenu: { + Language: { + en: "Language", + zh: "语言", + }, + }, + SettingMenu: { + AutoCollapseSubmenus: { + en: "Auto-Collapse Submenus", + zh: "自动折叠子菜单", + }, + SidebarToggle: { + en: "Sidebar Toggle", + zh: "侧边栏换边", + }, + AdjustmentParameters: { + en: "Adjustment Parameters", + zh: "可调参数", + }, + TPadSensitivity: { + en: "Touchpad Sensitivity", + zh: "触摸板灵敏度", + }, + MWheelSensitivity: { + en: "Mouse Wheel Sensitivity", + zh: "鼠标滚轮灵敏度", + }, + }, + }, +} + +export default i18n; \ No newline at end of file From 7af23054cab7174a7d501e6d5e86f34f9683977f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Fri, 4 Apr 2025 10:22:23 -0400 Subject: [PATCH 11/12] v0.6.5 --- README.md | 4 ++-- docs/README-cn.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cfb3654..db9786b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@
-

iController v0.6.4

+

iController v0.6.5

English | 简体中文

-   +     diff --git a/docs/README-cn.md b/docs/README-cn.md index 293768d..a37473e 100644 --- a/docs/README-cn.md +++ b/docs/README-cn.md @@ -1,9 +1,9 @@
-

iController v0.6.4

+

iController v0.6.5

English | 简体中文

-   +     From 2aa7b7e4b4f701ef07fc2894eba14f35ebda4ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehver=20=7C=20=E8=BF=99=E6=B0=B4=E6=80=8E=E4=B9=88?= =?UTF-8?q?=E6=B2=A1=E5=91=B3=E5=84=BF=E5=95=8A?= <75297777+Mehver@users.noreply.github.com> Date: Fri, 4 Apr 2025 10:34:41 -0400 Subject: [PATCH 12/12] Update UpdateVersionNumber.py --- bin/UpdateVersionNumber.py | 2 +- iController.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/UpdateVersionNumber.py b/bin/UpdateVersionNumber.py index b9be377..46f0431 100644 --- a/bin/UpdateVersionNumber.py +++ b/bin/UpdateVersionNumber.py @@ -16,4 +16,4 @@ def UpdateVersionNumber(filename, encoder, lines_list, old_version, new_version) UpdateVersionNumber('README.md', "utf-8", [3, 6], OLD_VERSION, NEW_VERSION) UpdateVersionNumber('docs/README-cn.md', "utf-8", [3, 6], OLD_VERSION, NEW_VERSION) -UpdateVersionNumber('iController.py', "utf-8", [16], OLD_VERSION, NEW_VERSION) +UpdateVersionNumber('iController.py', "utf-8", [17], OLD_VERSION, NEW_VERSION) diff --git a/iController.py b/iController.py index 8cd2348..e20f22f 100644 --- a/iController.py +++ b/iController.py @@ -14,7 +14,7 @@ |_\____/\___/|_| |_|\__|_| \___/|_|_|\___|_| https://github.com/Mehver/iController -v0.6.4 +v0.6.5 """)