From 71bedcc8dca801fa7855e69d058d0ec991ca48a1 Mon Sep 17 00:00:00 2001 From: 2z2z2z Date: Fri, 22 Nov 2024 11:41:33 +0300 Subject: [PATCH] setHeaderColor + small upd --- assets/less/style.less | 2 +- nuxt.config.js | 18 ++++++++++++++++++ pages/auth/index.vue | 2 +- pages/index.vue | 16 ++++++++-------- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/assets/less/style.less b/assets/less/style.less index c3a0d7a..97c740a 100644 --- a/assets/less/style.less +++ b/assets/less/style.less @@ -109,7 +109,7 @@ } // auth -.auth-page {background: @c-main; display: flex; flex-direction: column; width: 100%; height: 560px; max-height: 100vh;} +.auth-page {background: @c-main; display: flex; flex-direction: column; width: 100%; height: 360px; max-height: 100vh;} .auth__logo-container {display: flex; align-items: center; justify-content: center; flex-grow: 2; margin-top: @section-margin; padding: @section-margin 0;} diff --git a/nuxt.config.js b/nuxt.config.js index 365109b..f0e9a36 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -97,6 +97,24 @@ module.exports = { { rel: 'icon', href: '/favicon.png' }, { rel: 'apple-touch-icon', href: '/apple-touch-icon.png' }, ], + script: [ + { src: 'https://telegram.org/js/telegram-web-app.js', async: true, defer: true }, + { + innerHTML: ` + document.addEventListener('DOMContentLoaded', async () => { + if (window.Telegram && window.Telegram.WebApp) { + const webApp = window.Telegram.WebApp; + await webApp.ready(); + webApp.setHeaderColor('#502ec2'); + } + }); + `, + type: 'text/javascript' + } + ], + __dangerouslyDisableSanitizersByTagID: { + 'custom-script': ['innerHTML'] + } }, css: [ './static/css/style.min.css', diff --git a/pages/auth/index.vue b/pages/auth/index.vue index b0af0cd..622a477 100644 --- a/pages/auth/index.vue +++ b/pages/auth/index.vue @@ -37,7 +37,7 @@ -->
- Help + Help
diff --git a/pages/index.vue b/pages/index.vue index 2519d13..4efc794 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -167,14 +167,6 @@
- - + +