mirror of
https://github.com/mue/mue.git
synced 2026-07-07 22:23:37 +02:00
fix: zero-padded time, custom background settings ui
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
"name": "brightness",
|
||||
"value": 90
|
||||
},
|
||||
{
|
||||
"name": "zero",
|
||||
"value": true
|
||||
},
|
||||
{
|
||||
"name": "events",
|
||||
"value": true
|
||||
|
||||
Reference in New Issue
Block a user