diff --git a/app/modules/tgbot/views/tgbot/layout/main.php b/app/modules/tgbot/views/tgbot/layout/main.php index e79f5cd..7e2e07d 100644 --- a/app/modules/tgbot/views/tgbot/layout/main.php +++ b/app/modules/tgbot/views/tgbot/layout/main.php @@ -20,6 +20,7 @@ + @@ -66,6 +67,7 @@ +
@@ -74,5 +76,6 @@ + \ No newline at end of file diff --git a/resources/main/js/tg.js b/resources/main/js/tg.js new file mode 100644 index 0000000..2edb3ce --- /dev/null +++ b/resources/main/js/tg.js @@ -0,0 +1,5 @@ +document.addEventListener("DOMContentLoaded", () => { + let tg = window.Telegram.WebApp; + let username_tag = document.getElementById("username_tag") + username_tag.innerHTML = tg.initDataUnsafe.user.username; +}); \ No newline at end of file