diff --git a/index.html b/index.html
index f8f1c52..53e44d2 100644
--- a/index.html
+++ b/index.html
@@ -11,7 +11,7 @@
-
+
-
-
-
+
+
@@ -23,12 +21,19 @@ import { onMounted, ref, watch } from 'vue'
import { Modal } from 'bootstrap'
import { useMercuryStore } from './stores/mercuryStore'
import UserSettings from './components/userSettings/UserSettings.vue'
+import { useWindowSize } from '@vueuse/core';
const mercuryStore = useMercuryStore()
const configured = mercuryStore.configured()
const settingsModal = ref()
+const { width, height } = useWindowSize()
+watch(width, () => {
+ mercuryStore.mobile = window.innerWidth < 768 ? true : false
+ mercuryStore.showSidebar = !mercuryStore.mobile
+}, { immediate: true })
+
onMounted(() => {
const modal = new Modal(settingsModal.value)
@@ -44,9 +49,39 @@ onMounted(() => {
}, { immediate: true })
})
+visualViewport.addEventListener('resize', () => {
+ window.scrollTo(0, 0)
+ document.querySelector('#app').style.height = `${window.visualViewport.height}px`
+})
+
+document.addEventListener('gesturestart', (e) => {
+ e.preventDefault()
+})
+
+document.addEventListener('touchmove', (e) => {
+ e.preventDefault()
+})
+
\ No newline at end of file
+
diff --git a/src/components/common/Key.vue b/src/components/common/Key.vue
index 540aa17..6db7b00 100644
--- a/src/components/common/Key.vue
+++ b/src/components/common/Key.vue
@@ -21,4 +21,4 @@ onBeforeRouteUpdate(() => {
i {
cursor: pointer;
}
-
\ No newline at end of file
+
diff --git a/src/components/userlist/User.vue b/src/components/common/User.vue
similarity index 97%
rename from src/components/userlist/User.vue
rename to src/components/common/User.vue
index b2510f0..3fbd934 100644
--- a/src/components/userlist/User.vue
+++ b/src/components/common/User.vue
@@ -16,4 +16,4 @@ const color = computed(() => { return user.color ?? Colors.Secondary })
span:hover {
color: white !important;
}
-
\ No newline at end of file
+
diff --git a/src/components/Content.vue b/src/components/content/Content.vue
similarity index 60%
rename from src/components/Content.vue
rename to src/components/content/Content.vue
index bc75750..2368732 100644
--- a/src/components/Content.vue
+++ b/src/components/content/Content.vue
@@ -1,20 +1,23 @@
-
-
+
+
-
+
-
@@ -24,11 +27,15 @@
+
+
diff --git a/src/components/conversation/Message.vue b/src/components/conversation/Message.vue
index acb516c..f1c5527 100644
--- a/src/components/conversation/Message.vue
+++ b/src/components/conversation/Message.vue
@@ -8,9 +8,9 @@
diff --git a/src/components/sidebar/Channels.vue b/src/components/sidebar/Channels.vue
index 28cf30b..b8ce735 100644
--- a/src/components/sidebar/Channels.vue
+++ b/src/components/sidebar/Channels.vue
@@ -1,4 +1,5 @@
+Channels