recorder: add clock info
parent
0eea248390
commit
a07ef21cf9
|
|
@ -0,0 +1,37 @@
|
|||
(function () {
|
||||
const recimg = () =>
|
||||
require("heatshrink").decompress(atob("jEYxH+AHHCAAgVQ4fDCwYFCCpotFDQgZJCxYYLCxgYCOJgALFygwHLpphJIyJIFC9O72oXU3m02h3UC4O7U6m7FwhIQIwwwPCxJhMCwSNEDBm83hbBCxQZEDQQUCIhIZIAAO1UAwAzA="));
|
||||
|
||||
// TODO: deal with dark background - draw image instead?
|
||||
const pauseimg = () =>
|
||||
require("heatshrink").decompress(atob("jEYxH+AH4Am64ABAxQWLCIYGGC6AHEF9QX/C/4X/C64HEF8YRDAxQA/AEQA="));
|
||||
|
||||
return {
|
||||
name: "Recorder",
|
||||
items: [
|
||||
{
|
||||
name: "Toggle",
|
||||
get: () => {
|
||||
const w = typeof WIDGETS !== "undefined" && WIDGETS["recorder"];
|
||||
|
||||
return w && w.isRecording() ? {
|
||||
text: "Recording",
|
||||
short: "rec",
|
||||
img: recimg(),
|
||||
} : {
|
||||
text: "Paused",
|
||||
short: "paused",
|
||||
img: pauseimg(),
|
||||
}
|
||||
},
|
||||
run: () => {
|
||||
const w = WIDGETS["recorder"];
|
||||
Bangle.buzz();
|
||||
w.setRecording(!w.isRecording(), { force: "append" });
|
||||
},
|
||||
show: () => {},
|
||||
hide: () => {},
|
||||
},
|
||||
],
|
||||
};
|
||||
});
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
{"name":"recorder.app.js","url":"app.js"},
|
||||
{"name":"recorder.img","url":"app-icon.js","evaluate":true},
|
||||
{"name":"recorder.wid.js","url":"widget.js"},
|
||||
{"name":"recorder.clkinfo.js","url":"clkinfo.js"},
|
||||
{"name":"recorder.settings.js","url":"settings.js"}
|
||||
],
|
||||
"data": [
|
||||
|
|
|
|||
Loading…
Reference in New Issue