Skip to content

Commit

Permalink
Fix some size related issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ltouroumov committed Sep 27, 2024
1 parent 42fddfb commit 88726e9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
7 changes: 6 additions & 1 deletion components/utils/ModalDialog.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="fade modal" :class="{ show: show }">
<div class="modal-dialog modal-xl">
<div class="modal-dialog" :class="size ?? 'modal-lg'">
<div v-if="show" class="modal-content">
<div class="modal-header">
<slot name="header" />
Expand Down Expand Up @@ -31,6 +31,7 @@ defineEmits<{
defineProps<{
show: boolean;
size?: string;
}>();
</script>
Expand Down Expand Up @@ -58,6 +59,10 @@ div.modal {
overflow: auto;
flex-direction: column;
}
.modal-80 {
--bs-modal-width: 80%;
}
}
// @import '~/assets/css/bootstrap/_config.scss';
Expand Down
5 changes: 5 additions & 0 deletions components/viewer/ProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ defineProps<{
<style lang="scss">
.project {
font-family: sans-serif;
display: flex;
flex-direction: column;
align-items: center;
.rows {
// Prevents collapsing margins
display: flex;
flex-direction: column;
align-items: stretch;
max-width: 1200px;
.project-row-wrapper {
flex: 1 1 100%;
}
Expand Down
6 changes: 5 additions & 1 deletion components/viewer/modal/BackpackModal.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<template>
<ModalDialog :show="isBackpackVisible" @close="toggleBackpack(false)">
<ModalDialog
:show="isBackpackVisible"
size="modal-80"
@close="toggleBackpack(false)"
>
<template #header>
<h5 class="m-0">Choices</h5>
</template>
Expand Down
13 changes: 11 additions & 2 deletions components/viewer/modal/SearchModal.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<template>
<ModalDialog :show="isSearchVisible" @close="toggleSearch(false)">
<ModalDialog
:show="isSearchVisible"
size="modal-80"
@close="toggleSearch(false)"
>
<template #header>
<h5 class="m-0">Search</h5>
</template>
Expand Down Expand Up @@ -51,6 +55,7 @@
import { debounce } from 'perfect-debounce';
import { all, any, includes, isEmpty } from 'ramda';
import ModalDialog from '~/components/utils/ModalDialog.vue';
import type { Project, ProjectObj, ProjectRow } from '~/composables/project';
import { useProjectRefs } from '~/composables/store/project';
import { useViewerRefs, useViewerStore } from '~/composables/store/viewer';
Expand Down Expand Up @@ -169,6 +174,10 @@ const preview = (obj: ProjectObj, row: ProjectRow) => {
<style scoped lang="scss">
@import '~/assets/css/bootstrap/config';
.modal-80 {
width: 80%;
}
.search-modal {
flex: 1 1 auto;
display: grid;
Expand All @@ -184,7 +193,7 @@ const preview = (obj: ProjectObj, row: ProjectRow) => {
&.show-view {
grid-template:
'header header' auto
'list view' auto
'list view' 1fr
/ 2fr 1fr;
}
Expand Down

0 comments on commit 88726e9

Please sign in to comment.