Scroll to chat on mobile (#496)

* WIP: scroll to chat proof of concept on mobile, #381.

* update screen size to 1024px.

* login screen position fixed, #381.

* show chat with a small video on portrait mode.
This commit is contained in:
Miroslav Šedivý
2025-04-02 21:27:11 +02:00
committed by GitHub
parent a2ba96632c
commit d7e2e73945
2 changed files with 48 additions and 14 deletions
+45 -11
View File
@@ -119,23 +119,43 @@
}
}
@media only screen and (max-width: 600px) {
#neko.expanded {
.neko-main {
transform: translateX(calc(-100% + 65px));
@media only screen and (max-width: 1024px) {
html,
body {
overflow-y: auto !important;
width: auto !important;
height: auto !important;
}
video {
body > p {
display: none;
}
#neko {
position: relative;
flex-direction: column;
max-height: initial !important;
.neko-main {
height: 100vh;
}
.neko-menu {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 65px;
width: calc(100% - 65px);
height: 100vh;
width: 100% !important;
}
}
}
@media only screen and (max-width: 1024px) and (orientation: portrait) {
#neko {
&.expanded .neko-main {
height: 40vh;
}
&.expanded .neko-menu {
height: 60vh;
width: 100% !important;
}
}
}
@@ -217,6 +237,20 @@
}
}
@Watch('side')
onSide(side: boolean) {
if (side) {
console.log('side enabled')
// scroll to the side
this.$nextTick(() => {
const side = document.querySelector('aside')
if (side) {
side.scrollIntoView({ behavior: 'smooth', block: 'start' })
}
})
}
}
controlAttempt() {
if (this.shakeKbd || this.$accessor.remote.hosted) return
+1 -1
View File
@@ -24,7 +24,7 @@
<style lang="scss" scoped>
.connect {
position: absolute;
position: fixed;
top: 0;
left: 0;
right: 0;