forked from emsesp/EMS-ESP32
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request emsesp#1493 from proddy/dev
update standalone server to bun and itty-router, add back router paths, add support download button
- Loading branch information
Showing
35 changed files
with
3,759 additions
and
1,005 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
"preview": "vite preview", | ||
"build-hosted": "typesafe-i18n --no-watch && vite build --mode hosted", | ||
"preview-standalone": "typesafe-i18n --no-watch && vite build && concurrently -c \"auto\" \"npm:mock-api\" \"vite preview\"", | ||
"mock-api": "node --watch ../mock-api ../mock-api/server.js", | ||
"mock-api": "bun --watch ../mock-api/server.ts", | ||
"standalone": "concurrently -c \"auto\" \"typesafe-i18n\" \"npm:mock-api\" \"vite\"", | ||
"typesafe-i18n": "typesafe-i18n --no-watch", | ||
"webUI": "node progmem-generator.js", | ||
|
@@ -21,19 +21,19 @@ | |
}, | ||
"dependencies": { | ||
"@alova/adapter-xhr": "^1.0.1", | ||
"@babel/core": "^7.23.5", | ||
"@babel/core": "^7.23.6", | ||
"@emotion/react": "^11.11.1", | ||
"@emotion/styled": "^11.11.0", | ||
"@mui/icons-material": "^5.14.19", | ||
"@mui/material": "^5.14.19", | ||
"@mui/icons-material": "^5.15.0", | ||
"@mui/material": "^5.15.0", | ||
"@table-library/react-table-library": "4.1.7", | ||
"@types/imagemin": "^8.0.5", | ||
"@types/lodash-es": "^4.17.12", | ||
"@types/node": "^20.10.3", | ||
"@types/react": "^18.2.41", | ||
"@types/node": "^20.10.4", | ||
"@types/react": "^18.2.43", | ||
"@types/react-dom": "^18.2.17", | ||
"@types/react-router-dom": "^5.3.3", | ||
"alova": "^2.15.0", | ||
"alova": "^2.16.0", | ||
"async-validator": "^4.2.5", | ||
"history": "^5.3.0", | ||
"jwt-decode": "^4.0.0", | ||
|
@@ -47,13 +47,13 @@ | |
"react-toastify": "^9.1.3", | ||
"sockette": "^2.0.6", | ||
"typesafe-i18n": "^5.26.2", | ||
"typescript": "^5.3.2" | ||
"typescript": "^5.3.3" | ||
}, | ||
"devDependencies": { | ||
"@preact/compat": "^17.1.2", | ||
"@preact/preset-vite": "^2.7.0", | ||
"@typescript-eslint/eslint-plugin": "^6.13.1", | ||
"@typescript-eslint/parser": "^6.13.1", | ||
"@typescript-eslint/eslint-plugin": "^6.14.0", | ||
"@typescript-eslint/parser": "^6.14.0", | ||
"concurrently": "^8.2.2", | ||
"eslint": "^8.55.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
|
@@ -66,13 +66,13 @@ | |
"eslint-plugin-prettier": "alpha", | ||
"eslint-plugin-react": "^7.33.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"preact": "^10.19.2", | ||
"prettier": "^3.1.0", | ||
"rollup-plugin-visualizer": "^5.10.0", | ||
"terser": "^5.25.0", | ||
"vite": "^5.0.5", | ||
"preact": "^10.19.3", | ||
"prettier": "^3.1.1", | ||
"rollup-plugin-visualizer": "^5.11.0", | ||
"terser": "^5.26.0", | ||
"vite": "^5.0.8", | ||
"vite-plugin-imagemin": "^0.6.1", | ||
"vite-tsconfig-paths": "^4.2.1" | ||
"vite-tsconfig-paths": "^4.2.2" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { useMatch, useResolvedPath } from 'react-router-dom'; | ||
import { useLocation } from 'react-router-dom'; | ||
|
||
export const useRouterTab = () => { | ||
// const loc = useLocation().pathname; | ||
// const routerTab = loc.substring(0, loc.lastIndexOf('/')) ? loc : false; | ||
const loc = useLocation().pathname; | ||
const routerTab = loc.substring(0, loc.lastIndexOf('/')) ? loc : false; | ||
|
||
const routerTabPath = useResolvedPath(':tab'); | ||
const routerTabPathMatch = useMatch(routerTabPath.pathname); | ||
const routerTab = routerTabPathMatch?.params?.tab || false; | ||
// const routerTabPath = useResolvedPath(':tab'); | ||
// const routerTabPathMatch = useMatch(routerTabPath.pathname); | ||
// const routerTab = routerTabPathMatch?.params?.tab || false; | ||
|
||
return { routerTab } as const; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.