forked from AkkomaGang/akkoma-fe
Fix mobile setting modal behavior: ensure the mobile browser address bar doesn't overlap the modal top panel.
This commit is contained in:
parent
25a015b471
commit
dac075c61a
3 changed files with 33 additions and 1 deletions
16
src/App.scss
16
src/App.scss
|
@ -943,6 +943,22 @@ nav {
|
||||||
line-height: 1.3rem;
|
line-height: 1.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings-modal-layout {
|
||||||
|
@media all and (max-width: 800px) {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
body {
|
||||||
|
height: 100vh;
|
||||||
|
overflow-y: hidden;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.chat-layout {
|
.chat-layout {
|
||||||
// Needed for smoother chat navigation in the desktop Safari (otherwise the chat layout "jumps" as the chat opens).
|
// Needed for smoother chat navigation in the desktop Safari (otherwise the chat layout "jumps" as the chat opens).
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -36,6 +36,21 @@ const SettingsModal = {
|
||||||
modalPeeked () {
|
modalPeeked () {
|
||||||
return this.$store.state.interface.settingsModalState === 'minimized'
|
return this.$store.state.interface.settingsModalState === 'minimized'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
modalActivated (newValue) {
|
||||||
|
if (newValue) {
|
||||||
|
let html = document.querySelector('html')
|
||||||
|
if (html) {
|
||||||
|
html.classList.add('settings-modal-layout')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let html = document.querySelector('html')
|
||||||
|
if (html) {
|
||||||
|
html.classList.remove('settings-modal-layout')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
@import 'src/_variables.scss';
|
@import 'src/_variables.scss';
|
||||||
.settings-modal {
|
.settings-modal {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
&.peek {
|
&.peek {
|
||||||
.settings-modal-panel {
|
.settings-modal-panel {
|
||||||
|
@ -27,7 +28,7 @@
|
||||||
|
|
||||||
@media all and (max-width: 800px) {
|
@media all and (max-width: 800px) {
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
height: 100vh;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
>.panel-body {
|
>.panel-body {
|
||||||
|
|
Loading…
Reference in a new issue