espruino / BangleApps

Bangle.js App Loader (and Apps)
https://banglejs.com/apps
MIT License
496 stars 1.17k forks source link

[ContourClock] custom.html could remember previous font choices when updating? #3648

Open fanoush opened 2 weeks ago

fanoush commented 2 weeks ago

Affected hardware version

Bangle 2

Your firmware version

2v24

The bug

Due to the font selection via custom.html this app cannot be autoupdated from the apploader. Also every time I update it manually I forget which fonts I have selected previously so I must go over the fonts and guess/pick them again. And it is hard to pick the one that I like because they look similar on the web and then slightly different on the watch so I select some and then finetune and select the final one directly on the watch. And next time when there is update I am lost which is the right one :-)

Is it possible that the custom.html would read settings from the installed app and preselected my previous fonts and possibly even allowed autoupdate when I do not want any change? I am not sure it can be done, maybe @gfwilliams knows?

Installed apps

No response

gfwilliams commented 2 weeks ago

Is it possible that the custom.html would read settings from the installed app and preselected my previous fonts

Yes, it's fine. You can do this in custom.html:

     function onInit() {
          Util.readStorageJSON('stuff.json', currentSettings => {

Just set customConnect:true to force Bangle.js to be connected before upload: https://github.com/espruino/BangleApps/blob/c217a4f858e22d856521a84f7cf18ca728a5ac5e/README.md?plain=1#L302-L305

... but there's nothing to allow auto-update of customised apps yet. That would probably be a bit of a pain to implement

fanoush commented 2 weeks ago

Thanks, @xxDUxx do you want to look into this or may I try? I have very little experience with changing bangle apps so far but I can try. same with https://github.com/espruino/BangleApps/issues/3649

xxDUxx commented 2 weeks ago

Sure, go ahead!