Skip to content

Commit

Permalink
adapt color scheme to client theme
Browse files Browse the repository at this point in the history
  • Loading branch information
oybek committed Sep 24, 2023
1 parent 8ea3da2 commit b224f6a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spendbook/js/dropDowns.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ $(document).ready(function () {
$.each(months, function (key, obj) {
$("#month").append(`<option value="${obj.value}">${obj.text}</option>`);
});
if (window.Telegram.WebApp.colorScheme === "dark") {
$(":root")
.css('--border-color-2', '#666')
.css('--border-color', '#222')
.css('--bg-color', '#444')
.css('--bg-color-2', '#666')
.css('--fg-color', '#eee');
} else {
$(":root")
.css('--border-color-2', '#aaa')
.css('--border-color', '#ccc')
.css('--bg-color', '#eee')
.css('--bg-color-2', '#fff')
.css('--fg-color', '#222');
}
});

$(".button-group").on("click", ".button", function () {
Expand Down

0 comments on commit b224f6a

Please sign in to comment.