Skip to content

Commit 1ad210d

Browse files
committed
chore: Update q-drawer in default.vue to include breakpoint option for responsiveness
1 parent 38be499 commit 1ad210d

File tree

4 files changed

+55
-50
lines changed

4 files changed

+55
-50
lines changed

src/app.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<template>
2+
<NuxtLoadingIndicator />
23
<NuxtLayout>
34
<NuxtPage />
45
</NuxtLayout>

src/components/2pan/index.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ q-splitter(
1515
selection="multiple"
1616
v-model:selected="selected"
1717
v-model:pagination="pagination"
18+
:hide-pagination="hidePagination"
1819
:rows="data"
1920
:visible-columns="visibleColumnsInternal"
2021
:row-key="rowKey"
@@ -42,7 +43,7 @@ q-splitter(
4243
slot(name="top-right-btn-grp")
4344
slot(name="top-right-btn-grp-content-before")
4445
sesame-2pan-btns-add(@add="add" v-if="crud.create")
45-
q-btn.desktop-only(flat :icon="isSimple ? 'mdi-table-border' : 'mdi-table-merge-cells'" color="info" @click="simple = !simple")
46+
q-btn.desktop-only(v-if="!hidePanModeSwitch" flat :icon="isSimple ? 'mdi-table-border' : 'mdi-table-merge-cells'" color="info" @click="simple = !simple")
4647
q-tooltip.text-body2(transition-show="scale" transition-hide="scale") Mode simple/double panneaux
4748
q-btn(flat icon="mdi-table-headers-eye" color="info")
4849
q-tooltip.text-body2(transition-show="scale" transition-hide="scale") Afficher/cacher des colonnes
@@ -127,6 +128,14 @@ const props = defineProps({
127128
type: Boolean,
128129
default: false,
129130
},
131+
hidePagination: {
132+
type: Boolean,
133+
default: false,
134+
},
135+
hidePanModeSwitch: {
136+
type: Boolean,
137+
default: false,
138+
},
130139
rowKey: {
131140
type: String,
132141
default: '_id',

src/components/settings/agents.vue

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<template lang="pug">
22
q-page.container
3-
.q-px-md
4-
sesame-searchfilters(:fields="fieldsList")
5-
template(#rightSelect)
6-
div
3+
//- .q-px-md
4+
//- sesame-searchfilters(:fields="fieldsList")
5+
//- template(#rightSelect)
6+
//- div
77
88
sesame-2pan(
99
:simple="true"
@@ -13,14 +13,15 @@ q-page.container
1313
:visibleColumns="visibleColumns"
1414
:fieldsList="fieldsList"
1515
:selected="selected"
16-
:pagination="pagination"
1716
:pending="pending"
1817
:refresh="refreshEvent"
1918
:error="error"
2019
:titleKey=["username"]
2120
:crud="crud"
2221
:actions="actions"
2322
:defaultRightPanelButton="true"
23+
hide-pagination
24+
hidePanModeSwitch
2425
)
2526
//- template(#top-left)
2627
//- sesame-table-top-left(:selected="selected" @updateLifestep="updateLifestep($event)" @clear="selected = []")
@@ -44,7 +45,7 @@ q-page.container
4445
</template>
4546

4647
<script lang="ts" setup>
47-
import usePagination from '~/composables/usePagination'
48+
// import usePagination from '~/composables/usePagination'
4849
import useAgentsSchema from '~/composables/useAgentsSchema'
4950
import { ref, provide, watch, computed } from 'vue'
5051
import { useFetch, useRoute, useRouter } from 'nuxt/app'
@@ -71,16 +72,16 @@ const $q = useQuasar()
7172
const { handleError } = useErrorHandling()
7273
const form = ref<any>(null)
7374
74-
onMounted(() => {
75-
initializePagination(agents.value?.total)
76-
})
75+
// onMounted(() => {
76+
// // initializePagination(agents.value?.total)
77+
// })
7778
78-
const { pagination, onRequest, initializePagination } = usePagination()
79+
// const { pagination, onRequest, initializePagination } = usePagination()
7980
80-
const queryWithoutRead = computed(() => {
81-
const { read, ...rest } = route.query
82-
return rest
83-
})
81+
// const queryWithoutRead = computed(() => {
82+
// const { read, ...rest } = route.query
83+
// return rest
84+
// })
8485
8586
const {
8687
data: agents,
@@ -89,7 +90,9 @@ const {
8990
error,
9091
} = await useHttp<Response>('/core/agents', {
9192
method: 'get',
92-
query: queryWithoutRead
93+
query: {
94+
limit: 99999,
95+
},
9396
})
9497
9598
if (error.value) {

src/components/settings/settings.vue

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,20 @@
22

33
<div class="q-pa-md">
44
<q-layout view="hHh Lpr lff" container style="height: 800px" class="shadow-2 rounded-borders">
5-
<q-header elevated :class="bg-primary">
5+
<q-header elevated class="bg-primary">
66
<q-toolbar>
7-
<q-btn flat @click="drawer = !drawer" round dense icon="mdi-menu"/>
7+
<q-btn flat @click="drawer = !drawer" round dense icon="mdi-menu" />
88
<q-toolbar-title>Paramètres</q-toolbar-title>
9-
<q-btn icon="mdi-close" flat round dense v-close-popup/>
9+
<q-btn icon="mdi-close" flat round dense v-close-popup />
1010
</q-toolbar>
1111
</q-header>
12-
<q-drawer
13-
v-model="drawer"
14-
show-if-above
15-
:width="200"
16-
:breakpoint="500"
17-
bordered
18-
:class="$q.dark.isActive ? 'bg-grey-9' : 'bg-grey-3'"
19-
>
12+
<q-drawer v-model="drawer" show-if-above :width="200" :breakpoint="500" bordered
13+
:class="$q.dark.isActive ? 'bg-grey-9' : 'bg-grey-3'">
2014
<q-scroll-area class="fit">
2115
<q-list>
2216
<q-item clickable @click="onAgents">
2317
<q-item-section avatar>
24-
<q-icon name="mdi-account"/>
18+
<q-icon name="mdi-account" />
2519
</q-item-section>
2620
<q-item-section>
2721
Utilisateurs
@@ -31,7 +25,7 @@
3125
<q-list>
3226
<q-item clickable @click="onPassPolicy">
3327
<q-item-section avatar>
34-
<q-icon name="mdi-form-textbox-password"/>
28+
<q-icon name="mdi-form-textbox-password" />
3529
</q-item-section>
3630
<q-item-section>
3731
Politique de mot de passe
@@ -41,7 +35,7 @@
4135
<q-list>
4236
<q-item clickable @click="onSmtp">
4337
<q-item-section avatar>
44-
<q-icon name="mdi-mail"/>
38+
<q-icon name="mdi-mail" />
4539
</q-item-section>
4640
<q-item-section>
4741
Serveur SMTP
@@ -51,7 +45,7 @@
5145
<q-list>
5246
<q-item clickable @click="onSms">
5347
<q-item-section avatar>
54-
<q-icon name="mdi-message-processing"/>
48+
<q-icon name="mdi-message-processing" />
5549
</q-item-section>
5650
<q-item-section>
5751
Serveur SMS
@@ -76,36 +70,34 @@
7670
</template>
7771

7872
<script setup>
79-
import {ref} from "vue";
73+
import { ref } from "vue";
8074
const drawer = ref(false)
81-
const agent=ref(false)
82-
const passPolicy=ref(false)
83-
const smtp=ref(false)
84-
const sms=ref(false)
75+
const agent = ref(true)
76+
const passPolicy = ref(false)
77+
const smtp = ref(false)
78+
const sms = ref(false)
8579
function onAgents() {
8680
resetMenu()
87-
agent.value=true
81+
agent.value = true
8882
}
89-
function onSmtp(){
83+
function onSmtp() {
9084
resetMenu()
91-
smtp.value=true
85+
smtp.value = true
9286
}
93-
function onSms(){
87+
function onSms() {
9488
resetMenu()
95-
sms.value=true
89+
sms.value = true
9690
}
9791
function onPassPolicy() {
9892
resetMenu()
99-
passPolicy.value=true
93+
passPolicy.value = true
10094
}
101-
function resetMenu(){
102-
agent.value=false
103-
passPolicy.value=false
104-
smtp.value=false
105-
sms.value=false
95+
function resetMenu() {
96+
agent.value = false
97+
passPolicy.value = false
98+
smtp.value = false
99+
sms.value = false
106100
}
107101
</script>
108102

109-
<style scoped>
110-
111-
</style>
103+
<style scoped></style>

0 commit comments

Comments
 (0)