Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

widbtstates: generate better js indexing #3681

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/widbtstates/ChangeLog
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
0.01: New App!
0.02: Improve generated JS
2 changes: 1 addition & 1 deletion apps/widbtstates/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "widbtstates",
"name": "Bluetooth States",
"version": "0.01",
"version": "0.02",
"description": "If active, shows a white bluetooth icon, if connected, a blue one (nothing if sleeping)",
"icon": "widget.png",
"type": "widget",
Expand Down
2 changes: 1 addition & 1 deletion apps/widbtstates/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
if (state == 0)
return;
g.reset();
g.setColor(colours[state]["".concat(g.theme.dark)]);
g.setColor(colours[state][g.theme.dark]);
g.drawImage(atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="), this.x + 2, this.y + 2);
},
width: width(),
Expand Down
2 changes: 1 addition & 1 deletion apps/widbtstates/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

g.reset();

g.setColor(colours[state][`${g.theme.dark}`]);
g.setColor(colours[state][g.theme.dark as unknown as `${boolean}`]);

g.drawImage(
atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="),
Expand Down
Loading