mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 02:22:44 +01:00
refactor: enhance mobile navigation responsiveness and styling
This commit is contained in:
@@ -80,7 +80,8 @@ onBeforeUnmount(() => {
|
||||
'drawer-mobile': smAndDown,
|
||||
}"
|
||||
class="bg-surface pa-1"
|
||||
:style="mdAndUp ? 'height: unset' : ''"
|
||||
:style="mdAndUp ? 'height: unset' : 'width: calc(100% - 16px) !important;'"
|
||||
style="z-index: 9998 !important"
|
||||
rounded
|
||||
:border="0"
|
||||
>
|
||||
@@ -137,9 +138,3 @@ onBeforeUnmount(() => {
|
||||
|
||||
<create-collection-dialog />
|
||||
</template>
|
||||
<style scoped>
|
||||
.drawer-mobile {
|
||||
width: calc(100% - 16px) !important;
|
||||
z-index: 1011 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { ROUTES } from "@/plugins/router";
|
||||
|
||||
import { useDisplay } from "vuetify";
|
||||
import RIsotipo from "@/components/common/RIsotipo.vue";
|
||||
|
||||
// Props
|
||||
const { smAndDown } = useDisplay();
|
||||
</script>
|
||||
<template>
|
||||
<router-link :to="{ name: ROUTES.HOME }" class="cursor-pointer">
|
||||
<r-isotipo :size="40" />
|
||||
<r-isotipo :size="smAndDown ? 35 : 40" />
|
||||
</router-link>
|
||||
</template>
|
||||
|
||||
@@ -30,6 +30,25 @@ function collapse() {
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<!-- Mobile top bar -->
|
||||
<v-app-bar
|
||||
v-if="smAndDown"
|
||||
style="z-index: 9999 !important"
|
||||
elevation="0"
|
||||
class="bg-background justify-center px-1"
|
||||
height="50"
|
||||
fixed
|
||||
left
|
||||
>
|
||||
<template #prepend>
|
||||
<home-btn class="ml-1" />
|
||||
</template>
|
||||
|
||||
<template #append>
|
||||
<user-btn class="mr-1" />
|
||||
</template>
|
||||
</v-app-bar>
|
||||
|
||||
<!-- Mobile bottom bar -->
|
||||
<v-bottom-navigation
|
||||
v-if="smAndDown"
|
||||
@@ -38,18 +57,17 @@ function collapse() {
|
||||
style="z-index: 9999 !important"
|
||||
class="bg-background align-center justify-center"
|
||||
>
|
||||
<home-btn value="home" class="mt-3 mx-2" />
|
||||
<search-btn withTag />
|
||||
<platforms-btn withTag />
|
||||
<collections-btn withTag />
|
||||
<!-- <upload-btn withTag /> -->
|
||||
<upload-btn withTag />
|
||||
<scan-btn withTag />
|
||||
<user-btn class="mt-3 mx-2" />
|
||||
</v-bottom-navigation>
|
||||
|
||||
<!-- Desktop app bar -->
|
||||
<!-- Desktop app side bar -->
|
||||
<v-navigation-drawer
|
||||
v-else
|
||||
style="z-index: 9999 !important"
|
||||
permanent
|
||||
rail
|
||||
:rail-width="mainBarCollapsed ? 60 : 100"
|
||||
|
||||
@@ -31,7 +31,8 @@ function clear() {
|
||||
'drawer-mobile': smAndDown,
|
||||
}"
|
||||
class="bg-surface pa-1"
|
||||
:style="mdAndUp ? 'height: unset' : ''"
|
||||
:style="mdAndUp ? 'height: unset' : 'width: calc(100% - 16px) !important;'"
|
||||
style="z-index: 9998 !important"
|
||||
rounded
|
||||
:border="0"
|
||||
>
|
||||
@@ -58,9 +59,3 @@ function clear() {
|
||||
</v-list>
|
||||
</v-navigation-drawer>
|
||||
</template>
|
||||
<style scoped>
|
||||
.drawer-mobile {
|
||||
width: calc(100% - 16px) !important;
|
||||
z-index: 1011 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -50,7 +50,7 @@ async function logout() {
|
||||
<template>
|
||||
<v-navigation-drawer
|
||||
mobile
|
||||
:location="smAndDown ? 'bottom' : 'left'"
|
||||
:location="smAndDown ? 'top' : 'left'"
|
||||
width="450"
|
||||
v-model="activeSettingsDrawer"
|
||||
:class="{
|
||||
@@ -59,7 +59,8 @@ async function logout() {
|
||||
'drawer-mobile': smAndDown,
|
||||
}"
|
||||
class="bg-surface pa-1"
|
||||
:style="mdAndUp ? 'height: unset' : ''"
|
||||
:style="mdAndUp ? 'height: unset' : 'width: calc(100% - 16px) !important;'"
|
||||
style="z-index: 9998 !important"
|
||||
rounded
|
||||
:border="0"
|
||||
>
|
||||
@@ -126,9 +127,3 @@ async function logout() {
|
||||
</template>
|
||||
</v-navigation-drawer>
|
||||
</template>
|
||||
<style scoped>
|
||||
.drawer-mobile {
|
||||
width: calc(100% - 16px) !important;
|
||||
z-index: 1011 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,17 +3,19 @@ import storeAuth from "@/stores/auth";
|
||||
import storeNavigation from "@/stores/navigation";
|
||||
import { defaultAvatarPath } from "@/utils";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useDisplay } from "vuetify";
|
||||
|
||||
// Props
|
||||
const navigationStore = storeNavigation();
|
||||
const auth = storeAuth();
|
||||
const { user } = storeToRefs(auth);
|
||||
const { smAndDown } = useDisplay();
|
||||
</script>
|
||||
<template>
|
||||
<v-avatar
|
||||
@click="navigationStore.switchActiveSettingsDrawer"
|
||||
class="pointer"
|
||||
:size="40"
|
||||
:size="smAndDown ? 35 : 40"
|
||||
:class="{ active: navigationStore.activeSettingsDrawer }"
|
||||
>
|
||||
<v-img
|
||||
|
||||
Reference in New Issue
Block a user