forked from FOSS/BangleApps
Move Welcome config into App/widget settings
parent
28c8437cce
commit
7b669cd028
|
@ -78,13 +78,14 @@
|
|||
{ "id": "welcome",
|
||||
"name": "Welcome",
|
||||
"icon": "app.png",
|
||||
"version":"0.04",
|
||||
"version":"0.05",
|
||||
"description": "Appears at first boot and explains how to use Bangle.js",
|
||||
"tags": "start,welcome",
|
||||
"allow_emulator":true,
|
||||
"storage": [
|
||||
{"name":"welcome.js","url":"welcome.js"},
|
||||
{"name":"welcome.app.js","url":"app.js"},
|
||||
{"name":"welcome.settings.js","url":"settings.js"},
|
||||
{"name":"welcome.img","url":"app-icon.js","evaluate":true}
|
||||
]
|
||||
},
|
||||
|
@ -117,7 +118,7 @@
|
|||
{ "id": "setting",
|
||||
"name": "Settings",
|
||||
"icon": "settings.png",
|
||||
"version":"0.08",
|
||||
"version":"0.09",
|
||||
"description": "A menu for setting up Bangle.js",
|
||||
"tags": "tool,system",
|
||||
"storage": [
|
||||
|
|
|
@ -5,3 +5,4 @@
|
|||
0.06: Remove distance setting as there's a separate app for Locale now
|
||||
0.07: Added vibrate as beep workaround
|
||||
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,
|
||||
'Select Clock': showClockMenu,
|
||||
'HID': {
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
0.02: Animate balloon intro
|
||||
0.03: BTN3 now won't restart when at the end
|
||||
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