Commit Graph

8 Commits (c135c70f7eb08dd127e909fe943f2a8cd7c47c49)

Author SHA1 Message Date
Richard de Boer 361d7b838f Merge branch 'master' into app_settings 2020-04-03 19:31:56 +02:00
Gordon Williams 9b918055da Fix progress bar - now goes smoothly up over the course of the app upload.
Also tidy it up significantly and reduce duplication
2020-04-03 14:27:45 +01: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 f14772f3a9 `Remove All Apps` now doesn't perform a reset before erase - fixes inability to update firmware if settings are wrong 2020-04-02 08:44:40 +01:00
Gordon Williams f72bb986c9 Ensure upgrade of a custom app re-runs the customiser (fix #160) 2020-03-31 15:13:25 +01:00
Gordon Williams dd0e3c89d1 Added showModal/hideModal utility functions
Added readStorageFile/eraseStorageFile to handle efficiently downloading large files (fix #119)
2020-03-31 14:39:59 +01: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