diff --git a/apps.json b/apps.json index 941bc0716..fd46de1d8 100644 --- a/apps.json +++ b/apps.json @@ -4972,5 +4972,19 @@ {"name":"coretemp.app.js","url":"coretemp.js"}, {"name":"coretemp.img","url":"coretemp-icon.js","evaluate":true} ] + }, + { + "id": "showimg", + "name": "simple image viewer", + "shortName":"showImage", + "version":"0.1", + "description": "Displays the image file in showimage.user.img. Returns to watch face after 60s or button push. I use it to display my vaccination certificate.", + "icon": "app.png", + "tags": "tool", + "supports" : ["BANGLEJS2"], + "storage": [ + {"name":"showimg.app.js","url":"app.js"}, + {"name":"showimg.img","url":"app-icon.js","evaluate":true} + ] } ] diff --git a/apps/locale/locales.js b/apps/locale/locales.js index 1d659f161..2e3fa8713 100644 --- a/apps/locale/locales.js +++ b/apps/locale/locales.js @@ -37,20 +37,30 @@ const codePages = { /* When it's not in the codepage, try and use these conversions */ const charFallbacks = { + "ą":"a", + "ā":"a", "č":"c", - "ř":"r", - "ő":"o", + "ć":"c", "ě":"e", "ę":"e", - "ą":"a", + "ē":"e", + "ģ":"g", + "i":"ī", + "ķ":"k", + "ļ":"l", + "ł":"l", + "ń":"n", + "ņ":"n", + "ő":"o", "ó":"o", + "ř":"r", + "ś":"s", + "š":"s", + "ū":"u", "ż":"z", "ź":"z", - "ń":"n", - "ł":"l", - "ś":"s", - "ć":"c", -}; + "ž":"z", + }; /* timePattern / datePattern: @@ -631,6 +641,24 @@ var locales = { day: "Niedziela,Poniedziałek,Wtorek,Środa,Czwartek,Piątek,Sobota", trans: { yes: "tak", Yes: "Tak", no: "nie", No: "Nie", ok: "ok", on: "on", off: "off", "< Back": "< Wstecz" } }, + "lv_LV": { // Using charfallbacks + lang: "lv_LV", + decimal_point: ",", + thousands_sep: " ", + currency_symbol: "€", + int_curr_symbol: "EUR", + speed: "kmh", + distance: { 0: "m", 1: "km" }, + temperature: "°C", + ampm: { 0: "", 1: "" }, + timePattern: { 0: "%HH:%MM:%SS", 1: "%HH:%MM" }, + datePattern: { 0: "%d. %b %Y", "1": "%d.%m.%Y" }, // 1. Mar 2020 // 01.03.20 + abmonth: "Jan,Feb,Mar,Apr,Mai,Jūn,Jūl,Aug,Sep,Okt,Nov,Dec", + month: "Janvāris,Februāris,Marts,Aprīlis,Maijs,Jūnijs,Jūlijs,Augusts,Septemberis,Oktobris,Novembris,Decembris", + abday: "Pr,Ot,Tr,Ce,Pk,Se,Sv", + day: "Pirmdiena,Otrdiena,Trešdiena,Ceturtdiena,Piektdiena,Sestdiena,Svētdiena", + trans: { yes: "jā", Yes: "Jā", no: "nē", No: "Nē", ok: "labi", on: "Ieslēgt", off: "Izslēgt", "< Back": "< Atpakaļ" } + }, /*, "he_IL": { // This won't work until we get a font - see https://github.com/espruino/BangleApps/issues/399 codePage : "ISO8859-8", diff --git a/apps/showimg/README.md b/apps/showimg/README.md new file mode 100644 index 000000000..9d7c0067a --- /dev/null +++ b/apps/showimg/README.md @@ -0,0 +1,3 @@ +Displays an image. I use this app to show my vaccination certificate. +The image is read from the file "showimage.user.img". +Returns to watch face after 60s/button push. diff --git a/apps/showimg/app-icon.js b/apps/showimg/app-icon.js new file mode 100644 index 000000000..1c73a2f72 --- /dev/null +++ b/apps/showimg/app-icon.js @@ -0,0 +1 @@ +E.toArrayBuffer(atob("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAf////AHP/////AH//////AP/8AAAHAP4AAAAHAOAAMAAHAOAAeAAHAOAA+cAHAOAA/+AHAOAA/+AHAOAf/+AHAOA//+AHgOA///AHgOA///gDgOA/z/gDgOAfz/gDgOA///gDgOA///gDgOA//uADgOAf3+ADgOAP/+ADgOAD/8ADwOAB+4ADwOAA8AABwOAAAABBwOA8DgPxwOB/Dg/xwOB/jh/xwOB3zj5xwOB57nzxwOA4/njhwOA4/vHhwOA8f+PB4OAef+PB4OAef8eB4OAPP58A4OAHv/4A4OAH//wA4OAD//AA4OAA/8fn4PDgP///4P//////4P////9/wD///4AAA")) diff --git a/apps/showimg/app.js b/apps/showimg/app.js new file mode 100644 index 000000000..e00385bd7 --- /dev/null +++ b/apps/showimg/app.js @@ -0,0 +1,16 @@ +g.reset(); +g.clear(); +g.drawImage(require("Storage").read("showimg.user.img"),0,0); +drawTimeout = setTimeout(function() { + load(); +}, 60000); +setWatch(function() { + load(); +}, BTN, { repeat:false, edge:'falling' }); +var savedOptions=Bangle.getOptions(); +Bangle.setLCDBrightness(1); +var newOptions={ + lockTimeout:60000, + backlightTimeout:60000 +}; +Bangle.setOptions(newOptions); diff --git a/apps/showimg/app.png b/apps/showimg/app.png new file mode 100644 index 000000000..306db9b42 Binary files /dev/null and b/apps/showimg/app.png differ