Add message icon for 'clock', and ensure messages with no body just use the title
parent
5c0de891f2
commit
16daa3d294
|
|
@ -86,3 +86,4 @@
|
|||
0.61: Fix regression where loading into messages app stops back from working (#2398)
|
||||
0.62: Remove '.show' field, tidyup and fix .open if fast load not enabled
|
||||
0.63: Fix messages app loading on clock without fast load
|
||||
0.64: Ensure we don't get 'undefined' as the message body
|
||||
|
|
|
|||
|
|
@ -263,6 +263,12 @@ function showMessage(msgid) {
|
|||
active = "message";
|
||||
// Normal text message display
|
||||
var title=msg.title, titleFont = fontLarge, lines;
|
||||
var body=msg.body, bodyFont = fontLarge;
|
||||
// If no body, use the title text instead...
|
||||
if (body===undefined) {
|
||||
body = title;
|
||||
title = undefined;
|
||||
}
|
||||
if (title) {
|
||||
var w = g.getWidth()-48;
|
||||
if (g.setFont(titleFont).stringWidth(title) > w) {
|
||||
|
|
@ -276,7 +282,7 @@ function showMessage(msgid) {
|
|||
}
|
||||
}
|
||||
// If body of message is only two lines long w/ large font, use large font.
|
||||
var body=msg.body, bodyFont = fontLarge;
|
||||
|
||||
if (body) {
|
||||
var w = g.getWidth()-10;
|
||||
if (g.setFont(bodyFont).stringWidth(body) > w * 2) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"id": "messagegui",
|
||||
"name": "Message UI",
|
||||
"shortName": "Messages",
|
||||
"version": "0.63",
|
||||
"version": "0.64",
|
||||
"description": "Default app to display notifications from iOS and Gadgetbridge/Android",
|
||||
"icon": "app.png",
|
||||
"type": "app",
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
0.02: Added several new icons and colors
|
||||
0.03: Fix icons broken in 0v02 (#2386)
|
||||
Store all icons in a separate binary file (much faster lookup)
|
||||
|
||||
0.04: Add message icon for 'clock'
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@
|
|||
{ "app":"bring", "icon":"bring.png" },
|
||||
{ "app":"calendar", "icon":"etar.png" },
|
||||
{ "app":"etar", "icon":"etar.png" },
|
||||
{ "app":"chat", "icon":"google chat.png" },
|
||||
{ "app":"chat", "icon":"google chat.png" },
|
||||
{ "app":"chrome", "icon":"chrome.png" },
|
||||
{ "app":"clock", "icon":"alarm.png" },
|
||||
{ "app":"corona-warn", "icon":"coronavirus.png" },
|
||||
{ "app":"bmo", "icon":"bank.png" },
|
||||
{ "app":"desjardins", "icon":"bank.png" },
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ exports.getImage = function(msg) {
|
|||
if (msg.img) return atob(msg.img);
|
||||
let s = (("string"=== typeof msg) ? msg : (msg.src || "")).toLowerCase();
|
||||
if (msg.id=="music") s="music";
|
||||
let match = ",default|0,airbnb|1,alarm|2,alarmclockreceiver|2,amazon shopping|3,bibel|4,bitwarden|5,1password|5,lastpass|5,dashlane|5,bring|6,calendar|7,etar|7,chat|8,chrome|9,corona-warn|10,bmo|11,desjardins|11,rbc mobile|11,nbc|11,rabobank|11,scotiabank|11,td (canada)|11,discord|12,drive|13,element|14,facebook|15,messenger|16,firefox|17,firefox beta|17,firefox nightly|17,f-droid|5,neo store|5,aurora droid|5,github|18,gitlab|19,gmx|20,google|21,google home|22,google play store|23,home assistant|24,instagram|25,kalender|26,keep notes|27,lieferando|28,linkedin|29,maps|30,organic maps|30,osmand|30,mastodon|31,fedilab|31,tooot|31,tusky|31,mattermost|32,n26|33,netflix|34,news|35,cbc news|35,rc info|35,reuters|35,ap news|35,la presse|35,nbc news|35,nextbike|36,nina|37,outlook mail|38,paypal|39,phone|40,plex|41,pocket|42,post & dhl|43,proton mail|44,reddit|45,sync pro|45,sync dev|45,boost|45,infinity|45,slide|45,signal|46,skype|47,slack|48,snapchat|49,starbucks|50,steam|51,teams|52,telegram|53,telegram foss|53,threema|54,tiktok|55,to do|56,opentasks|56,tasks|56,transit|57,twitch|58,twitter|59,uber|60,lyft|60,vlc|61,warnapp|62,whatsapp|63,wordfeud|64,youtube|65,newpipe|65,zoom|66,meet|66,music|67,sms message|0,mail|0,gmail|0,".match(new RegExp(`,${s}\\|(\\d+)`))
|
||||
let match = ",default|0,airbnb|1,alarm|2,alarmclockreceiver|2,amazon shopping|3,bibel|4,bitwarden|5,1password|5,lastpass|5,dashlane|5,bring|6,calendar|7,etar|7,chat|8,chrome|9,clock|2,corona-warn|10,bmo|11,desjardins|11,rbc mobile|11,nbc|11,rabobank|11,scotiabank|11,td (canada)|11,discord|12,drive|13,element|14,facebook|15,messenger|16,firefox|17,firefox beta|17,firefox nightly|17,f-droid|5,neo store|5,aurora droid|5,github|18,gitlab|19,gmx|20,google|21,google home|22,google play store|23,home assistant|24,instagram|25,kalender|26,keep notes|27,lieferando|28,linkedin|29,maps|30,organic maps|30,osmand|30,mastodon|31,fedilab|31,tooot|31,tusky|31,mattermost|32,n26|33,netflix|34,news|35,cbc news|35,rc info|35,reuters|35,ap news|35,la presse|35,nbc news|35,nextbike|36,nina|37,outlook mail|38,paypal|39,phone|40,plex|41,pocket|42,post & dhl|43,proton mail|44,reddit|45,sync pro|45,sync dev|45,boost|45,infinity|45,slide|45,signal|46,skype|47,slack|48,snapchat|49,starbucks|50,steam|51,teams|52,telegram|53,telegram foss|53,threema|54,tiktok|55,to do|56,opentasks|56,tasks|56,transit|57,twitch|58,twitter|59,uber|60,lyft|60,vlc|61,warnapp|62,whatsapp|63,wordfeud|64,youtube|65,newpipe|65,zoom|66,meet|66,music|67,sms message|0,mail|0,gmail|0,".match(new RegExp(`,${s}\\|(\\d+)`))
|
||||
return require("Storage").read("messageicons.img", (match===null)?0:match[1]*76, 76);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "messageicons",
|
||||
"name": "Message Icons",
|
||||
"version": "0.03",
|
||||
"version": "0.04",
|
||||
"description": "Library containing a list of icons and colors for apps",
|
||||
"icon": "app.png",
|
||||
"type": "module",
|
||||
|
|
|
|||
Loading…
Reference in New Issue