widbatpc: Save settings in data file
parent
745e4d38a9
commit
43b0d8897e
|
|
@ -342,14 +342,16 @@
|
|||
"name": "Battery Level Widget (with percentage)",
|
||||
"shortName": "Battery Widget",
|
||||
"icon": "widget.png",
|
||||
"version":"0.09",
|
||||
"version":"0.10",
|
||||
"description": "Show the current battery level and charging status in the top right of the clock, with charge percentage",
|
||||
"tags": "widget,battery",
|
||||
"type":"widget",
|
||||
"storage": [
|
||||
{"name":"widbatpc.wid.js","url":"widget.js"},
|
||||
{"name":"widbatpc.settings.js","url":"settings.js"},
|
||||
{"name":"widbatpc.settings.json","content": "{}"}
|
||||
{"name":"widbatpc.settings.js","url":"settings.js"}
|
||||
],
|
||||
"data": [
|
||||
{"name":"widbatpc.json"}
|
||||
]
|
||||
},
|
||||
{ "id": "widbt",
|
||||
|
|
|
|||
|
|
@ -6,3 +6,4 @@
|
|||
0.07: Add settings: percentage/color/charger icon
|
||||
0.08: Draw percentage as inverted on monochrome battery
|
||||
0.09: Fix regression stopping correct widget updates
|
||||
0.10: Don't overwrite existing settings on app update
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @param {function} back Use back() to return to settings menu
|
||||
*/
|
||||
(function(back) {
|
||||
const SETTINGS_FILE = 'widbatpc.settings.json'
|
||||
const SETTINGS_FILE = 'widbatpc.json'
|
||||
const COLORS = ['By Level', 'Green', 'Monochrome']
|
||||
|
||||
// initialize with default settings...
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const COLORS = {
|
|||
'ok': 0xFD20, // "Orange"
|
||||
'low':0xF800, // "Red"
|
||||
}
|
||||
const SETTINGS_FILE = 'widbatpc.settings.json'
|
||||
const SETTINGS_FILE = 'widbatpc.json'
|
||||
|
||||
let settings
|
||||
function loadSettings() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue