@quazardous/qdadm 2.36.1 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/styles/qdadm.css +1 -1
- package/package.json +8 -2
- package/src/components/editors/yaml/VanillaYamlEditor.vue +146 -0
- package/src/components/editors/yaml/YamlConfigEditor.vue +353 -0
- package/src/components/editors/yaml/yamlConfigAdapter.ts +141 -0
- package/src/components/index.ts +1 -0
- package/src/components/layout/AppBanner.vue +226 -0
- package/src/components/layout/AppLayout.vue +14 -5
- package/src/components/layout/BaseLayout.vue +10 -2
- package/src/components/pages/LoginPage.vue +5 -0
- package/src/composables/index.ts +12 -0
- package/src/composables/useAppBanner.ts +145 -0
- package/src/composables/useNavigation.ts +5 -6
- package/src/editors/yaml.ts +24 -0
- package/src/i18n/defaults/core.en.generated.ts +50 -0
- package/src/i18n/defaults/core.en.yml +50 -0
- package/src/i18n/defaults/core.fr.generated.ts +50 -0
- package/src/i18n/defaults/core.fr.yml +50 -0
- package/src/index.ts +12 -0
- package/src/kernel/Kernel.types.ts +3 -0
- package/src/kernel/KernelContext.types.ts +1 -1
- package/src/module/moduleRegistry.ts +1 -1
- package/src/plugin.ts +3 -0
- package/src/styles/_alerts.scss +8 -0
- package/src/styles/_yaml-editor.scss +111 -0
- package/src/styles/index.scss +1 -0
|
@@ -185,6 +185,56 @@ core:
|
|
|
185
185
|
justNow: just now
|
|
186
186
|
minutesAgo: "{count}m ago"
|
|
187
187
|
hoursAgo: "{count}h ago"
|
|
188
|
+
# AppBanner (#4200)
|
|
189
|
+
banner:
|
|
190
|
+
label: Environment notice
|
|
191
|
+
previous: Previous message
|
|
192
|
+
next: Next message
|
|
193
|
+
position: "{index} of {count}"
|
|
194
|
+
close: Close this message
|
|
195
|
+
# VanillaYamlEditor and YamlConfigEditor (#4303)
|
|
196
|
+
yamlEditor:
|
|
197
|
+
text: Text
|
|
198
|
+
tree: Form
|
|
199
|
+
modes: View
|
|
200
|
+
syntaxBlocked: Fix the syntax errors before switching to the form
|
|
201
|
+
syntaxErrors: "{count} syntax error | {count} syntax errors"
|
|
202
|
+
addItem: Add item
|
|
203
|
+
addKey: Add
|
|
204
|
+
newKey: new key
|
|
205
|
+
remove: Remove
|
|
206
|
+
rename: Key name
|
|
207
|
+
empty: (empty)
|
|
208
|
+
alias: An alias, edit it in the text view
|
|
209
|
+
count: "{count} entry | {count} entries"
|
|
210
|
+
loading: Loading
|
|
211
|
+
loadError: "Could not load: {message}"
|
|
212
|
+
readOnly: Read only
|
|
213
|
+
unsaved: Unsaved changes
|
|
214
|
+
upToDate: Up to date
|
|
215
|
+
check: Check
|
|
216
|
+
checkOk: No problem found
|
|
217
|
+
problems: "{count} problem | {count} problems"
|
|
218
|
+
save: Save…
|
|
219
|
+
review: Review the change
|
|
220
|
+
noChange: Nothing changed
|
|
221
|
+
reason: Reason
|
|
222
|
+
reasonPlaceholder: Why this change? It goes into the history.
|
|
223
|
+
confirmSave: Save
|
|
224
|
+
saved: Saved
|
|
225
|
+
saveError: "Could not save: {message}"
|
|
226
|
+
cancel: Cancel
|
|
227
|
+
revert: Discard changes
|
|
228
|
+
before: Before
|
|
229
|
+
after: After
|
|
230
|
+
history: History
|
|
231
|
+
historyEmpty: No history yet
|
|
232
|
+
restore: Load this version
|
|
233
|
+
restored: "Version {revision} loaded: review and save it to restore it"
|
|
234
|
+
conflictTitle: Changed meanwhile
|
|
235
|
+
conflictText: Someone saved this document after you opened it. Their version is on the left, yours on the right.
|
|
236
|
+
takeTheirs: Load their version
|
|
237
|
+
keepMine: Keep mine and save over it
|
|
188
238
|
# NotFoundPage
|
|
189
239
|
notFound:
|
|
190
240
|
title: Page not found
|
|
@@ -187,6 +187,56 @@ export default `core:
|
|
|
187
187
|
justNow: à l'instant
|
|
188
188
|
minutesAgo: "il y a {count} min"
|
|
189
189
|
hoursAgo: "il y a {count} h"
|
|
190
|
+
# AppBanner (#4200)
|
|
191
|
+
banner:
|
|
192
|
+
label: Bandeau d'information
|
|
193
|
+
previous: Message précédent
|
|
194
|
+
next: Message suivant
|
|
195
|
+
position: "{index} sur {count}"
|
|
196
|
+
close: Fermer ce message
|
|
197
|
+
# VanillaYamlEditor and YamlConfigEditor (#4303)
|
|
198
|
+
yamlEditor:
|
|
199
|
+
text: Texte
|
|
200
|
+
tree: Formulaire
|
|
201
|
+
modes: Vue
|
|
202
|
+
syntaxBlocked: Corrigez les erreurs de syntaxe avant de passer au formulaire
|
|
203
|
+
syntaxErrors: "{count} erreur de syntaxe | {count} erreurs de syntaxe"
|
|
204
|
+
addItem: Ajouter un élément
|
|
205
|
+
addKey: Ajouter
|
|
206
|
+
newKey: nouvelle clé
|
|
207
|
+
remove: Retirer
|
|
208
|
+
rename: Nom de la clé
|
|
209
|
+
empty: (vide)
|
|
210
|
+
alias: Un alias, à modifier dans la vue texte
|
|
211
|
+
count: "{count} entrée | {count} entrées"
|
|
212
|
+
loading: Chargement
|
|
213
|
+
loadError: "Chargement impossible : {message}"
|
|
214
|
+
readOnly: Lecture seule
|
|
215
|
+
unsaved: Modifications non enregistrées
|
|
216
|
+
upToDate: À jour
|
|
217
|
+
check: Vérifier
|
|
218
|
+
checkOk: Aucun problème trouvé
|
|
219
|
+
problems: "{count} problème | {count} problèmes"
|
|
220
|
+
save: Enregistrer…
|
|
221
|
+
review: Relire la modification
|
|
222
|
+
noChange: Rien n'a changé
|
|
223
|
+
reason: Motif
|
|
224
|
+
reasonPlaceholder: Pourquoi ce changement ? Il figure dans l'historique.
|
|
225
|
+
confirmSave: Enregistrer
|
|
226
|
+
saved: Enregistré
|
|
227
|
+
saveError: "Enregistrement impossible : {message}"
|
|
228
|
+
cancel: Annuler
|
|
229
|
+
revert: Abandonner les modifications
|
|
230
|
+
before: Avant
|
|
231
|
+
after: Après
|
|
232
|
+
history: Historique
|
|
233
|
+
historyEmpty: Pas encore d'historique
|
|
234
|
+
restore: Charger cette version
|
|
235
|
+
restored: "Version {revision} chargée : relisez-la et enregistrez-la pour la restaurer"
|
|
236
|
+
conflictTitle: Modifié entre-temps
|
|
237
|
+
conflictText: Quelqu'un a enregistré ce document après votre ouverture. Sa version est à gauche, la vôtre à droite.
|
|
238
|
+
takeTheirs: Charger sa version
|
|
239
|
+
keepMine: Garder la mienne et l'enregistrer par-dessus
|
|
190
240
|
# NotFoundPage
|
|
191
241
|
notFound:
|
|
192
242
|
title: Page introuvable
|
|
@@ -185,6 +185,56 @@ core:
|
|
|
185
185
|
justNow: à l'instant
|
|
186
186
|
minutesAgo: "il y a {count} min"
|
|
187
187
|
hoursAgo: "il y a {count} h"
|
|
188
|
+
# AppBanner (#4200)
|
|
189
|
+
banner:
|
|
190
|
+
label: Bandeau d'information
|
|
191
|
+
previous: Message précédent
|
|
192
|
+
next: Message suivant
|
|
193
|
+
position: "{index} sur {count}"
|
|
194
|
+
close: Fermer ce message
|
|
195
|
+
# VanillaYamlEditor and YamlConfigEditor (#4303)
|
|
196
|
+
yamlEditor:
|
|
197
|
+
text: Texte
|
|
198
|
+
tree: Formulaire
|
|
199
|
+
modes: Vue
|
|
200
|
+
syntaxBlocked: Corrigez les erreurs de syntaxe avant de passer au formulaire
|
|
201
|
+
syntaxErrors: "{count} erreur de syntaxe | {count} erreurs de syntaxe"
|
|
202
|
+
addItem: Ajouter un élément
|
|
203
|
+
addKey: Ajouter
|
|
204
|
+
newKey: nouvelle clé
|
|
205
|
+
remove: Retirer
|
|
206
|
+
rename: Nom de la clé
|
|
207
|
+
empty: (vide)
|
|
208
|
+
alias: Un alias, à modifier dans la vue texte
|
|
209
|
+
count: "{count} entrée | {count} entrées"
|
|
210
|
+
loading: Chargement
|
|
211
|
+
loadError: "Chargement impossible : {message}"
|
|
212
|
+
readOnly: Lecture seule
|
|
213
|
+
unsaved: Modifications non enregistrées
|
|
214
|
+
upToDate: À jour
|
|
215
|
+
check: Vérifier
|
|
216
|
+
checkOk: Aucun problème trouvé
|
|
217
|
+
problems: "{count} problème | {count} problèmes"
|
|
218
|
+
save: Enregistrer…
|
|
219
|
+
review: Relire la modification
|
|
220
|
+
noChange: Rien n'a changé
|
|
221
|
+
reason: Motif
|
|
222
|
+
reasonPlaceholder: Pourquoi ce changement ? Il figure dans l'historique.
|
|
223
|
+
confirmSave: Enregistrer
|
|
224
|
+
saved: Enregistré
|
|
225
|
+
saveError: "Enregistrement impossible : {message}"
|
|
226
|
+
cancel: Annuler
|
|
227
|
+
revert: Abandonner les modifications
|
|
228
|
+
before: Avant
|
|
229
|
+
after: Après
|
|
230
|
+
history: Historique
|
|
231
|
+
historyEmpty: Pas encore d'historique
|
|
232
|
+
restore: Charger cette version
|
|
233
|
+
restored: "Version {revision} chargée : relisez-la et enregistrez-la pour la restaurer"
|
|
234
|
+
conflictTitle: Modifié entre-temps
|
|
235
|
+
conflictText: Quelqu'un a enregistré ce document après votre ouverture. Sa version est à gauche, la vôtre à droite.
|
|
236
|
+
takeTheirs: Charger sa version
|
|
237
|
+
keepMine: Garder la mienne et l'enregistrer par-dessus
|
|
188
238
|
# NotFoundPage
|
|
189
239
|
notFound:
|
|
190
240
|
title: Page introuvable
|
package/src/index.ts
CHANGED
|
@@ -369,6 +369,18 @@ export {
|
|
|
369
369
|
type BannerSeverity,
|
|
370
370
|
type BannerStore,
|
|
371
371
|
} from './composables/useInfoBanner'
|
|
372
|
+
export {
|
|
373
|
+
useAppBanner,
|
|
374
|
+
getAppBannerStore,
|
|
375
|
+
createAppBannerStore,
|
|
376
|
+
type AppBannerMessage,
|
|
377
|
+
type AppBannerSeverity,
|
|
378
|
+
type AppBannerConfig,
|
|
379
|
+
type AppBannerInput,
|
|
380
|
+
type AppBannerEntry,
|
|
381
|
+
type AppBannerStore,
|
|
382
|
+
type UseAppBannerReturn,
|
|
383
|
+
} from './composables/useAppBanner'
|
|
372
384
|
export {
|
|
373
385
|
useUserImpersonator,
|
|
374
386
|
type UseUserImpersonatorOptions,
|
|
@@ -15,6 +15,7 @@ import type { I18nOptions } from '../i18n/types'
|
|
|
15
15
|
import type { ApiClientSource } from '../api/apiClient'
|
|
16
16
|
import type { RouteStatePersister } from '../routeState'
|
|
17
17
|
import type { UserAvatarResolver } from '../composables/useUserBox'
|
|
18
|
+
import type { AppBannerConfig } from '../composables/useAppBanner'
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Auth adapter interface (app-level authentication)
|
|
@@ -50,6 +51,8 @@ export interface AppConfig {
|
|
|
50
51
|
userRoute?: RouteLocationRaw | string
|
|
51
52
|
/** The sidebar avatar picture; default `user.avatar` or `user.avatarUrl`, initials when none (#4157). */
|
|
52
53
|
userAvatar?: UserAvatarResolver
|
|
54
|
+
/** The strip above the layout and the login page: one message, a list, or a function returning either (#4200). */
|
|
55
|
+
banner?: AppBannerConfig
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
/**
|
|
@@ -96,7 +96,7 @@ export interface NavItem {
|
|
|
96
96
|
href?: string
|
|
97
97
|
/** Where an `href` entry opens: default `_blank` for an absolute URL, same tab otherwise. */
|
|
98
98
|
target?: string
|
|
99
|
-
/**
|
|
99
|
+
/** The entry is shown only to whoever is granted this attribute (`route` or `href`). */
|
|
100
100
|
permission?: string
|
|
101
101
|
label: string
|
|
102
102
|
icon?: string
|
|
@@ -82,7 +82,7 @@ export interface NavItem {
|
|
|
82
82
|
href?: string
|
|
83
83
|
/** Where an `href` entry opens: default `_blank` for an absolute URL, same tab otherwise. */
|
|
84
84
|
target?: string
|
|
85
|
-
/**
|
|
85
|
+
/** The entry is shown only to whoever is granted this attribute (`route` or `href`). */
|
|
86
86
|
permission?: string
|
|
87
87
|
label: string
|
|
88
88
|
icon?: string
|
package/src/plugin.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import type { App } from 'vue'
|
|
8
8
|
import type { Router, RouteLocationNormalized, RouteLocationRaw, NavigationGuardNext } from 'vue-router'
|
|
9
9
|
import type { UserAvatarResolver } from './composables/useUserBox'
|
|
10
|
+
import type { AppBannerConfig } from './composables/useAppBanner'
|
|
10
11
|
import { Orchestrator } from './orchestrator/Orchestrator'
|
|
11
12
|
import { EntityManager } from './entity/EntityManager'
|
|
12
13
|
import qdadmLogo from './assets/logo.svg'
|
|
@@ -62,6 +63,8 @@ export interface AppConfig {
|
|
|
62
63
|
userRoute?: RouteLocationRaw | null
|
|
63
64
|
/** The sidebar avatar picture (#4157). */
|
|
64
65
|
userAvatar?: UserAvatarResolver | null
|
|
66
|
+
/** The strip above the layout and the login page (#4200). */
|
|
67
|
+
banner?: AppBannerConfig
|
|
65
68
|
[key: string]: unknown
|
|
66
69
|
}
|
|
67
70
|
|
package/src/styles/_alerts.scss
CHANGED
|
@@ -93,3 +93,11 @@
|
|
|
93
93
|
font-weight: 600;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
+
|
|
97
|
+
// Top toasts start below the AppBanner strip, not over its buttons (#4200).
|
|
98
|
+
// PrimeVue sets the toast's top inline, hence !important.
|
|
99
|
+
.p-toast.p-toast-top-right,
|
|
100
|
+
.p-toast.p-toast-top-left,
|
|
101
|
+
.p-toast.p-toast-top-center {
|
|
102
|
+
top: calc(var(--qd-banner-height, 0px) + 20px) !important;
|
|
103
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VanillaYamlEditor (#4303): the vanilla-yamleditor variables mapped to the
|
|
3
|
+
* PrimeVue theme, light and dark (.dark-mode).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.qd-yaml-editor .vye {
|
|
7
|
+
--vye-font: inherit;
|
|
8
|
+
--vye-bg: var(--p-content-background, #fff);
|
|
9
|
+
--vye-fg: var(--p-text-color, #1f2937);
|
|
10
|
+
--vye-muted: var(--p-text-muted-color, #6b7280);
|
|
11
|
+
--vye-border: var(--p-content-border-color, #e5e7eb);
|
|
12
|
+
--vye-panel: var(--p-surface-50, #f8fafc);
|
|
13
|
+
--vye-gutter-bg: var(--p-surface-50, #f8fafc);
|
|
14
|
+
--vye-accent: var(--p-primary-color, #3b82f6);
|
|
15
|
+
--vye-accent-fg: var(--p-primary-contrast-color, #fff);
|
|
16
|
+
--vye-input-bg: var(--p-form-field-background, #fff);
|
|
17
|
+
--vye-radius: var(--p-form-field-border-radius, 6px);
|
|
18
|
+
--vye-error: var(--p-red-600, #dc2626);
|
|
19
|
+
--vye-error-bg: var(--p-red-50, #fef2f2);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dark-mode .qd-yaml-editor .vye {
|
|
23
|
+
--vye-panel: var(--p-surface-800, #1e293b);
|
|
24
|
+
--vye-gutter-bg: var(--p-surface-800, #1e293b);
|
|
25
|
+
--vye-error: var(--p-red-400, #f87171);
|
|
26
|
+
--vye-error-bg: color-mix(in srgb, var(--p-red-400, #f87171) 12%, transparent);
|
|
27
|
+
--vye-active-line: rgba(147, 197, 253, 0.07);
|
|
28
|
+
--vye-tok-key: #93c5fd;
|
|
29
|
+
--vye-tok-string: #86efac;
|
|
30
|
+
--vye-tok-number: #fcd34d;
|
|
31
|
+
--vye-tok-bool: #d8b4fe;
|
|
32
|
+
--vye-tok-comment: #9ca3af;
|
|
33
|
+
--vye-tok-meta: #f9a8d4;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* YamlConfigEditor */
|
|
37
|
+
.qd-yaml-config {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: 0.5rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.qd-yaml-config-bar {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-wrap: wrap;
|
|
46
|
+
align-items: center;
|
|
47
|
+
gap: 0.5rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.qd-yaml-config-state {
|
|
51
|
+
margin-right: auto;
|
|
52
|
+
color: var(--p-text-muted-color);
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.qd-yaml-config-state--dirty {
|
|
57
|
+
color: var(--p-orange-600, #ea580c);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.qd-yaml-config-reason {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: 0.35rem;
|
|
64
|
+
margin-top: 0.75rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.qd-yaml-history {
|
|
68
|
+
display: grid;
|
|
69
|
+
grid-template-columns: minmax(12rem, 18rem) 1fr;
|
|
70
|
+
gap: 0.75rem;
|
|
71
|
+
min-height: 20rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.qd-yaml-history-list {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
gap: 0.25rem;
|
|
78
|
+
overflow: auto;
|
|
79
|
+
max-height: 32rem;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.qd-yaml-history-entry {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
align-items: flex-start;
|
|
86
|
+
gap: 0.15rem;
|
|
87
|
+
padding: 0.5rem;
|
|
88
|
+
border: 1px solid var(--p-content-border-color);
|
|
89
|
+
border-radius: 6px;
|
|
90
|
+
background: transparent;
|
|
91
|
+
color: inherit;
|
|
92
|
+
font: inherit;
|
|
93
|
+
text-align: left;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.qd-yaml-history-entry--active {
|
|
98
|
+
border-color: var(--p-primary-color);
|
|
99
|
+
background: color-mix(in srgb, var(--p-primary-color) 8%, transparent);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.qd-yaml-history-meta {
|
|
103
|
+
color: var(--p-text-muted-color);
|
|
104
|
+
font-size: 0.8125rem;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media (max-width: 767px) {
|
|
108
|
+
.qd-yaml-history {
|
|
109
|
+
grid-template-columns: 1fr;
|
|
110
|
+
}
|
|
111
|
+
}
|