commit
ddac45f580
10
apps.json
10
apps.json
|
|
@ -77,7 +77,7 @@
|
|||
{
|
||||
"id": "messages",
|
||||
"name": "Messages",
|
||||
"version": "0.16",
|
||||
"version": "0.17",
|
||||
"description": "App to display notifications from iOS and Gadgetbridge",
|
||||
"icon": "app.png",
|
||||
"type": "app",
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
{
|
||||
"id": "ios",
|
||||
"name": "iOS Integration",
|
||||
"version": "0.07",
|
||||
"version": "0.08",
|
||||
"description": "Display notifications/music/etc from iOS devices",
|
||||
"icon": "app.png",
|
||||
"tags": "tool,system,ios,apple,messages,notifications",
|
||||
|
|
@ -936,7 +936,7 @@
|
|||
"id": "widbatpc",
|
||||
"name": "Battery Level Widget (with percentage)",
|
||||
"shortName": "Battery Widget",
|
||||
"version": "0.14",
|
||||
"version": "0.15",
|
||||
"description": "Show the current battery level and charging status in the top right of the clock, with charge percentage",
|
||||
"icon": "widget.png",
|
||||
"type": "widget",
|
||||
|
|
@ -5099,7 +5099,7 @@
|
|||
"tags": "clock",
|
||||
"allow_emulator":true,
|
||||
"supports" : ["BANGLEJS2"],
|
||||
"type": "clock",
|
||||
"type": "clock",
|
||||
"storage": [
|
||||
{"name":"contourclock.app.js","url":"app.js"},
|
||||
{"name":"contourclock.img","url":"app-icon.js","evaluate":true}
|
||||
|
|
@ -5334,7 +5334,7 @@
|
|||
"icon": "andark_icon.png",
|
||||
"type": "clock",
|
||||
"tags": "clock",
|
||||
"supports" : ["BANGLEJS2"],
|
||||
"supports" : ["BANGLEJS2"],
|
||||
"readme": "README.md",
|
||||
"storage": [
|
||||
{"name":"andark.app.js","url":"app.js"},
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
0.02: Remove messages on disconnect
|
||||
0.03: Handling of message actions (ok/clear)
|
||||
0.04: Added common bundleId's
|
||||
0.05: Added more bundleId's (app-id's which can be used to
|
||||
determine a friendly app name in the notifications)
|
||||
0.05: Added more bundleId's (app-id's which can be used to determine a friendly app name in the notifications)
|
||||
0.06: Fix (not) popupping up old messages
|
||||
0.07: Added more details from music (instead of Undefined)
|
||||
Added more app identifiers
|
||||
|
||||
0.07: Added more details from music (instead of Undefined), added more app identifiers
|
||||
0.08: Added more app identifiers, added 'cannot display' in case a message goes empty because of replacements
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ E.on('notify',msg=>{
|
|||
"com.apple.mobilecal": "Calendar",
|
||||
"com.apple.mobilemail": "Mail",
|
||||
"com.apple.mobilephone": "Phone",
|
||||
"com.apple.mobileslideshow": "Pictures",
|
||||
"com.apple.MobileSMS": "SMS Message",
|
||||
"com.apple.Passbook": "iOS Wallet",
|
||||
"com.apple.podcasts": "Podcasts",
|
||||
|
|
@ -83,6 +84,7 @@ E.on('notify',msg=>{
|
|||
"com.ifttt.ifttt" : "IFTTT",
|
||||
"com.jumbo.app" : "Jumbo",
|
||||
"com.linkedin.LinkedIn" : "LinkedIn",
|
||||
"com.marktplaats.iphone": "Marktplaats",
|
||||
"com.microsoft.Office.Outlook" : "Outlook Mail",
|
||||
"com.nestlabs.jasper.release" : "Nest",
|
||||
"com.netflix.Netflix" : "Netflix",
|
||||
|
|
@ -90,6 +92,7 @@ E.on('notify',msg=>{
|
|||
"com.skype.skype": "Skype",
|
||||
"com.skype.SkypeForiPad": "Skype",
|
||||
"com.spotify.client": "Spotify",
|
||||
"com.storytel.iphone": "Storytel",
|
||||
"com.strava.stravaride": "Strava",
|
||||
"com.tinyspeck.chatlyio": "Slack",
|
||||
"com.toyopagroup.picaboo": "Snapchat",
|
||||
|
|
@ -98,6 +101,8 @@ E.on('notify',msg=>{
|
|||
"com.vilcsak.bitcoin2": "Coinbase",
|
||||
"com.wordfeud.free": "WordFeud",
|
||||
"com.zhiliaoapp.musically": "TikTok",
|
||||
"io.robbie.HomeAssistant": "Home Assistant",
|
||||
"net.weks.prowl": "Prowl",
|
||||
"net.whatsapp.WhatsApp": "WhatsApp",
|
||||
"nl.ah.Appie": "Albert Heijn",
|
||||
"nl.postnl.TrackNTrace": "PostNL",
|
||||
|
|
@ -118,7 +123,7 @@ E.on('notify',msg=>{
|
|||
new : msg.new,
|
||||
title : msg.title&&E.decodeUTF8(msg.title, unicodeRemap, replacer),
|
||||
subject : msg.subtitle&&E.decodeUTF8(msg.subtitle, unicodeRemap, replacer),
|
||||
body : msg.message&&E.decodeUTF8(msg.message, unicodeRemap, replacer)
|
||||
body : msg.message&&E.decodeUTF8(msg.message, unicodeRemap, replacer) || "Cannot display"
|
||||
});
|
||||
// TODO: posaction/negaction?
|
||||
});
|
||||
|
|
|
|||
|
|
@ -23,3 +23,4 @@
|
|||
0.14: Hide widget when all unread notifications are dismissed from phone
|
||||
0.15: Don't buzz when Quiet Mode is active
|
||||
0.16: Fix text wrapping so it fits the screen even if title is big (fix #1147)
|
||||
0.17: Fix: Get dynamic dimensions of notify icon, fixed notification font
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
WIDGETS["messages"]={area:"tl",width:0,draw:function() {
|
||||
WIDGETS["messages"]={area:"tl", width:0, iconwidth:23,
|
||||
draw:function() {
|
||||
Bangle.removeListener('touch', this.touch);
|
||||
if (!this.width) return;
|
||||
var c = (Date.now()-this.t)/1000;
|
||||
g.reset().clearRect(this.x,this.y,this.x+this.width,this.y+23);
|
||||
g.reset().clearRect(this.x, this.y, this.x+this.width, this.y+this.iconwidth);
|
||||
g.drawImage((c&1) ? atob("GBiBAAAAAAAAAAAAAAAAAAAAAB//+DAADDAADDAADDwAPD8A/DOBzDDn/DA//DAHvDAPvjAPvjAPvjAPvh///gf/vAAD+AAB8AAAAA==") : atob("GBiBAAAAAAAAAAAAAAAAAAAAAB//+D///D///A//8CP/xDj/HD48DD+B8D/D+D/3vD/vvj/vvj/vvj/vvh/v/gfnvAAD+AAB8AAAAA=="), this.x, this.y);
|
||||
//if (c<60) Bangle.setLCDPower(1); // keep LCD on for 1 minute
|
||||
let settings = require('Storage').readJSON("messages.settings.json", true) || {};
|
||||
|
|
@ -17,7 +18,7 @@ WIDGETS["messages"]={area:"tl",width:0,draw:function() {
|
|||
WIDGETS["messages"].t=Date.now(); // first time
|
||||
WIDGETS["messages"].l=Date.now()-10000; // last buzz
|
||||
if (quiet) WIDGETS["messages"].t -= 500000; // if quiet, set last time in the past so there is no buzzing
|
||||
WIDGETS["messages"].width=64;
|
||||
WIDGETS["messages"].width=this.iconwidth;
|
||||
Bangle.drawWidgets();
|
||||
Bangle.setLCDPower(1);// turns screen on
|
||||
},hide:function() {
|
||||
|
|
@ -37,7 +38,7 @@ WIDGETS["messages"]={area:"tl",width:0,draw:function() {
|
|||
b();
|
||||
},touch:function(b,c) {
|
||||
var w=WIDGETS["messages"];
|
||||
if (!w||!w.width||c.x<w.x||c.x>w.x+w.width||c.y<w.y||c.y>w.y+23) return;
|
||||
if (!w||!w.width||c.x<w.x||c.x>w.x+w.width||c.y<w.y||c.y>w.y+w.iconwidth) return;
|
||||
load("messages.app.js");
|
||||
}};
|
||||
/* We might have returned here if we were in the Messages app for a
|
||||
|
|
@ -46,4 +47,4 @@ want to buzz but should still show that there are unread messages. */
|
|||
if (global.MESSAGES===undefined) (function() {
|
||||
var messages = require("Storage").readJSON("messages.json",1)||[];
|
||||
if (messages.some(m=>m.new)) WIDGETS["messages"].show(true);
|
||||
})();
|
||||
})();
|
||||
|
|
@ -11,3 +11,4 @@
|
|||
0.12: Fixed for Bangle 2
|
||||
0.13: Fillbar setting added, see README
|
||||
0.14: Fix drawing the bar when charging
|
||||
0.15: Added option to always display the icon when charging (useful if 'hide if charge greater than' is enabled)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
'fillbar': false,
|
||||
'charger': true,
|
||||
'hideifmorethan': 100,
|
||||
'alwaysoncharge': false,
|
||||
}
|
||||
// ...and overwrite them with any saved values
|
||||
// This way saved values are preserved if a new version adds more settings
|
||||
|
|
@ -68,6 +69,11 @@
|
|||
format: x => x+"%",
|
||||
onchange: save('hideifmorethan'),
|
||||
},
|
||||
'Show on charge': { // Not sure if this is readable enough in the 'big' menu
|
||||
value: s.alwaysoncharge,
|
||||
format: onOffFormat,
|
||||
onchange: save('alwaysoncharge'),
|
||||
},
|
||||
}
|
||||
E.showMenu(menu)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
'percentage': true,
|
||||
'charger': true,
|
||||
'hideifmorethan': 100,
|
||||
'alwaysoncharge': false,
|
||||
};
|
||||
Object.keys(DEFAULTS).forEach(k=>{
|
||||
if (settings[k]===undefined) settings[k]=DEFAULTS[k]
|
||||
|
|
@ -67,8 +68,11 @@
|
|||
var w = 40;
|
||||
if (Bangle.isCharging() && setting('charger'))
|
||||
w += 16;
|
||||
if (E.getBattery() > setting('hideifmorethan'))
|
||||
if (E.getBattery() > setting('hideifmorethan')) {
|
||||
w = 0;
|
||||
if( Bangle.isCharging() && setting('alwaysoncharge') === true)
|
||||
w = 56;
|
||||
}
|
||||
var changed = WIDGETS["batpc"].width != w;
|
||||
WIDGETS["batpc"].width = w;
|
||||
return changed;
|
||||
|
|
|
|||
2
core
2
core
|
|
@ -1 +1 @@
|
|||
Subproject commit 5a5957714d4aa04413329f57c03e6de0cfb74caf
|
||||
Subproject commit 2a8e872ecb143a10e53273b4d3473164e104e1d3
|
||||
Loading…
Reference in New Issue