diff --git a/apps/messageicons/ChangeLog b/apps/messageicons/ChangeLog index f420615cb..94f7cdd0e 100644 --- a/apps/messageicons/ChangeLog +++ b/apps/messageicons/ChangeLog @@ -4,3 +4,4 @@ Store all icons in a separate binary file (much faster lookup) 0.04: Add message icon for 'clock' 0.05: Add message icon for 'jira' +0.06: Add message icon for 'molly' and 'threema libre' diff --git a/apps/messageicons/icons/generate.js b/apps/messageicons/icons/generate.js index b77cfc26e..e1c26f6bc 100755 --- a/apps/messageicons/icons/generate.js +++ b/apps/messageicons/icons/generate.js @@ -72,7 +72,9 @@ Promise.all(promises).then(function() { require("fs").writeFileSync(__dirname+"/../icons.img", Buffer.from(iconData,"binary")); console.log("Saving library"); - require("fs").writeFileSync(__dirname+"/../lib.js", `exports.getImage = function(msg) { + require("fs").writeFileSync(__dirname+"/../lib.js", `// This file is auto-generated - DO NOT MODIFY +// If you want to add icons, change icons/icon_names.json and re-run icons/generate.js +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"; @@ -87,16 +89,15 @@ exports.getColor = function(msg,options) { if (st.iconColorMode == 'mono') return options.default; const s = (("string"=== typeof msg) ? msg : (msg.src || "")).toLowerCase(); return { - // This file is generated by /icons/generate.js. If you need to modify its content, you should do it there instead. - // generic colors, using B2-safe colors - // DO NOT USE BLACK OR WHITE HERE, just leave the declaration out and then the theme's fg color will be used + /* generic colors, using B2-safe colors */ ${ /* DO NOT USE BLACK OR WHITE HERE, just leave the declaration out and then the theme's fg color will be used */"" } "airbnb": "#ff385c", // https://news.airbnb.com/media-assets/category/brand/ "mail": "#ff0", "music": "#f0f", "phone": "#0f0", - "sms message": "#0ff", - // brands, according to https://www.schemecolor.com/?s (picking one for multicolored logos) - // all dithered on B2, but we only use the color for the icons. (Could maybe pick the closest 3-bit color for B2?) + "sms message": "#0ff", ${ /* + brands, according to https://www.schemecolor.com/?s (picking one for multicolored logos) + all dithered on B2, but we only use the color for the icons. (Could maybe pick the closest 3-bit color for B2?) +*/""} "bibel": "#54342c", "bring": "#455a64", "discord": "#5865f2", // https://discord.com/branding diff --git a/apps/messageicons/icons/icon_names.json b/apps/messageicons/icons/icon_names.json index 7c09cd397..de8be9e98 100644 --- a/apps/messageicons/icons/icon_names.json +++ b/apps/messageicons/icons/icon_names.json @@ -80,6 +80,7 @@ { "app":"infinity", "icon":"reddit.png" }, { "app":"slide", "icon":"reddit.png" }, { "app":"signal", "icon":"signal.png" }, + { "app":"molly", "icon":"signal.png" }, { "app":"skype", "icon":"skype.png" }, { "app":"slack", "icon":"slack.png" }, { "app":"snapchat", "icon":"snapchat.png" }, @@ -89,6 +90,7 @@ { "app":"telegram", "icon":"telegram.png" }, { "app":"telegram foss", "icon":"telegram.png" }, { "app":"threema", "icon":"threema.png" }, + { "app":"threema libre", "icon":"threema.png" }, { "app":"tiktok", "icon":"tiktok.png" }, { "app":"to do", "icon":"task.png" }, { "app":"opentasks", "icon":"task.png" }, diff --git a/apps/messageicons/lib.js b/apps/messageicons/lib.js index 306a4ae46..b3ff2d9ff 100644 --- a/apps/messageicons/lib.js +++ b/apps/messageicons/lib.js @@ -1,3 +1,5 @@ +// This file is auto-generated - DO NOT MODIFY +// If you want to add icons, change icons/icon_names.json and re-run icons/generate.js exports.getImage = function(msg) { if (msg.img) return atob(msg.img); let s = (("string"=== typeof msg) ? msg : (msg.src || "")).toLowerCase(); @@ -13,16 +15,12 @@ exports.getColor = function(msg,options) { if (st.iconColorMode == 'mono') return options.default; const s = (("string"=== typeof msg) ? msg : (msg.src || "")).toLowerCase(); return { - // This file is generated by /icons/generate.js. If you need to modify its content, you should do it there instead. - // generic colors, using B2-safe colors - // DO NOT USE BLACK OR WHITE HERE, just leave the declaration out and then the theme's fg color will be used + /* generic colors, using B2-safe colors */ "airbnb": "#ff385c", // https://news.airbnb.com/media-assets/category/brand/ "mail": "#ff0", "music": "#f0f", "phone": "#0f0", - "sms message": "#0ff", - // brands, according to https://www.schemecolor.com/?s (picking one for multicolored logos) - // all dithered on B2, but we only use the color for the icons. (Could maybe pick the closest 3-bit color for B2?) + "sms message": "#0ff", "bibel": "#54342c", "bring": "#455a64", "discord": "#5865f2", // https://discord.com/branding @@ -67,4 +65,4 @@ exports.getColor = function(msg,options) { "youtube": "#f00", // https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors }[s]||options.default; }; - + \ No newline at end of file diff --git a/apps/messageicons/metadata.json b/apps/messageicons/metadata.json index 13f218508..827d08a55 100644 --- a/apps/messageicons/metadata.json +++ b/apps/messageicons/metadata.json @@ -1,7 +1,7 @@ { "id": "messageicons", "name": "Message Icons", - "version": "0.05", + "version": "0.06", "description": "Library containing a list of icons and colors for apps", "icon": "app.png", "type": "module",