@dracul/customize-frontend 1.14.0 → 1.14.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dracul/customize-frontend",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "vue custom logo, custom theme, custom colors, i18n configuration}",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "author": "Cristian Incarnato",
20
20
  "license": "MIT",
21
- "gitHead": "0eed16977d33ffb602da49e4d57663b5df40a0c0",
21
+ "gitHead": "da34c67b223d8180c6de2dc268ebcf8c48d30925",
22
22
  "dependencies": {
23
23
  "@dracul/common-frontend": "^1.14.0",
24
24
  "@dracul/user-frontend": "^1.14.0"
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <v-row justify="center" align-content="center">
2
+ <v-row no-gutters justify="center" align-content="center">
3
3
  <v-col cols="12" md="4" lg="4">
4
- <v-card class="pa-6" :style="{backgroundColor: background}">
4
+ <v-card class="pa-3" :style="{backgroundColor: background}">
5
5
  <v-card-title class="mb-3 justify-center" :style="{color: primary}">
6
6
  <div v-t="'customization.preview'"></div>
7
7
  </v-card-title>
@@ -140,9 +140,10 @@
140
140
 
141
141
  </v-card>
142
142
 
143
- <v-card>
143
+ <v-card outlined class="mt-4">
144
144
  <v-card-actions>
145
- <v-btn @click="saveColors" text color="blue darken-4" v-t="'customization.applyButton'"></v-btn>
145
+ <v-spacer></v-spacer>
146
+ <v-btn @click="saveColors" large color="primary onPrimary--text" v-t="'customization.applyButton'"></v-btn>
146
147
  </v-card-actions>
147
148
  </v-card>
148
149
  </v-container>
@@ -1,64 +1,65 @@
1
1
  <template>
2
- <v-card>
3
- <v-card-title outlined>
4
- <div v-t="'customization.lang.title'"></div>
5
- <br>
6
- </v-card-title>
7
- <v-card-subtitle v-t="'customization.lang.subtitle'">
8
- </v-card-subtitle>
9
- <v-card-text>
10
- <v-form ref="langForm" autocomplete="off" @submit.prevent="saveLang">
11
- <v-row>
12
- <v-col cols="12" md="3" lg="3">
13
- <v-select
14
- prepend-icon="language"
15
- class="pa-3"
16
- :items="langs"
17
- :item-text="'text'"
18
- :item-value="'value'"
19
- color="secondary"
20
- item-color="secondary"
21
- v-model="formLang.language"
22
- :label="$t('customization.lang.form.lang')"
23
- required
24
- ></v-select>
25
- </v-col>
26
- </v-row>
27
- </v-form>
28
- </v-card-text>
2
+ <v-card>
3
+ <v-card-title outlined>
4
+ <div v-t="'customization.lang.title'"></div>
5
+ <br>
6
+ </v-card-title>
7
+ <v-card-subtitle v-t="'customization.lang.subtitle'">
8
+ </v-card-subtitle>
9
+ <v-card-text>
10
+ <v-form ref="langForm" autocomplete="off" @submit.prevent="saveLang">
11
+ <v-row>
12
+ <v-col cols="12" md="3" lg="3">
13
+ <v-select
14
+ prepend-icon="language"
15
+ class="pa-3"
16
+ :items="langs"
17
+ :item-text="'text'"
18
+ :item-value="'value'"
19
+ color="secondary"
20
+ item-color="secondary"
21
+ v-model="formLang.language"
22
+ :label="$t('customization.lang.form.lang')"
23
+ required
24
+ ></v-select>
25
+ </v-col>
26
+ </v-row>
27
+ </v-form>
28
+ </v-card-text>
29
29
 
30
- <v-divider></v-divider>
30
+ <v-divider></v-divider>
31
31
 
32
- <v-card-actions>
33
- <v-btn @click="saveLang" text color="blue darken-4" v-t="'customization.applyButton'"></v-btn>
34
- </v-card-actions>
35
- </v-card>
32
+ <v-card-actions>
33
+ <v-spacer></v-spacer>
34
+ <v-btn @click="saveLang" large color="primary onPrimary--text" v-t="'customization.applyButton'"></v-btn>
35
+ </v-card-actions>
36
+ </v-card>
36
37
  </template>
37
38
  <script>
38
- import CustomizationProvider from "../../../../providers/CustomizationProvider";
39
- import {ClientError} from "@dracul/user-frontend";
40
- import {mapMutations} from "vuex";
39
+ import CustomizationProvider from "../../../../providers/CustomizationProvider";
40
+ import {ClientError} from "@dracul/user-frontend";
41
+ import {mapMutations} from "vuex";
41
42
 
42
- export default {
43
- name: 'customization-lang',
44
- props: {
45
- formLang: {type:Object},
46
- langs: {type: Array},
47
- },
48
- methods:{
49
- ...mapMutations([
50
- 'setLanguage'
51
- ]),
52
- saveLang() {
53
- CustomizationProvider.updateLanguage(this.formLang).then(r => {
54
- this.$root.$i18n.locale = r.data.langUpdate.language
55
- this.setLanguage(r.data.langUpdate.language)
56
- }).catch(error => {
57
- let clientError = new ClientError(error)
58
- this.inputErrors = clientError.inputErrors
59
- this.errorMessage = clientError.showMessage
60
- })
61
- },
62
- }
63
- }
43
+ export default {
44
+ name: 'customization-lang',
45
+ props: {
46
+ formLang: {type: Object},
47
+ langs: {type: Array},
48
+ },
49
+ methods: {
50
+ ...mapMutations([
51
+ 'setLanguage'
52
+ ]),
53
+ saveLang() {
54
+ CustomizationProvider.updateLanguage(this.formLang).then(r => {
55
+ this.$root.$i18n.locale = r.data.langUpdate.language
56
+ this.setLanguage(r.data.langUpdate.language)
57
+ }).catch(error => {
58
+ let clientError = new ClientError(error)
59
+ this.inputErrors = clientError.inputErrors
60
+ this.errorMessage = clientError.showMessage
61
+ })
62
+ },
63
+ }
64
+ }
64
65
  </script>
@@ -84,7 +84,8 @@
84
84
  <v-divider></v-divider>
85
85
 
86
86
  <v-card-actions>
87
- <v-btn :loading="loading" @click="saveLogo" text color="blue darken-4" v-t="'customization.applyButton'"></v-btn>
87
+ <v-spacer></v-spacer>
88
+ <v-btn :loading="loading" @click="saveLogo" large color="primary onPrimary--text" v-t="'customization.applyButton'"></v-btn>
88
89
  </v-card-actions>
89
90
 
90
91
  </v-card>