mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-17 13:25:24 +03:00
Fix MSP_BOARD_INFO && Storage Quota
Cleanup LocalStorage
This commit is contained in:
parent
10645cb791
commit
b51a7b288a
9 changed files with 126 additions and 46 deletions
|
@ -28,9 +28,31 @@ function readConfiguratorVersionMetadata() {
|
|||
CONFIGURATOR.gitRevision = manifest.gitRevision;
|
||||
}
|
||||
|
||||
function cleanupLocalStorage() {
|
||||
|
||||
const cleanupLocalStorageList = [
|
||||
'cache',
|
||||
'firmware',
|
||||
'https',
|
||||
'selected_board',
|
||||
'unifiedConfigLast',
|
||||
'unifiedSourceCache',
|
||||
];
|
||||
|
||||
for (const key in localStorage) {
|
||||
for (const item of cleanupLocalStorageList) {
|
||||
if (key.includes(item)) {
|
||||
localStorage.removeItem(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function appReady() {
|
||||
readConfiguratorVersionMetadata();
|
||||
|
||||
cleanupLocalStorage();
|
||||
|
||||
i18n.init(function() {
|
||||
startProcess();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue