1
0
Fork 0
Commit Graph

7 Commits (8a315d1f65e50db8ed5b324f1cbf0ae966824082)

Author SHA1 Message Date
Richard de Boer c7f2a18caa Remove "settings" from appid.info 2020-04-17 21:08:07 +02:00
Richard de Boer 9f0adf1900 Data files: remove settings magic, some more sanitychecks 2020-04-16 20:42:23 +02:00
Richard de Boer 9e0fd91339 Data files: save all data files as a single string
Separate regular and storage files by a semicolon
2020-04-16 14:30:37 +02:00
Richard de Boer 217d198154 Add a "data" section to apps.json, with data files to clean on uninstall
These are added to `appid.info` as "dataFiles" or "storageFiles", and
can contain wildcards.
2020-04-16 14:30:37 +02:00
Richard de Boer 39621bfae0 Settings: Add support for app/widget settings
Apps and widgets can add a `<appid>.settings.js` file which can be
opened from the "App/widget settings" submenu.
This file should define a single function to configure the app/widget.
The function is passed a `back` argument, which can be used to return to
the settings menu by calling `back()`.

Example `<appid>.settings.js`:
```
function settings(back) {
  const mySettingsMenu = {
    '': { 'title': 'My Widget' },
    '< Back': back, // go back to settings menu
    'Sound': {
      value: false,
      format: s => s ? 'on' : 'off',
      onchange: s => {if(s) Bangle.beep()} // TODO: save new value
    },
  };
  E.showMenu(mySettingsMenu)
}
```
2020-04-03 01:46:43 +02:00
Gordon Williams 04f8cbcd13 write code in chunks, in case it is too big to fit in RAM (fix #157) 2020-03-31 13:37:03 +01:00
Gordon Williams b40c9031e1 refactor - move JS into its own directory 2020-03-31 13:18:31 +01:00