fix: drawers height

This commit is contained in:
zurdi
2025-04-09 16:26:28 +00:00
parent 586c06ac95
commit 4e1cc18421
4 changed files with 15 additions and 8 deletions

View File

@@ -3,7 +3,6 @@ import type { FirmwareSchema } from "@/__generated__";
import DeleteFirmwareDialog from "@/components/common/Platform/Dialog/DeleteFirmware.vue";
import UploadFirmwareDialog from "@/components/common/Platform/Dialog/UploadFirmware.vue";
import storeAuth from "@/stores/auth";
import storeNavigation from "@/stores/navigation";
import storeGalleryView from "@/stores/galleryView";
import storeRoms from "@/stores/roms";
import type { Events } from "@/types/emitter";
@@ -16,14 +15,12 @@ import { useI18n } from "vue-i18n";
// Props
const { t } = useI18n();
const { xs, mdAndUp, smAndDown } = useDisplay();
const { xs, mdAndUp } = useDisplay();
const auth = storeAuth();
const romsStore = storeRoms();
const { currentPlatform } = storeToRefs(romsStore);
const galleryViewStore = storeGalleryView();
const { activeFirmwareDrawer } = storeToRefs(galleryViewStore);
const navigationStore = storeNavigation();
const { mainBarCollapsed } = storeToRefs(navigationStore);
const { calculatedWidth } = calculateMainLayoutWidth();
const selectedFirmware = ref<FirmwareSchema[]>([]);
const emitter = inject<Emitter<Events>>("emitter");
@@ -61,9 +58,9 @@ function deleteSelectedFirmware() {
location="bottom"
v-model="activeFirmwareDrawer"
:class="{
'my-2 px-1': activeFirmwareDrawer,
'my-2 px-1 max-h-50': activeFirmwareDrawer,
}"
class="bg-surface border-0 rounded mx-2 px-1 unset-height"
class="bg-surface border-0 rounded mx-2 px-1"
:style="{
width: calculatedWidth,
}"

View File

@@ -78,7 +78,8 @@ onBeforeUnmount(() => {
'my-2': mdAndUp || (smAndDown && activeCollectionsDrawer),
'ml-2': (mdAndUp && activeCollectionsDrawer) || smAndDown,
'drawer-mobile': smAndDown,
'unset-height': mdAndUp || (smAndDown && activeCollectionsDrawer),
'unset-height': mdAndUp,
'max-h-70': smAndDown && activeCollectionsDrawer,
}"
class="bg-surface pa-1"
rounded

View File

@@ -29,7 +29,8 @@ function clear() {
'my-2': mdAndUp || (smAndDown && activePlatformsDrawer),
'ml-2': (mdAndUp && activePlatformsDrawer) || smAndDown,
'drawer-mobile': smAndDown,
'unset-height': mdAndUp || (smAndDown && activePlatformsDrawer),
'unset-height': mdAndUp,
'max-h-70': smAndDown && activePlatformsDrawer,
}"
class="bg-surface pa-1"
rounded

View File

@@ -78,3 +78,11 @@ body {
.bottom-50 {
bottom: 50px !important;
}
.max-h-50 {
height: fit-content !important;
max-height: 50dvh !important;
}
.max-h-70 {
height: fit-content !important;
max-height: 70dvh !important;
}