Skip to content

Commit 05268c2

Browse files
committed
refactor: restructure settings components and pages
- Removed individual settings components (password-policy.vue, sms.vue, smtp.vue) and integrated their functionality into the new settings page structure. - Created a unified settings page (settings.vue) that utilizes a dialog layout for better navigation and organization. - Implemented routing for settings options, allowing users to navigate between agents, password policy, SMTP, and SMS settings. - Updated the password policy component to handle parameters and save functionality directly within the new settings page. - Enhanced user experience by maintaining a consistent layout and design across all settings options.
1 parent b36a68d commit 05268c2

File tree

7 files changed

+63
-104
lines changed

7 files changed

+63
-104
lines changed

apps/web/src/components/appbar/RightButtons.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ div
44
q-tooltip.text-body2(transition-show="scale" transition-hide="scale") {{ button.name }}
55
66
q-btn(v-if="badgesValues.TO_SYNC > 0" icon="mdi-sync" square color="amber-9" size="md" :label="badgesValues.TO_SYNC +' items à Synchroniser'" @click="syncAll")
7-
q-btn( icon="mdi-cog" size="md" flat @click="displaySettings")
7+
q-btn( icon="mdi-cog" size="md" flat @click="$router.push('/settings/agents')" )
88
q-btn( @click="toogleDark" flat size="md" icon="mdi-theme-light-dark")
99
q-btn-dropdown(icon="mdi-account-circle-outline" :label="auth?.user?.displayName" round flat size="md")
1010
q-list

apps/web/src/components/settings/settings.vue

Lines changed: 0 additions & 103 deletions
This file was deleted.

apps/web/src/pages/settings.vue

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<template>
2+
<q-dialog :model-value="true" full-width persistent>
3+
<div class="q-pa-md">
4+
<q-layout view="hHh Lpr lff" container style="height: 800px" class="shadow-2 rounded-borders">
5+
<q-header elevated class="bg-primary">
6+
<q-toolbar>
7+
<q-btn flat @click="drawer = !drawer" round dense icon="mdi-menu" />
8+
<q-toolbar-title>Paramètres</q-toolbar-title>
9+
<q-btn icon="mdi-close" flat round dense @click="$router.push('/')" />
10+
</q-toolbar>
11+
</q-header>
12+
<q-drawer v-model="drawer" show-if-above :width="200" :breakpoint="500" bordered :class="$q.dark.isActive ? 'bg-grey-9' : 'bg-grey-3'">
13+
<q-scroll-area class="fit">
14+
<q-list>
15+
<q-item clickable @click="$router.push('/settings/agents')">
16+
<q-item-section avatar>
17+
<q-icon name="mdi-account" />
18+
</q-item-section>
19+
<q-item-section> Utilisateurs </q-item-section>
20+
</q-item>
21+
</q-list>
22+
<q-list>
23+
<q-item clickable @click="$router.push('/settings/password-policy')">
24+
<q-item-section avatar>
25+
<q-icon name="mdi-form-textbox-password" />
26+
</q-item-section>
27+
<q-item-section> Politique de mot de passe </q-item-section>
28+
</q-item>
29+
</q-list>
30+
<q-list>
31+
<q-item clickable @click="$router.push('/settings/smtp')">
32+
<q-item-section avatar>
33+
<q-icon name="mdi-mail" />
34+
</q-item-section>
35+
<q-item-section> Serveur SMTP </q-item-section>
36+
</q-item>
37+
</q-list>
38+
<q-list>
39+
<q-item clickable @click="$router.push('/settings/sms')">
40+
<q-item-section avatar>
41+
<q-icon name="mdi-message-processing" />
42+
</q-item-section>
43+
<q-item-section> Serveur SMS </q-item-section>
44+
</q-item>
45+
</q-list>
46+
</q-scroll-area>
47+
</q-drawer>
48+
49+
<q-page-container>
50+
<q-page padding :class="$q.dark.isActive ? 'bg-black' : 'bg-white'">
51+
<nuxt-page></nuxt-page>
52+
</q-page>
53+
</q-page-container>
54+
</q-layout>
55+
</div>
56+
</q-dialog>
57+
</template>
58+
59+
<script setup>
60+
import { ref } from 'vue'
61+
const drawer = ref(false)
62+
</script>
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)