mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-26 08:39:09 +03:00
rollback to other partitions - #2837
This commit is contained in:
@@ -62,10 +62,10 @@
|
||||
"prettier": "^3.7.4",
|
||||
"rollup-plugin-visualizer": "^6.0.5",
|
||||
"terser": "^5.44.1",
|
||||
"typescript-eslint": "^8.50.0",
|
||||
"typescript-eslint": "^8.50.1",
|
||||
"vite": "^7.3.0",
|
||||
"vite-plugin-imagemin": "^0.6.1",
|
||||
"vite-tsconfig-paths": "^6.0.3"
|
||||
},
|
||||
"packageManager": "pnpm@10.26.1+sha512.664074abc367d2c9324fdc18037097ce0a8f126034160f709928e9e9f95d98714347044e5c3164d65bd5da6c59c6be362b107546292a8eecb7999196e5ce58fa"
|
||||
"packageManager": "pnpm@10.26.2+sha512.0e308ff2005fc7410366f154f625f6631ab2b16b1d2e70238444dd6ae9d630a8482d92a451144debc492416896ed16f7b114a86ec68b8404b2443869e68ffda6"
|
||||
}
|
||||
|
||||
136
interface/pnpm-lock.yaml
generated
136
interface/pnpm-lock.yaml
generated
@@ -118,8 +118,8 @@ importers:
|
||||
specifier: ^5.44.1
|
||||
version: 5.44.1
|
||||
typescript-eslint:
|
||||
specifier: ^8.50.0
|
||||
version: 8.50.0(eslint@9.39.2)(typescript@5.9.3)
|
||||
specifier: ^8.50.1
|
||||
version: 8.50.1(eslint@9.39.2)(typescript@5.9.3)
|
||||
vite:
|
||||
specifier: ^7.3.0
|
||||
version: 7.3.0(@types/node@25.0.3)(terser@5.44.1)
|
||||
@@ -888,63 +888,63 @@ packages:
|
||||
'@types/svgo@2.6.4':
|
||||
resolution: {integrity: sha512-l4cmyPEckf8moNYHdJ+4wkHvFxjyW6ulm9l4YGaOxeyBWPhBOT0gvni1InpFPdzx1dKf/2s62qGITwxNWnPQng==}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.50.0':
|
||||
resolution: {integrity: sha512-O7QnmOXYKVtPrfYzMolrCTfkezCJS9+ljLdKW/+DCvRsc3UAz+sbH6Xcsv7p30+0OwUbeWfUDAQE0vpabZ3QLg==}
|
||||
'@typescript-eslint/eslint-plugin@8.50.1':
|
||||
resolution: {integrity: sha512-PKhLGDq3JAg0Jk/aK890knnqduuI/Qj+udH7wCf0217IGi4gt+acgCyPVe79qoT+qKUvHMDQkwJeKW9fwl8Cyw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^8.50.0
|
||||
'@typescript-eslint/parser': ^8.50.1
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/parser@8.50.0':
|
||||
resolution: {integrity: sha512-6/cmF2piao+f6wSxUsJLZjck7OQsYyRtcOZS02k7XINSNlz93v6emM8WutDQSXnroG2xwYlEVHJI+cPA7CPM3Q==}
|
||||
'@typescript-eslint/parser@8.50.1':
|
||||
resolution: {integrity: sha512-hM5faZwg7aVNa819m/5r7D0h0c9yC4DUlWAOvHAtISdFTc8xB86VmX5Xqabrama3wIPJ/q9RbGS1worb6JfnMg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/project-service@8.50.0':
|
||||
resolution: {integrity: sha512-Cg/nQcL1BcoTijEWyx4mkVC56r8dj44bFDvBdygifuS20f3OZCHmFbjF34DPSi07kwlFvqfv/xOLnJ5DquxSGQ==}
|
||||
'@typescript-eslint/project-service@8.50.1':
|
||||
resolution: {integrity: sha512-E1ur1MCVf+YiP89+o4Les/oBAVzmSbeRB0MQLfSlYtbWU17HPxZ6Bhs5iYmKZRALvEuBoXIZMOIRRc/P++Ortg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/scope-manager@8.50.0':
|
||||
resolution: {integrity: sha512-xCwfuCZjhIqy7+HKxBLrDVT5q/iq7XBVBXLn57RTIIpelLtEIZHXAF/Upa3+gaCpeV1NNS5Z9A+ID6jn50VD4A==}
|
||||
'@typescript-eslint/scope-manager@8.50.1':
|
||||
resolution: {integrity: sha512-mfRx06Myt3T4vuoHaKi8ZWNTPdzKPNBhiblze5N50//TSHOAQQevl/aolqA/BcqqbJ88GUnLqjjcBc8EWdBcVw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.50.0':
|
||||
resolution: {integrity: sha512-vxd3G/ybKTSlm31MOA96gqvrRGv9RJ7LGtZCn2Vrc5htA0zCDvcMqUkifcjrWNNKXHUU3WCkYOzzVSFBd0wa2w==}
|
||||
'@typescript-eslint/tsconfig-utils@8.50.1':
|
||||
resolution: {integrity: sha512-ooHmotT/lCWLXi55G4mvaUF60aJa012QzvLK0Y+Mp4WdSt17QhMhWOaBWeGTFVkb2gDgBe19Cxy1elPXylslDw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/type-utils@8.50.0':
|
||||
resolution: {integrity: sha512-7OciHT2lKCewR0mFoBrvZJ4AXTMe/sYOe87289WAViOocEmDjjv8MvIOT2XESuKj9jp8u3SZYUSh89QA4S1kQw==}
|
||||
'@typescript-eslint/type-utils@8.50.1':
|
||||
resolution: {integrity: sha512-7J3bf022QZE42tYMO6SL+6lTPKFk/WphhRPe9Tw/el+cEwzLz1Jjz2PX3GtGQVxooLDKeMVmMt7fWpYRdG5Etg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/types@8.50.0':
|
||||
resolution: {integrity: sha512-iX1mgmGrXdANhhITbpp2QQM2fGehBse9LbTf0sidWK6yg/NE+uhV5dfU1g6EYPlcReYmkE9QLPq/2irKAmtS9w==}
|
||||
'@typescript-eslint/types@8.50.1':
|
||||
resolution: {integrity: sha512-v5lFIS2feTkNyMhd7AucE/9j/4V9v5iIbpVRncjk/K0sQ6Sb+Np9fgYS/63n6nwqahHQvbmujeBL7mp07Q9mlA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.50.0':
|
||||
resolution: {integrity: sha512-W7SVAGBR/IX7zm1t70Yujpbk+zdPq/u4soeFSknWFdXIFuWsBGBOUu/Tn/I6KHSKvSh91OiMuaSnYp3mtPt5IQ==}
|
||||
'@typescript-eslint/typescript-estree@8.50.1':
|
||||
resolution: {integrity: sha512-woHPdW+0gj53aM+cxchymJCrh0cyS7BTIdcDxWUNsclr9VDkOSbqC13juHzxOmQ22dDkMZEpZB+3X1WpUvzgVQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/utils@8.50.0':
|
||||
resolution: {integrity: sha512-87KgUXET09CRjGCi2Ejxy3PULXna63/bMYv72tCAlDJC3Yqwln0HiFJ3VJMst2+mEtNtZu5oFvX4qJGjKsnAgg==}
|
||||
'@typescript-eslint/utils@8.50.1':
|
||||
resolution: {integrity: sha512-lCLp8H1T9T7gPbEuJSnHwnSuO9mDf8mfK/Nion5mZmiEaQD9sWf9W4dfeFqRyqRjF06/kBuTmAqcs9sewM2NbQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.50.0':
|
||||
resolution: {integrity: sha512-Xzmnb58+Db78gT/CCj/PVCvK+zxbnsw6F+O1oheYszJbBSdEjVhQi3C/Xttzxgi/GLmpvOggRs1RFpiJ8+c34Q==}
|
||||
'@typescript-eslint/visitor-keys@8.50.1':
|
||||
resolution: {integrity: sha512-IrDKrw7pCRUR94zeuCSUWQ+w8JEf5ZX5jl/e6AHGSLi1/zIr0lgutfn/7JpfCey+urpgQEdrZVYzCaVVKiTwhQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
acorn-jsx@5.3.2:
|
||||
@@ -1614,8 +1614,8 @@ packages:
|
||||
resolution: {integrity: sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig==}
|
||||
hasBin: true
|
||||
|
||||
fastq@1.19.1:
|
||||
resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==}
|
||||
fastq@1.20.1:
|
||||
resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==}
|
||||
|
||||
fd-slicer@1.1.0:
|
||||
resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==}
|
||||
@@ -2924,8 +2924,8 @@ packages:
|
||||
peerDependencies:
|
||||
typescript: '>=3.5.1'
|
||||
|
||||
typescript-eslint@8.50.0:
|
||||
resolution: {integrity: sha512-Q1/6yNUmCpH94fbgMUMg2/BSAr/6U7GBk61kZTv1/asghQOWOjTlp9K8mixS5NcJmm2creY+UFfGeW/+OcA64A==}
|
||||
typescript-eslint@8.50.1:
|
||||
resolution: {integrity: sha512-ytTHO+SoYSbhAH9CrYnMhiLx8To6PSSvqnvXyPUgPETCvB6eBKmTI9w6XMPS3HsBRGkwTVBX+urA8dYQx6bHfQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
@@ -3583,7 +3583,7 @@ snapshots:
|
||||
'@nodelib/fs.walk@1.2.8':
|
||||
dependencies:
|
||||
'@nodelib/fs.scandir': 2.1.5
|
||||
fastq: 1.19.1
|
||||
fastq: 1.20.1
|
||||
|
||||
'@paralleldrive/cuid2@2.3.1':
|
||||
dependencies:
|
||||
@@ -3803,14 +3803,14 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/node': 25.0.3
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.50.0(@typescript-eslint/parser@8.50.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3)':
|
||||
'@typescript-eslint/eslint-plugin@8.50.1(@typescript-eslint/parser@8.50.1(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.12.2
|
||||
'@typescript-eslint/parser': 8.50.0(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/scope-manager': 8.50.0
|
||||
'@typescript-eslint/type-utils': 8.50.0(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.50.0(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.50.0
|
||||
'@typescript-eslint/parser': 8.50.1(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/scope-manager': 8.50.1
|
||||
'@typescript-eslint/type-utils': 8.50.1(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.50.1(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.50.1
|
||||
eslint: 9.39.2
|
||||
ignore: 7.0.5
|
||||
natural-compare: 1.4.0
|
||||
@@ -3819,41 +3819,41 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/parser@8.50.0(eslint@9.39.2)(typescript@5.9.3)':
|
||||
'@typescript-eslint/parser@8.50.1(eslint@9.39.2)(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 8.50.0
|
||||
'@typescript-eslint/types': 8.50.0
|
||||
'@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.50.0
|
||||
'@typescript-eslint/scope-manager': 8.50.1
|
||||
'@typescript-eslint/types': 8.50.1
|
||||
'@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.50.1
|
||||
debug: 4.4.3
|
||||
eslint: 9.39.2
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/project-service@8.50.0(typescript@5.9.3)':
|
||||
'@typescript-eslint/project-service@8.50.1(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/tsconfig-utils': 8.50.0(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.50.0
|
||||
'@typescript-eslint/tsconfig-utils': 8.50.1(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.50.1
|
||||
debug: 4.4.3
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/scope-manager@8.50.0':
|
||||
'@typescript-eslint/scope-manager@8.50.1':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.50.0
|
||||
'@typescript-eslint/visitor-keys': 8.50.0
|
||||
'@typescript-eslint/types': 8.50.1
|
||||
'@typescript-eslint/visitor-keys': 8.50.1
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.50.0(typescript@5.9.3)':
|
||||
'@typescript-eslint/tsconfig-utils@8.50.1(typescript@5.9.3)':
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
'@typescript-eslint/type-utils@8.50.0(eslint@9.39.2)(typescript@5.9.3)':
|
||||
'@typescript-eslint/type-utils@8.50.1(eslint@9.39.2)(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.50.0
|
||||
'@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.50.0(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.50.1
|
||||
'@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.50.1(eslint@9.39.2)(typescript@5.9.3)
|
||||
debug: 4.4.3
|
||||
eslint: 9.39.2
|
||||
ts-api-utils: 2.1.0(typescript@5.9.3)
|
||||
@@ -3861,14 +3861,14 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/types@8.50.0': {}
|
||||
'@typescript-eslint/types@8.50.1': {}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.50.0(typescript@5.9.3)':
|
||||
'@typescript-eslint/typescript-estree@8.50.1(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/project-service': 8.50.0(typescript@5.9.3)
|
||||
'@typescript-eslint/tsconfig-utils': 8.50.0(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.50.0
|
||||
'@typescript-eslint/visitor-keys': 8.50.0
|
||||
'@typescript-eslint/project-service': 8.50.1(typescript@5.9.3)
|
||||
'@typescript-eslint/tsconfig-utils': 8.50.1(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.50.1
|
||||
'@typescript-eslint/visitor-keys': 8.50.1
|
||||
debug: 4.4.3
|
||||
minimatch: 9.0.5
|
||||
semver: 7.7.3
|
||||
@@ -3878,20 +3878,20 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/utils@8.50.0(eslint@9.39.2)(typescript@5.9.3)':
|
||||
'@typescript-eslint/utils@8.50.1(eslint@9.39.2)(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2)
|
||||
'@typescript-eslint/scope-manager': 8.50.0
|
||||
'@typescript-eslint/types': 8.50.0
|
||||
'@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3)
|
||||
'@typescript-eslint/scope-manager': 8.50.1
|
||||
'@typescript-eslint/types': 8.50.1
|
||||
'@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3)
|
||||
eslint: 9.39.2
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.50.0':
|
||||
'@typescript-eslint/visitor-keys@8.50.1':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.50.0
|
||||
'@typescript-eslint/types': 8.50.1
|
||||
eslint-visitor-keys: 4.2.1
|
||||
|
||||
acorn-jsx@5.3.2(acorn@8.15.0):
|
||||
@@ -4662,7 +4662,7 @@ snapshots:
|
||||
dependencies:
|
||||
strnum: 1.1.2
|
||||
|
||||
fastq@1.19.1:
|
||||
fastq@1.20.1:
|
||||
dependencies:
|
||||
reusify: 1.1.0
|
||||
|
||||
@@ -5912,12 +5912,12 @@ snapshots:
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
typescript-eslint@8.50.0(eslint@9.39.2)(typescript@5.9.3):
|
||||
typescript-eslint@8.50.1(eslint@9.39.2)(typescript@5.9.3):
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 8.50.0(@typescript-eslint/parser@8.50.0(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/parser': 8.50.0(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/typescript-estree': 8.50.0(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.50.0(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/eslint-plugin': 8.50.1(@typescript-eslint/parser@8.50.1(eslint@9.39.2)(typescript@5.9.3))(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/parser': 8.50.1(eslint@9.39.2)(typescript@5.9.3)
|
||||
'@typescript-eslint/typescript-estree': 8.50.1(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.50.1(eslint@9.39.2)(typescript@5.9.3)
|
||||
eslint: 9.39.2
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
|
||||
@@ -269,6 +269,52 @@ const InstallDialog = memo(
|
||||
}
|
||||
);
|
||||
|
||||
const InstallPreviousDialog = memo(
|
||||
({
|
||||
openInstallPreviousDialog,
|
||||
version,
|
||||
partition,
|
||||
LL,
|
||||
onClose,
|
||||
onInstall
|
||||
}: {
|
||||
openInstallPreviousDialog: boolean;
|
||||
version: string;
|
||||
partition: string;
|
||||
LL: TranslationFunctions;
|
||||
onClose: () => void;
|
||||
onInstall: (partition: string) => void;
|
||||
}) => {
|
||||
return (
|
||||
<Dialog sx={dialogStyle} open={openInstallPreviousDialog} onClose={onClose}>
|
||||
<DialogTitle>Rollback Firmware</DialogTitle>
|
||||
<DialogContent dividers>
|
||||
<Typography mb={2}>{LL.INSTALL_VERSION(LL.INSTALL(), version)}</Typography>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button
|
||||
startIcon={<CancelIcon />}
|
||||
variant="outlined"
|
||||
onClick={onClose}
|
||||
color="secondary"
|
||||
>
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
startIcon={<WarningIcon color="warning" />}
|
||||
variant="outlined"
|
||||
onClick={() => onInstall(partition)}
|
||||
color="primary"
|
||||
>
|
||||
{LL.INSTALL()}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// Helper function moved outside component
|
||||
const getPlatform = (data: VersionData): string => {
|
||||
return `${data.esp_platform}-${data.flash_chip_size >= 16384 ? '16MB' : '4MB'}${data.psram ? '+' : ''}`;
|
||||
@@ -281,6 +327,12 @@ const Version = () => {
|
||||
// State management
|
||||
const [restarting, setRestarting] = useState<boolean>(false);
|
||||
const [openInstallDialog, setOpenInstallDialog] = useState<boolean>(false);
|
||||
|
||||
const [previousVersion, setPreviousVersion] = useState<string>('');
|
||||
const [previousPartition, setPreviousPartition] = useState<string>('');
|
||||
const [openInstallPreviousDialog, setOpenInstallPreviousDialog] =
|
||||
useState<boolean>(false);
|
||||
|
||||
const [usingDevVersion, setUsingDevVersion] = useState<boolean>(false);
|
||||
const [fetchDevVersion, setFetchDevVersion] = useState<boolean>(false);
|
||||
const [devUpgradeAvailable, setDevUpgradeAvailable] = useState<boolean>(false);
|
||||
@@ -299,6 +351,11 @@ const Version = () => {
|
||||
setStableUpgradeAvailable(data.stable_upgradeable);
|
||||
});
|
||||
|
||||
const { send: sendSetPartition } = useRequest(
|
||||
(partition: string) => callAction({ action: 'setPartition', param: partition }),
|
||||
{ immediate: false }
|
||||
);
|
||||
|
||||
const {
|
||||
data,
|
||||
send: loadData,
|
||||
@@ -331,12 +388,12 @@ const Version = () => {
|
||||
);
|
||||
|
||||
const doRestart = useCallback(async () => {
|
||||
setRestarting(true);
|
||||
await sendAPI({ device: 'system', cmd: 'restart', id: 0 }).catch(
|
||||
(error: Error) => {
|
||||
toast.error(error.message);
|
||||
}
|
||||
);
|
||||
setRestarting(true);
|
||||
}, [sendAPI]);
|
||||
|
||||
const installFirmwareURL = useCallback(
|
||||
@@ -344,11 +401,27 @@ const Version = () => {
|
||||
await sendUploadURL(url).catch((error: Error) => {
|
||||
toast.error(error.message);
|
||||
});
|
||||
setRestarting(true);
|
||||
doRestart();
|
||||
},
|
||||
[sendUploadURL]
|
||||
);
|
||||
|
||||
const installPreviousFirmware = useCallback(
|
||||
async (partition: string) => {
|
||||
await sendSetPartition(partition).catch((error: Error) => {
|
||||
toast.error(error.message);
|
||||
});
|
||||
setRestarting(true);
|
||||
},
|
||||
[sendSetPartition]
|
||||
);
|
||||
|
||||
const showPreviousDialog = useCallback((version: string, partition: string) => {
|
||||
setOpenInstallPreviousDialog(true);
|
||||
setPreviousVersion(version);
|
||||
setPreviousPartition(partition);
|
||||
}, []);
|
||||
|
||||
const showFirmwareDialog = useCallback((useDevVersion: boolean) => {
|
||||
setFetchDevVersion(useDevVersion);
|
||||
setOpenInstallDialog(true);
|
||||
@@ -358,6 +431,10 @@ const Version = () => {
|
||||
setOpenInstallDialog(false);
|
||||
}, []);
|
||||
|
||||
const closeInstallPreviousDialog = useCallback(() => {
|
||||
setOpenInstallPreviousDialog(false);
|
||||
}, []);
|
||||
|
||||
const handleVersionInfoClose = useCallback(() => {
|
||||
setShowVersionInfo(0);
|
||||
}, []);
|
||||
@@ -531,6 +608,28 @@ const Version = () => {
|
||||
alignItems: 'baseline'
|
||||
}}
|
||||
>
|
||||
<Grid size={{ xs: 4, md: 2 }}>
|
||||
<Typography color="secondary">{LL.PREVIOUS_VERSIONS()}</Typography>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 8, md: 10 }}>
|
||||
{data.partitions.map((partition) => (
|
||||
<Typography key={partition.partition} mb={1}>
|
||||
v{partition.version} ({partition.partition}: {partition.size}
|
||||
{' KB'})
|
||||
<Button
|
||||
sx={{ ml: 2 }}
|
||||
variant="outlined"
|
||||
size="small"
|
||||
onClick={() =>
|
||||
showPreviousDialog(partition.version, partition.partition)
|
||||
}
|
||||
>
|
||||
{LL.INSTALL()}
|
||||
</Button>
|
||||
</Typography>
|
||||
))}
|
||||
</Grid>
|
||||
|
||||
<Grid size={{ xs: 4, md: 2 }}>
|
||||
<Typography color="secondary">{LL.STABLE()}</Typography>
|
||||
</Grid>
|
||||
@@ -591,6 +690,14 @@ const Version = () => {
|
||||
onClose={closeInstallDialog}
|
||||
onInstall={installFirmwareURL}
|
||||
/>
|
||||
<InstallPreviousDialog
|
||||
openInstallPreviousDialog={openInstallPreviousDialog}
|
||||
version={previousVersion}
|
||||
partition={previousPartition}
|
||||
LL={LL}
|
||||
onClose={closeInstallPreviousDialog}
|
||||
onInstall={installPreviousFirmware}
|
||||
/>
|
||||
<Typography sx={{ pt: 2, pb: 2 }} variant="h6" color="primary">
|
||||
{LL.UPLOAD()}
|
||||
</Typography>
|
||||
|
||||
@@ -355,7 +355,8 @@ const cz: Translation = {
|
||||
SWITCH_RELEASE_TYPE: 'Přepnout na {0} verzi',
|
||||
FIRMWARE_VERSION_INFO: 'Informace o verzi firmwaru',
|
||||
NO_DATA: 'Žádná data',
|
||||
USER_PROFILE: 'Uživatelský profil'
|
||||
USER_PROFILE: 'Uživatelský profil',
|
||||
PREVIOUS_VERSIONS: 'Předchozí verze'
|
||||
};
|
||||
|
||||
export default cz;
|
||||
|
||||
@@ -355,7 +355,8 @@ const de: Translation = {
|
||||
SWITCH_RELEASE_TYPE: 'Zum {0}-Release wechseln',
|
||||
FIRMWARE_VERSION_INFO: 'Firmware-Versionsinformation',
|
||||
NO_DATA: 'Keine Daten',
|
||||
USER_PROFILE: 'Benutzerprofil'
|
||||
USER_PROFILE: 'Benutzerprofil',
|
||||
PREVIOUS_VERSIONS: 'Vorherige Versionen'
|
||||
};
|
||||
|
||||
export default de;
|
||||
|
||||
@@ -355,7 +355,8 @@ const en: Translation = {
|
||||
SWITCH_RELEASE_TYPE: 'Switch to {0} release',
|
||||
FIRMWARE_VERSION_INFO: 'Firmware Version Information',
|
||||
NO_DATA: 'No data',
|
||||
USER_PROFILE: 'User Profile'
|
||||
USER_PROFILE: 'User Profile',
|
||||
PREVIOUS_VERSIONS: 'Previous Versions'
|
||||
};
|
||||
|
||||
export default en;
|
||||
|
||||
@@ -355,7 +355,8 @@ const fr: Translation = {
|
||||
SWITCH_RELEASE_TYPE: 'Passer à la version {0}',
|
||||
FIRMWARE_VERSION_INFO: 'Informations sur la version du firmware',
|
||||
NO_DATA: 'Aucune donnée',
|
||||
USER_PROFILE: 'Profil utilisateur'
|
||||
USER_PROFILE: 'Profil utilisateur',
|
||||
PREVIOUS_VERSIONS: 'Versions précédentes'
|
||||
};
|
||||
|
||||
export default fr;
|
||||
|
||||
@@ -355,7 +355,8 @@ const it: Translation = {
|
||||
SWITCH_RELEASE_TYPE: 'Cambia in {0} rilascio',
|
||||
FIRMWARE_VERSION_INFO: 'Informazioni sulla versione del firmware',
|
||||
NO_DATA: 'Nessun dato',
|
||||
USER_PROFILE: 'Profilo utente'
|
||||
USER_PROFILE: 'Profilo utente',
|
||||
PREVIOUS_VERSIONS: 'Versioni precedenti'
|
||||
};
|
||||
|
||||
export default it;
|
||||
|
||||
@@ -355,7 +355,8 @@ const nl: Translation = {
|
||||
SWITCH_RELEASE_TYPE: 'Switch naar {0} release',
|
||||
FIRMWARE_VERSION_INFO: 'Informatie over firmwareversie',
|
||||
NO_DATA: 'Geen data',
|
||||
USER_PROFILE: 'Gebruikersprofiel'
|
||||
USER_PROFILE: 'Gebruikersprofiel',
|
||||
PREVIOUS_VERSIONS: 'Vorige versies'
|
||||
};
|
||||
|
||||
export default nl;
|
||||
@@ -355,7 +355,8 @@ const no: Translation = {
|
||||
SWITCH_RELEASE_TYPE: 'Bytt til {0} utgivelse',
|
||||
FIRMWARE_VERSION_INFO: 'Informasjon om firmwareversjon',
|
||||
NO_DATA: 'Ingen data',
|
||||
USER_PROFILE: 'Brukerprofil'
|
||||
USER_PROFILE: 'Brukerprofil',
|
||||
PREVIOUS_VERSIONS: 'Tidligere versjoner'
|
||||
};
|
||||
|
||||
export default no;
|
||||
|
||||
@@ -355,7 +355,8 @@ const pl: BaseTranslation = {
|
||||
SWITCH_RELEASE_TYPE: 'Zmień na {0} wydanie',
|
||||
FIRMWARE_VERSION_INFO: 'Informacje o wersji firmware',
|
||||
NO_DATA: 'Brak danych',
|
||||
USER_PROFILE: 'Profil użytkownika'
|
||||
USER_PROFILE: 'Profil użytkownika',
|
||||
PREVIOUS_VERSIONS: 'Poprzednie wersje'
|
||||
};
|
||||
|
||||
export default pl;
|
||||
|
||||
@@ -355,7 +355,8 @@ const sk: Translation = {
|
||||
SWITCH_RELEASE_TYPE: 'Prepnúť na {0} verziu',
|
||||
FIRMWARE_VERSION_INFO: 'Informácie o verzii firmware',
|
||||
NO_DATA: 'Žiadne dáta',
|
||||
USER_PROFILE: 'Profil používateľa'
|
||||
USER_PROFILE: 'Profil používateľa',
|
||||
PREVIOUS_VERSIONS: 'Predchádzajúce verzie'
|
||||
};
|
||||
|
||||
export default sk;
|
||||
|
||||
@@ -355,7 +355,8 @@ const sv: Translation = {
|
||||
SWITCH_RELEASE_TYPE: 'Byt till {0} utgåva',
|
||||
FIRMWARE_VERSION_INFO: 'Information om firmwareversion',
|
||||
NO_DATA: 'Ingen data',
|
||||
USER_PROFILE: 'Användarprofil'
|
||||
USER_PROFILE: 'Användarprofil',
|
||||
PREVIOUS_VERSIONS: 'Tidigare versioner'
|
||||
};
|
||||
|
||||
export default sv;
|
||||
|
||||
@@ -355,7 +355,8 @@ const tr: Translation = {
|
||||
SWITCH_RELEASE_TYPE: '{0} sürümüne geç',
|
||||
FIRMWARE_VERSION_INFO: 'Firmware Sürüm Bilgisi',
|
||||
NO_DATA: 'Hiçbir veri yok',
|
||||
USER_PROFILE: 'Kullanıcı Profili'
|
||||
USER_PROFILE: 'Kullanıcı Profili',
|
||||
PREVIOUS_VERSIONS: 'Önceki Sürümler'
|
||||
};
|
||||
|
||||
export default tr;
|
||||
|
||||
@@ -52,7 +52,13 @@ export interface SystemStatus {
|
||||
model: string;
|
||||
has_loader: boolean;
|
||||
has_partition: boolean;
|
||||
partitions: {
|
||||
partition: string;
|
||||
version: string;
|
||||
size: number;
|
||||
}[];
|
||||
status: number; // System Status Codes which matches SYSTEM_STATUS in System.h
|
||||
developer_mode: boolean;
|
||||
temperature?: number;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user