Messages: changed screenshots, reverted translation text

iOS: added song duration
master
Jeroen Peters 2021-12-14 10:07:22 +01:00
parent 13715ea43d
commit c347c6d6ee
9 changed files with 8 additions and 13 deletions

View File

@ -92,7 +92,7 @@
{"name":"messages","url":"lib.js"}
],
"data": [{"name":"messages.json"},{"name":"messages.settings.json"}],
"screenshots": [{"url":"screenshot.jpg"},{"url":"screen-notification.gif"}],
"screenshots": [{"url":"screenshot.png"},{"url":"screenshot-notify.gif"}],
"sortorder": -9
},
{

View File

@ -136,7 +136,7 @@ E.on('AMS',a=>{
if (a.id=="artist") msg.artist = m;
else if (a.id=="album") msg.album = m;
else if (a.id=="title") msg.track = m;
else if (a.id=="duration") msg.duration = format_song_time(m);
else if (a.id=="duration") msg.dur = format_song_time(m);
else return;
require("messages").pushMessage(msg);
}

View File

@ -20,11 +20,11 @@ to the clock where a ringing bell will be shown in the Widget bar.
## Images
_1. Screenshot of a notification_
![](screenshot.jpg)
![](screenshot.png)
_2. What the notify icon looks like (it's touchable on Bangle.js2!)_
![](screen-notification.gif)
![](screenshot-notify.gif)

View File

@ -21,7 +21,6 @@
*/
var Layout = require("Layout");
var locale = require("locale");
var fontSmall = "6x8";
var fontMedium = g.getFonts().includes("6x15")?"6x15":"6x8:2";
var fontBig = g.getFonts().includes("12x20")?"12x20":"6x8:2";
@ -178,17 +177,14 @@ function showMusicMessage(msg) {
}
function showMessageSettings(msg) {
var delete_txt = locale.translate("Delete");
var unread_txt = locale.translate("Mark Unread");
var back_txt = locale.translate("< Back");
E.showMenu({"":{"title":"Message"},
back_txt : () => showMessage(msg.id),
delete_txt : () => {
"< Back" : () => showMessage(msg.id),
"Delete" : () => {
MESSAGES = MESSAGES.filter(m=>m.id!=msg.id);
saveMessages();
checkMessages({clockIfNoMsg:0,clockIfAllRead:0,showMsgIfUnread:0});
},
unread_txt : () => {
"Mark Unread" : () => {
msg.new = true;
saveMessages();
checkMessages({clockIfNoMsg:0,clockIfAllRead:0,showMsgIfUnread:0});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -9,8 +9,7 @@ WIDGETS["messages"]={area:"tl",width:0,draw:function() {
*/
var c = parseInt(Date.now()/1000);
g.reset().clearRect(this.x,this.y,this.x+this.width,this.y+23);
//g.drawImage((c&1) ? atob("FBSBAAGAABwAA/gAf8AP/AD/wA/8AP/gD/8Af/AP/4D//A//4f//H//x//w//gP8gAA4AAOA") : atob("FBSBAAAYAAOAAfwAP+AD/wA/8AP/AH/wD/8A/+Af/wP/8H//D//4//+D//gH/8AT/AHAABwA"), this.x, this.y);
g.drawImage((c&1) ? atob("HBgBAAAAAAAAAAAAAAAAAAAABgAAAPAAAB+AAAH4AAAfgAAD/AAAP8AAA/wAAH/gAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") : atob("HBiBAcAAADgAAAGAAAAQAGAAAAYAAADwAAAfgAAD/AAAP8AAA/wAAD/AAAf+AAB/4AAAAAAAAAAAAGAAgAAAGAAAAYAAAB8AAA/4P///j///+f///7///w=="), this.x, this.y);
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