mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 00:11:48 -06:00
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:
+47
-13
@@ -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 {
|
||||
display: none;
|
||||
}
|
||||
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
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.connect {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
Reference in New Issue
Block a user