Skip to content

Commit

Permalink
Fixing Telegram Auth wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
orchestr7 committed Sep 7, 2024
1 parent f846126 commit 0bf7223
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
21 changes: 0 additions & 21 deletions frontend/src/jsMain/kotlin/ru/posidata/views/main/MainView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import ru.posidata.views.utils.internals.Selection.RESULTS
import ru.posidata.views.utils.externals.particles.Particles
import ru.posidata.views.utils.externals.telegram.TLoginButton
import web.cssom.*
import web.html.HTMLDivElement

val telegramWrapperRef: MutableRefObject<HTMLDivElement> = useRef(null)

val mainView = FC {
Particles::class.react {
Expand All @@ -36,20 +33,6 @@ val mainView = FC {
minHeight = "100vh".unsafeCast<MinHeight>()
}

TLoginButton {
botName = "PosiDataBot"
buttonSize = "large"
onAuthCallback = { user ->
console.log(user.hash)
}
redirectUrl = null
cornerRadius = 15.0
requestAccess = "write"
usePic = null
lang = null
additionalClassNames = ""
}

div {
id = "back"
className = ClassName("card col-xl-4 col-lg-5 col-md-7 col-sm-8 col-12")
Expand All @@ -59,10 +42,6 @@ val mainView = FC {
boxShadow = "10px 10px 20px rgba(0, 0, 0, 0.5)".unsafeCast<BoxShadow>()
}

div {
ref = telegramWrapperRef

}
headerRow {}

div {
Expand Down
15 changes: 15 additions & 0 deletions frontend/src/jsMain/kotlin/ru/posidata/views/main/Welcome.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import react.dom.html.ReactHTML.div
import react.dom.html.ReactHTML.h1
import react.dom.html.ReactHTML.h6
import react.dom.html.ReactHTML.img
import ru.posidata.views.utils.externals.telegram.TLoginButton
import ru.posidata.views.utils.internals.Selection
import web.cssom.*

Expand Down Expand Up @@ -74,6 +75,20 @@ val welcomeCard = FC<WelcomeCardProps> { props ->

}

TLoginButton {
botName = "PosiDataBot"
buttonSize = "large"
onAuthCallback = { user ->
console.log(user.hash)
}
redirectUrl = null
cornerRadius = 15.0
requestAccess = "write"
usePic = null
lang = null
additionalClassNames = "d-flex justify-content-center zIndex1000"
}

img {
className = ClassName("animate__animated animate__shakeX mt-1 border border-info border-5 img-glow3 ")
src = "img/pokemonVSBigData.jpeg"
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/jsMain/resources/scss/_background.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
background: linear-gradient(0deg, rgb(0, 85, 102), rgb(0, 55, 71)); /* Standard syntax */
}



html {
height: 100%;
}

body {
height: 100%;
margin: 0;
Expand All @@ -34,3 +37,7 @@ body {
.full-width-container .row {
margin: 0;
}

.zIndex1000 {
z-index: 1000;
}

0 comments on commit 0bf7223

Please sign in to comment.