Skip to content

Commit 4c6266f

Browse files
authored
Initial version
1 parent 8c49d86 commit 4c6266f

File tree

16 files changed

+86
-0
lines changed

16 files changed

+86
-0
lines changed

app/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import clock from "clock";
2+
import document from "document";
3+
4+
let digit1 = document.getElementById("digit1");
5+
let digit2 = document.getElementById("digit2");
6+
let digit3 = document.getElementById("digit3");
7+
let digit4 = document.getElementById("digit4");
8+
9+
clock.granularity = "minutes";
10+
11+
clock.ontick = (evt) => {
12+
let hours = ("0" + evt.date.getHours()).slice(-2);
13+
let mins = ("0" + evt.date.getMinutes()).slice(-2);
14+
15+
digit1.href = hours.slice(0, 1) + ".png";
16+
digit2.href = hours.slice(1, 2) + ".png";
17+
digit3.href = mins.slice(0, 1) + ".png";
18+
digit4.href = mins.slice(1, 2) + ".png";
19+
};

package.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"fitbit": {
3+
"appUUID": "cf68eace-f2ad-4f65-82b9-a15822ef7d4c",
4+
"appType": "clockface",
5+
"appDisplayName": "Pokétch",
6+
"iconFile": "resources/icon.png",
7+
"wipeColor": "",
8+
"requestedPermissions": [],
9+
"buildTargets": [
10+
"meson"
11+
],
12+
"i18n": {
13+
"en": {
14+
"name": "Pokétch"
15+
},
16+
"fr": {
17+
"name": "Pokémontre"
18+
},
19+
"it": {
20+
"name": "PokéKron"
21+
},
22+
"es": {
23+
"name": "Poké-reloj"
24+
},
25+
"ko": {
26+
"name": "포켓치"
27+
},
28+
"nl": {
29+
"name": "Pokétch"
30+
},
31+
"sv": {
32+
"name": "Pokétch"
33+
},
34+
"zh-cn": {
35+
"name": "宝可表"
36+
},
37+
"zh-tw": {
38+
"name": "寶可錶"
39+
},
40+
"de": {
41+
"name": "Pokétch"
42+
},
43+
"ja": {
44+
"name": "ポケッチ"
45+
}
46+
},
47+
"defaultLanguage": "en-US"
48+
},
49+
"devDependencies": {
50+
"@fitbit/sdk": "~3.1.0"
51+
}
52+
}

resources/0.png

2.85 KB
Loading

resources/1.png

2.84 KB
Loading

resources/2.png

2.86 KB
Loading

resources/3.png

2.85 KB
Loading

resources/4.png

2.86 KB
Loading

resources/5.png

2.86 KB
Loading

resources/6.png

2.86 KB
Loading

resources/7.png

2.85 KB
Loading

resources/8.png

2.86 KB
Loading

resources/9.png

2.86 KB
Loading

resources/background.png

4.19 KB
Loading

resources/index.gui

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<svg>
2+
<image href="background.png" width="300" height="300" />
3+
4+
<image href="seperator.png" width="12" height="108" x="144" y="96"/>
5+
6+
<image id="digit1" href="2.png" width="48" height="108" x="24" y="96"/>
7+
<image id="digit2" href="0.png" width="48" height="108" x="84" y="96"/>
8+
<image id="digit3" href="1.png" width="48" height="108" x="168" y="96"/>
9+
<image id="digit4" href="9.png" width="48" height="108" x="228" y="96"/>
10+
</svg>

resources/seperator.png

2.78 KB
Loading

resources/widgets.gui

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<svg>
2+
<defs>
3+
<link rel="import" href="/mnt/sysassets/widgets_common.gui"/>
4+
</defs>
5+
</svg>

0 commit comments

Comments
 (0)