@dracul/customize-frontend 1.14.5 → 1.14.6
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/package.json +3 -3
- package/src/components/TitleToolbar/TitleToolbar.vue +15 -12
- package/src/i18n/messages.js +6 -3
- package/src/pages/CustomConfigPage/CustomizationManagement/CustomizationColors/ColorsPreview.vue +0 -4
- package/src/pages/CustomConfigPage/CustomizationManagement/CustomizationColors/CustomizationColors.vue +111 -77
- package/src/pages/CustomConfigPage/CustomizationManagement/CustomizationManagement.vue +2 -1
- package/src/providers/gql/colorsUpdate.graphql +2 -0
- package/src/providers/gql/customization.graphql +2 -0
- package/src/providers/gql/customizationUpdate.graphql +2 -0
- package/src/storage/CustomizationStore.js +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dracul/customize-frontend",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.6",
|
|
4
4
|
"description": "vue custom logo, custom theme, custom colors, i18n configuration}",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
],
|
|
19
19
|
"author": "Cristian Incarnato",
|
|
20
20
|
"license": "MIT",
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "cb631e7c204af66a26d5d2c3886bbcba6e73ea8c",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@dracul/common-frontend": "^1.14.2",
|
|
24
|
-
"@dracul/user-frontend": "^1.14.
|
|
24
|
+
"@dracul/user-frontend": "^1.14.6"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"apollo-cache-inmemory": "^1.6.6",
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
<router-link to="/" class="text-decoration-none">
|
|
4
|
+
<v-toolbar-title class="ml-2" :class="color">
|
|
5
|
+
<b>{{ getLogo.title }}</b>
|
|
6
|
+
</v-toolbar-title>
|
|
7
|
+
</router-link>
|
|
8
8
|
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script>
|
|
12
|
-
|
|
12
|
+
import {mapGetters} from 'vuex'
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
export default {
|
|
15
|
+
name: "TitleToolbar",
|
|
16
|
+
props: {
|
|
17
|
+
color: {type: String, default: 'onAppBar--text'}
|
|
18
|
+
},
|
|
19
|
+
computed: {
|
|
20
|
+
...mapGetters(['getLogo'])
|
|
21
|
+
}
|
|
22
|
+
}
|
|
20
23
|
</script>
|
package/src/i18n/messages.js
CHANGED
|
@@ -16,7 +16,8 @@ const messages = {
|
|
|
16
16
|
secondary: 'Secondary',
|
|
17
17
|
onSecondary: 'On Secondary',
|
|
18
18
|
background: 'Background',
|
|
19
|
-
appBar: 'AppBar'
|
|
19
|
+
appBar: 'AppBar',
|
|
20
|
+
onAppBar: 'On AppBar',
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
},
|
|
@@ -72,7 +73,8 @@ const messages = {
|
|
|
72
73
|
secondary: 'Secundario',
|
|
73
74
|
onSecondary: 'En Secundario',
|
|
74
75
|
background: 'Fondo',
|
|
75
|
-
appBar: 'AppBar'
|
|
76
|
+
appBar: 'AppBar',
|
|
77
|
+
onAppBar: 'En AppBar',
|
|
76
78
|
},
|
|
77
79
|
lang: {
|
|
78
80
|
title: 'Idioma',
|
|
@@ -125,7 +127,8 @@ const messages = {
|
|
|
125
127
|
secondary: 'Secundário',
|
|
126
128
|
onSecondary: 'No secundário',
|
|
127
129
|
background: 'Fondo',
|
|
128
|
-
appBar: 'AppBar'
|
|
130
|
+
appBar: 'AppBar',
|
|
131
|
+
onAppBar: 'On AppBar',
|
|
129
132
|
},
|
|
130
133
|
lang: {
|
|
131
134
|
title: 'Linguagem',
|
package/src/pages/CustomConfigPage/CustomizationManagement/CustomizationColors/ColorsPreview.vue
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-row no-gutters justify="center" align-content="center">
|
|
3
|
-
<v-col cols="12" md="4" lg="4">
|
|
4
2
|
<v-card class="pa-3" :style="{backgroundColor: background}">
|
|
5
3
|
<v-card-title class="mb-3 justify-center" :style="{background: appBar, color: primary}">
|
|
6
4
|
<div v-t="'customization.preview'"></div>
|
|
@@ -17,8 +15,6 @@
|
|
|
17
15
|
|
|
18
16
|
</v-card-text>
|
|
19
17
|
</v-card>
|
|
20
|
-
</v-col>
|
|
21
|
-
</v-row>
|
|
22
18
|
</template>
|
|
23
19
|
<script>
|
|
24
20
|
export default {
|
|
@@ -8,10 +8,15 @@
|
|
|
8
8
|
<v-card-subtitle v-t="'customization.colors.lightSubtitle'">
|
|
9
9
|
</v-card-subtitle>
|
|
10
10
|
<v-card-text class="pb-0 ">
|
|
11
|
+
|
|
12
|
+
<v-row>
|
|
13
|
+
<v-col cols="12" sm="7">
|
|
14
|
+
|
|
15
|
+
|
|
11
16
|
<v-form ref="colorsForm" autocomplete="off" @submit.prevent="$emit('save')">
|
|
12
17
|
|
|
13
18
|
<v-row>
|
|
14
|
-
<v-col cols="12" sm="4" md="
|
|
19
|
+
<v-col cols="12" sm="4" md="4" class="pb-0">
|
|
15
20
|
<color-input v-model="formColors.lightTheme.background"
|
|
16
21
|
:label="$t('customization.colors.background')"
|
|
17
22
|
color="secondary"
|
|
@@ -19,7 +24,7 @@
|
|
|
19
24
|
/>
|
|
20
25
|
</v-col>
|
|
21
26
|
|
|
22
|
-
<v-col cols="12" sm="4" md="
|
|
27
|
+
<v-col cols="12" sm="4" md="4" class="pb-0">
|
|
23
28
|
<color-input v-model="formColors.lightTheme.appBar"
|
|
24
29
|
:label="$t('customization.colors.appBar')"
|
|
25
30
|
color="secondary"
|
|
@@ -27,7 +32,15 @@
|
|
|
27
32
|
/>
|
|
28
33
|
</v-col>
|
|
29
34
|
|
|
30
|
-
<v-col cols="12" sm="4" md="
|
|
35
|
+
<v-col cols="12" sm="4" md="4" class="pb-0">
|
|
36
|
+
<color-input v-model="formColors.lightTheme.onAppBar"
|
|
37
|
+
:label="$t('customization.colors.onAppBar')"
|
|
38
|
+
color="secondary"
|
|
39
|
+
:rules="[rules.required]"
|
|
40
|
+
/>
|
|
41
|
+
</v-col>
|
|
42
|
+
|
|
43
|
+
<v-col cols="12" sm="4" md="3" class="pb-0">
|
|
31
44
|
<color-input v-model="formColors.lightTheme.primary"
|
|
32
45
|
:label="$t('customization.colors.primary')"
|
|
33
46
|
color="secondary"
|
|
@@ -35,7 +48,7 @@
|
|
|
35
48
|
/>
|
|
36
49
|
</v-col>
|
|
37
50
|
|
|
38
|
-
<v-col cols="12" sm="4" md="
|
|
51
|
+
<v-col cols="12" sm="4" md="3">
|
|
39
52
|
<color-input v-model="formColors.lightTheme.onPrimary"
|
|
40
53
|
:label="$t('customization.colors.onPrimary')"
|
|
41
54
|
color="secondary"
|
|
@@ -43,7 +56,7 @@
|
|
|
43
56
|
/>
|
|
44
57
|
</v-col>
|
|
45
58
|
|
|
46
|
-
<v-col cols="12" sm="4" md="
|
|
59
|
+
<v-col cols="12" sm="4" md="3">
|
|
47
60
|
<color-input v-model="formColors.lightTheme.secondary"
|
|
48
61
|
:label="$t('customization.colors.secondary')"
|
|
49
62
|
color="secondary"
|
|
@@ -51,7 +64,7 @@
|
|
|
51
64
|
/>
|
|
52
65
|
</v-col>
|
|
53
66
|
|
|
54
|
-
<v-col cols="12" sm="4" md="
|
|
67
|
+
<v-col cols="12" sm="4" md="3">
|
|
55
68
|
<color-input v-model="formColors.lightTheme.onSecondary"
|
|
56
69
|
:label="$t('customization.colors.onSecondary')"
|
|
57
70
|
color="secondary"
|
|
@@ -61,22 +74,25 @@
|
|
|
61
74
|
|
|
62
75
|
</v-row>
|
|
63
76
|
</v-form>
|
|
77
|
+
</v-col>
|
|
64
78
|
|
|
65
|
-
|
|
79
|
+
<v-col cols="12" sm="5">
|
|
80
|
+
<colors-preview
|
|
81
|
+
:background="formColors.lightTheme.background"
|
|
82
|
+
:app-bar="formColors.lightTheme.appBar"
|
|
83
|
+
:primary="formColors.lightTheme.primary"
|
|
84
|
+
:on-primary="formColors.lightTheme.onPrimary"
|
|
85
|
+
:secondary="formColors.lightTheme.secondary"
|
|
86
|
+
:on-secondary="formColors.lightTheme.onSecondary"
|
|
66
87
|
|
|
67
|
-
|
|
88
|
+
/>
|
|
89
|
+
</v-col>
|
|
68
90
|
|
|
69
|
-
|
|
70
|
-
:background="formColors.lightTheme.background"
|
|
71
|
-
:app-bar="formColors.lightTheme.appBar"
|
|
72
|
-
:primary="formColors.lightTheme.primary"
|
|
73
|
-
:on-primary="formColors.lightTheme.onPrimary"
|
|
74
|
-
:secondary="formColors.lightTheme.secondary"
|
|
75
|
-
:on-secondary="formColors.lightTheme.onSecondary"
|
|
91
|
+
</v-row>
|
|
76
92
|
|
|
77
|
-
/>
|
|
78
93
|
</v-card-text>
|
|
79
94
|
|
|
95
|
+
|
|
80
96
|
</v-card>
|
|
81
97
|
|
|
82
98
|
|
|
@@ -88,73 +104,91 @@
|
|
|
88
104
|
<v-card-subtitle v-t="'customization.colors.darkSubtitle'">
|
|
89
105
|
</v-card-subtitle>
|
|
90
106
|
<v-card-text class="pb-0 ">
|
|
91
|
-
<v-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
107
|
+
<v-row>
|
|
108
|
+
<v-col cols="12" sm="7">
|
|
109
|
+
<v-form ref="colorsForm" autocomplete="off" @submit.prevent="$emit('save')">
|
|
110
|
+
|
|
111
|
+
<v-row>
|
|
112
|
+
<v-col cols="12" sm="4" md="4" class="pb-0">
|
|
113
|
+
<color-input v-model="formColors.darkTheme.background"
|
|
114
|
+
:label="$t('customization.colors.background')"
|
|
115
|
+
color="secondary"
|
|
116
|
+
:rules="[rules.required]"
|
|
117
|
+
/>
|
|
118
|
+
</v-col>
|
|
119
|
+
|
|
120
|
+
<v-col cols="12" sm="4" md="4" class="pb-0">
|
|
121
|
+
<color-input v-model="formColors.darkTheme.appBar"
|
|
122
|
+
:label="$t('customization.colors.appBar')"
|
|
123
|
+
color="secondary"
|
|
124
|
+
:rules="[rules.required]"
|
|
125
|
+
/>
|
|
126
|
+
</v-col>
|
|
127
|
+
|
|
128
|
+
<v-col cols="12" sm="4" md="4" class="pb-0">
|
|
129
|
+
<color-input v-model="formColors.darkTheme.onAppBar"
|
|
130
|
+
:label="$t('customization.colors.onAppBar')"
|
|
131
|
+
color="secondary"
|
|
132
|
+
:rules="[rules.required]"
|
|
133
|
+
/>
|
|
134
|
+
</v-col>
|
|
135
|
+
|
|
136
|
+
<v-col cols="12" sm="4" md="3" class="pb-0">
|
|
137
|
+
<color-input v-model="formColors.darkTheme.primary"
|
|
138
|
+
:label="$t('customization.colors.primary')"
|
|
139
|
+
color="secondary"
|
|
140
|
+
:rules="[rules.required]"
|
|
141
|
+
/>
|
|
142
|
+
</v-col>
|
|
143
|
+
|
|
144
|
+
<v-col cols="12" sm="4" md="3">
|
|
145
|
+
<color-input v-model="formColors.darkTheme.onPrimary"
|
|
146
|
+
:label="$t('customization.colors.onPrimary')"
|
|
147
|
+
color="secondary"
|
|
148
|
+
:rules="[rules.required]"
|
|
149
|
+
/>
|
|
150
|
+
</v-col>
|
|
151
|
+
|
|
152
|
+
<v-col cols="12" sm="4" md="3">
|
|
153
|
+
<color-input v-model="formColors.darkTheme.secondary"
|
|
154
|
+
:label="$t('customization.colors.secondary')"
|
|
155
|
+
color="secondary"
|
|
156
|
+
:rules="[rules.required]"
|
|
157
|
+
/>
|
|
158
|
+
</v-col>
|
|
159
|
+
|
|
160
|
+
<v-col cols="12" sm="4" md="3">
|
|
161
|
+
<color-input v-model="formColors.darkTheme.onSecondary"
|
|
162
|
+
:label="$t('customization.colors.onSecondary')"
|
|
163
|
+
color="secondary"
|
|
164
|
+
:rules="[rules.required]"
|
|
165
|
+
/>
|
|
166
|
+
</v-col>
|
|
167
|
+
|
|
168
|
+
</v-row>
|
|
169
|
+
</v-form>
|
|
170
|
+
</v-col>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<v-col cols="12" sm="5">
|
|
174
|
+
<colors-preview
|
|
175
|
+
:background="formColors.darkTheme.background"
|
|
176
|
+
:app-bar="formColors.darkTheme.appBar"
|
|
177
|
+
:primary="formColors.darkTheme.primary"
|
|
178
|
+
:on-primary="formColors.darkTheme.onPrimary"
|
|
179
|
+
:secondary="formColors.darkTheme.secondary"
|
|
180
|
+
:on-secondary="formColors.darkTheme.onSecondary"
|
|
181
|
+
|
|
182
|
+
/>
|
|
183
|
+
</v-col>
|
|
184
|
+
|
|
185
|
+
</v-row>
|
|
117
186
|
|
|
118
|
-
<v-col cols="12" sm="4" md="2">
|
|
119
|
-
<color-input v-model="formColors.darkTheme.onPrimary"
|
|
120
|
-
:label="$t('customization.colors.onPrimary')"
|
|
121
|
-
color="secondary"
|
|
122
|
-
:rules="[rules.required]"
|
|
123
|
-
/>
|
|
124
|
-
</v-col>
|
|
125
187
|
|
|
126
|
-
<v-col cols="12" sm="4" md="2">
|
|
127
|
-
<color-input v-model="formColors.darkTheme.secondary"
|
|
128
|
-
:label="$t('customization.colors.secondary')"
|
|
129
|
-
color="secondary"
|
|
130
|
-
:rules="[rules.required]"
|
|
131
|
-
/>
|
|
132
|
-
</v-col>
|
|
133
|
-
|
|
134
|
-
<v-col cols="12" sm="4" md="2">
|
|
135
|
-
<color-input v-model="formColors.darkTheme.onSecondary"
|
|
136
|
-
:label="$t('customization.colors.onSecondary')"
|
|
137
|
-
color="secondary"
|
|
138
|
-
:rules="[rules.required]"
|
|
139
|
-
/>
|
|
140
|
-
</v-col>
|
|
141
|
-
|
|
142
|
-
</v-row>
|
|
143
|
-
</v-form>
|
|
144
188
|
|
|
145
189
|
</v-card-text>
|
|
146
190
|
|
|
147
|
-
<v-card-text class="pt-0 ">
|
|
148
|
-
<colors-preview
|
|
149
|
-
:background="formColors.darkTheme.background"
|
|
150
|
-
:app-bar="formColors.darkTheme.appBar"
|
|
151
|
-
:primary="formColors.darkTheme.primary"
|
|
152
|
-
:on-primary="formColors.darkTheme.onPrimary"
|
|
153
|
-
:secondary="formColors.darkTheme.secondary"
|
|
154
|
-
:on-secondary="formColors.darkTheme.onSecondary"
|
|
155
191
|
|
|
156
|
-
/>
|
|
157
|
-
</v-card-text>
|
|
158
192
|
|
|
159
193
|
</v-card>
|
|
160
194
|
|
|
@@ -84,6 +84,7 @@ export default {
|
|
|
84
84
|
onSecondary: null,
|
|
85
85
|
background: null,
|
|
86
86
|
appBar: null,
|
|
87
|
+
onAppBar: null,
|
|
87
88
|
},
|
|
88
89
|
darkTheme: {
|
|
89
90
|
primary: null,
|
|
@@ -91,7 +92,7 @@ export default {
|
|
|
91
92
|
secondary: null,
|
|
92
93
|
onSecondary: null,
|
|
93
94
|
background: null,
|
|
94
|
-
|
|
95
|
+
onAppBar: null,
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
},
|
|
@@ -7,6 +7,7 @@ mutation colorsUpdate($input: ColorsUpdateInput ){
|
|
|
7
7
|
onSecondary
|
|
8
8
|
background
|
|
9
9
|
appBar
|
|
10
|
+
onAppBar
|
|
10
11
|
}
|
|
11
12
|
darkTheme{
|
|
12
13
|
primary
|
|
@@ -15,6 +16,7 @@ mutation colorsUpdate($input: ColorsUpdateInput ){
|
|
|
15
16
|
onSecondary
|
|
16
17
|
background
|
|
17
18
|
appBar
|
|
19
|
+
onAppBar
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
}
|
|
@@ -6,6 +6,7 @@ mutation customizationUpdate($input: CustomizationInput){
|
|
|
6
6
|
secondary
|
|
7
7
|
onSecondary
|
|
8
8
|
appBar
|
|
9
|
+
onAppBar
|
|
9
10
|
background
|
|
10
11
|
}
|
|
11
12
|
darkTheme{
|
|
@@ -14,6 +15,7 @@ mutation customizationUpdate($input: CustomizationInput){
|
|
|
14
15
|
secondary
|
|
15
16
|
onSecondary
|
|
16
17
|
appBar
|
|
18
|
+
onAppBar
|
|
17
19
|
background
|
|
18
20
|
}
|
|
19
21
|
logo
|
|
@@ -90,6 +90,7 @@ const customizationStore = {
|
|
|
90
90
|
state.lightTheme.onSecondary = lightTheme.onSecondary
|
|
91
91
|
state.lightTheme.background = lightTheme.background
|
|
92
92
|
state.lightTheme.appBar = lightTheme.appBar
|
|
93
|
+
state.lightTheme.onAppBar = lightTheme.onAppBar
|
|
93
94
|
|
|
94
95
|
state.darkTheme.primary = darkTheme.primary
|
|
95
96
|
state.darkTheme.onPrimary = darkTheme.onPrimary
|
|
@@ -97,6 +98,7 @@ const customizationStore = {
|
|
|
97
98
|
state.darkTheme.onSecondary = darkTheme.onSecondary
|
|
98
99
|
state.darkTheme.background = darkTheme.background
|
|
99
100
|
state.darkTheme.appBar = darkTheme.appBar
|
|
101
|
+
state.darkTheme.onAppBar = darkTheme.onAppBar
|
|
100
102
|
|
|
101
103
|
if (state.vuetifyInstance) {
|
|
102
104
|
state.vuetifyInstance.framework.theme.themes.light.primary = lightTheme.primary
|
|
@@ -105,6 +107,7 @@ const customizationStore = {
|
|
|
105
107
|
state.vuetifyInstance.framework.theme.themes.light.onSecondary = lightTheme.onSecondary
|
|
106
108
|
state.vuetifyInstance.framework.theme.themes.light.background = lightTheme.background
|
|
107
109
|
state.vuetifyInstance.framework.theme.themes.light.appBar = lightTheme.appBar
|
|
110
|
+
state.vuetifyInstance.framework.theme.themes.light.onAppBar = lightTheme.onAppBar
|
|
108
111
|
|
|
109
112
|
state.vuetifyInstance.framework.theme.themes.dark.primary = darkTheme.primary
|
|
110
113
|
state.vuetifyInstance.framework.theme.themes.dark.onPrimary = darkTheme.onPrimary
|
|
@@ -112,6 +115,7 @@ const customizationStore = {
|
|
|
112
115
|
state.vuetifyInstance.framework.theme.themes.dark.onSecondary = darkTheme.onSecondary
|
|
113
116
|
state.vuetifyInstance.framework.theme.themes.dark.background = darkTheme.background
|
|
114
117
|
state.vuetifyInstance.framework.theme.themes.dark.appBar = darkTheme.appBar
|
|
118
|
+
state.vuetifyInstance.framework.theme.themes.dark.onAppBar = darkTheme.onAppBar
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
},
|