Fix clkinfo icon

master
Gordon Williams 2022-11-25 16:26:38 +00:00
parent 902db2a19a
commit 602689ed28
2 changed files with 4 additions and 3 deletions

View File

@ -6,3 +6,4 @@
0.06: Added clkinfo for clocks.
0.07: Clkinfo improvements.
0.08: Fix error in clkinfo (didn't require Storage & locale)
Fix clkinfo icon

View File

@ -1,7 +1,7 @@
(function() {
var agendaItems = {
name: "Agenda",
img: atob("GBiBAf////////85z/AAAPAAAPgAAP////AAAPAAAPAAAPAAAOAAAeAAAeAAAcAAA8AAAoAABgAADP//+P//8PAAAPAAAPgAAf///w=="),
img: atob("GBiBAAAAAAAAAADGMA///w///wf//wAAAA///w///w///w///x///h///h///j///D///X//+f//8wAABwAADw///w///wf//gAAAA=="),
items: []
};
var locale = require("locale");
@ -12,13 +12,13 @@
agenda.forEach((entry, i) => {
var title = entry.title.slice(0,18);
var title = entry.title.slice(0,12);
var date = new Date(entry.timestamp*1000);
var dateStr = locale.date(date).replace(/\d\d\d\d/,"");
dateStr += entry.durationInSeconds < 86400 ? "/ " + locale.time(date,1) : "";
agendaItems.items.push({
name: null,
name: "Agenda "+i,
get: () => ({ text: title + "\n" + dateStr, img: null}),
show: function() { agendaItems.items[i].emit("redraw"); },
hide: function () {}