Move Welcome config into App/widget settings
parent
28c8437cce
commit
7b669cd028
|
|
@ -78,13 +78,14 @@
|
||||||
{ "id": "welcome",
|
{ "id": "welcome",
|
||||||
"name": "Welcome",
|
"name": "Welcome",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"version":"0.04",
|
"version":"0.05",
|
||||||
"description": "Appears at first boot and explains how to use Bangle.js",
|
"description": "Appears at first boot and explains how to use Bangle.js",
|
||||||
"tags": "start,welcome",
|
"tags": "start,welcome",
|
||||||
"allow_emulator":true,
|
"allow_emulator":true,
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"welcome.js","url":"welcome.js"},
|
{"name":"welcome.js","url":"welcome.js"},
|
||||||
{"name":"welcome.app.js","url":"app.js"},
|
{"name":"welcome.app.js","url":"app.js"},
|
||||||
|
{"name":"welcome.settings.js","url":"settings.js"},
|
||||||
{"name":"welcome.img","url":"app-icon.js","evaluate":true}
|
{"name":"welcome.img","url":"app-icon.js","evaluate":true}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -117,7 +118,7 @@
|
||||||
{ "id": "setting",
|
{ "id": "setting",
|
||||||
"name": "Settings",
|
"name": "Settings",
|
||||||
"icon": "settings.png",
|
"icon": "settings.png",
|
||||||
"version":"0.08",
|
"version":"0.09",
|
||||||
"description": "A menu for setting up Bangle.js",
|
"description": "A menu for setting up Bangle.js",
|
||||||
"tags": "tool,system",
|
"tags": "tool,system",
|
||||||
"storage": [
|
"storage": [
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,4 @@
|
||||||
0.06: Remove distance setting as there's a separate app for Locale now
|
0.06: Remove distance setting as there's a separate app for Locale now
|
||||||
0.07: Added vibrate as beep workaround
|
0.07: Added vibrate as beep workaround
|
||||||
0.08: Add support for app/widget settings
|
0.08: Add support for app/widget settings
|
||||||
|
0.09: Move Welcome into App/widget settings
|
||||||
|
|
|
||||||
|
|
@ -95,14 +95,6 @@ function showMainMenu() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'Welcome App': {
|
|
||||||
value: !settings.welcomed,
|
|
||||||
format: boolFormat,
|
|
||||||
onchange: v => {
|
|
||||||
settings.welcomed = v?undefined:true;
|
|
||||||
updateSettings();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'Locale': showLocaleMenu,
|
'Locale': showLocaleMenu,
|
||||||
'Select Clock': showClockMenu,
|
'Select Clock': showClockMenu,
|
||||||
'HID': {
|
'HID': {
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,4 @@
|
||||||
0.02: Animate balloon intro
|
0.02: Animate balloon intro
|
||||||
0.03: BTN3 now won't restart when at the end
|
0.03: BTN3 now won't restart when at the end
|
||||||
0.04: Fix regression after tweaks to Storage.readJSON
|
0.04: Fix regression after tweaks to Storage.readJSON
|
||||||
|
0.05: Move configuration into App/widget settings
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
// The welcome app is special, and gets to use global settings
|
||||||
|
(function(back) {
|
||||||
|
let settings = require('Storage').readJSON('setting.json', 1) || {}
|
||||||
|
E.showMenu({
|
||||||
|
'': { 'title': 'Welcome App' },
|
||||||
|
'Run again': {
|
||||||
|
value: !settings.welcomed,
|
||||||
|
format: v => v ? 'Yes' : 'No',
|
||||||
|
onchange: v => {
|
||||||
|
settings.welcomed = v ? undefined : true
|
||||||
|
require('Storage').write('setting.json', settings)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'< Back': back,
|
||||||
|
})
|
||||||
|
})
|
||||||
Loading…
Reference in New Issue