improved mobile layout

This commit is contained in:
2025-12-29 10:47:36 +01:00
parent 24a460e6e2
commit 610fd74e89
19 changed files with 144 additions and 73 deletions

View File

@@ -6,7 +6,7 @@
<aside class="sidebar" :class="{ 'is-open': isSidebarOpen }">
<div class="sidebar-content">
<RoomList />
<RoomList @select-room="handleRoomSelection" />
</div>
</aside>
@@ -24,8 +24,13 @@ import RoomList from "../components/RoomList.vue";
import ChatWindow from "../components/ChatWindow.vue";
defineProps<{ uuid: string }>();
const isSidebarOpen = ref(true);
const handleRoomSelection = () => {
if (window.innerWidth <= 720) {
isSidebarOpen.value = false;
}
};
</script>
<style scoped>
@@ -64,6 +69,7 @@ const isSidebarOpen = ref(true);
.chat-window-container {
flex: 1;
padding-left: 38px;
display: flex;
flex-direction: column;
min-width: 0;
@@ -124,8 +130,8 @@ const isSidebarOpen = ref(true);
z-index: 15;
}
.chat-window-container {
padding-top: 50px;
.menu-toggle:hover i {
color: var(--muted);
}
}
</style>

View File

@@ -43,7 +43,7 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { fetchFriends, fetchFriendRequests, acceptFriendRequest, sendFriendRequest } from '../api/friends'
import type { Friend, FriendRequest } from '../types/api'
import type { Friend, FriendRequest } from '../api'
const friends = ref<Friend[]>([])
const requests = ref<FriendRequest[]>([])

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref } from "vue";
import { login } from '../stores/auth.ts'
import { login } from '../store.ts'
import { useRouter } from "vue-router";
const email = ref("");