mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-02-02 12:27:27 +01:00
Improved: Backup and restore validation (#174)
This commit is contained in:
parent
d045e9d9cc
commit
87120aceba
@ -148,6 +148,11 @@ storageManager._validation = function (content) {
|
||||
delete content['hideReleaseNotes'];
|
||||
}
|
||||
|
||||
// Convert type of updateNotification
|
||||
if (typeof content.updateNotification === 'string') {
|
||||
content.updateNotification = parseInt(content.updateNotification);
|
||||
}
|
||||
|
||||
for (const [key, value] of Object.entries(SettingDefaults)) {
|
||||
// If type the same as default settings
|
||||
if (typeof value === typeof content[key]) {
|
||||
@ -164,7 +169,7 @@ storageManager._validation = function (content) {
|
||||
// Set default if not existing in file
|
||||
imported[key] = value;
|
||||
} else {
|
||||
alert(chrome.i18n.getMessage('dialogImportFailed'));
|
||||
alert(chrome.i18n.getMessage('dialogImportFailed') + '\n\n' + key + ': ' + content[key]);
|
||||
throw 'Invalid file!';
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@
|
||||
<ul>
|
||||
<li>Fixed: HTML filter (<a href="https://codeberg.org/nobody/LocalCDN/issues/192">#192</a>)</li>
|
||||
<li>Updated: bootstrap-table v1.18.0 -> v1.18.1 (<a href="https://codeberg.org/nobody/LocalCDN/issues/193">#193</a>)</li>
|
||||
<li>Improved: Backup and restore validation (<a href="https://codeberg.org/nobody/LocalCDN/issues/174">#174</a>)</li>
|
||||
</ul>
|
||||
<div id="generator-section">
|
||||
<div class="topic-label">
|
||||
|
Loading…
x
Reference in New Issue
Block a user