fix: zero-padded time, custom background settings ui

This commit is contained in:
David Ralph
2022-01-07 15:12:06 +00:00
parent df26dff9cc
commit c6ce382188
2 changed files with 11 additions and 4 deletions

View File

@@ -182,12 +182,15 @@ export default class Background extends PureComponent {
break;
case 'custom':
let customBackground;
let customBackground = [];
const customSaved = localStorage.getItem('customBackground');
try {
customBackground = JSON.parse(localStorage.getItem('customBackground'));
customBackground = JSON.parse(customSaved);
} catch (e) {
// move to new format
customBackground = [localStorage.getItem('customBackground')];
if (customSaved !== '') {
// move to new format
customBackground = [customSaved];
}
localStorage.setItem('customBackground', JSON.stringify(customBackground));
}

View File

@@ -27,6 +27,10 @@
"name": "brightness",
"value": 90
},
{
"name": "zero",
"value": true
},
{
"name": "events",
"value": true