@burh/nuxt-core 1.0.40 → 1.0.42

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.
@@ -114,6 +114,9 @@
114
114
  }
115
115
  })
116
116
  })
117
+ },
118
+ removeAllFiles() {
119
+ this.dropzone.removeAllFiles(true);
117
120
  }
118
121
  },
119
122
  async mounted() {
@@ -1,7 +1,15 @@
1
1
  <template>
2
2
  <div class="quill">
3
3
  <div :id="toolbarId">
4
+ <!-- <select class="ql-size">
5
+ <option value="small"></option>
6
+ <option selected></option>
7
+ <option value="large"></option>
8
+ <option value="huge"></option>
9
+ </select>
4
10
  <div class="ql-formats">
11
+ <button class="ql-header" value="1"></button>
12
+ <button class="ql-header" value="2"></button>
5
13
  <button class="ql-bold"></button>
6
14
  <button class="ql-italic"></button>
7
15
  <button class="ql-underline"></button>
@@ -11,7 +19,7 @@
11
19
  <button class="ql-image"></button>
12
20
  <button type="button" class="ql-list" value="ordered"></button>
13
21
  <button type="button" class="ql-list" value="bullet"></button>
14
- </div>
22
+ </div> -->
15
23
  </div>
16
24
  <div :id="editorId" :name="name" class ref="editor"></div>
17
25
  </div>
@@ -40,7 +48,26 @@ export default {
40
48
  this.editor = new Quill(`#${this.editorId}`, {
41
49
  theme: "snow",
42
50
  modules: {
43
- toolbar: `#${this.toolbarId}`,
51
+ toolbar: [
52
+ [{ 'font': [] }],
53
+ [{ 'color': [] }, { 'background': [] }],
54
+
55
+ [{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
56
+ [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
57
+
58
+ [{ 'align': '' }, {'align': 'center'}, {'align': 'justify'}, {'align': 'right'}],
59
+
60
+ ['bold', 'italic', 'underline', 'strike'], // toggled buttons
61
+
62
+ [ 'link', 'image' ], // add's image support
63
+
64
+ ['blockquote', 'code-block'],
65
+
66
+ [{ 'list': 'ordered'}, { 'list': 'bullet' }],
67
+ [{ 'script': 'sub'}, { 'script': 'super' }], // superscript/subscript
68
+ [{ 'indent': '-1'}, { 'indent': '+1' }], // outdent/indent
69
+ [{ 'direction': 'rtl' }], // text direction
70
+ ]
44
71
  },
45
72
  });
46
73
 
@@ -97,6 +124,8 @@ export default {
97
124
  };
98
125
  </script>
99
126
  <style lang="scss">
127
+ @import '@burh/nuxt-core/node_modules/quill/dist/quill.snow.css';
128
+
100
129
  .ql-clipboard {
101
130
  display: none;
102
131
  }
@@ -105,4 +134,7 @@ export default {
105
134
  resize: vertical;
106
135
  overflow-y: scroll;
107
136
  }
137
+ .ql-container.ql-snow {
138
+ border: 0;
139
+ }
108
140
  </style>
@@ -6,7 +6,7 @@
6
6
  <p class="col-12 text-center">Não é possivel mais editar este curso.</p>
7
7
 
8
8
  <div class="col-12 mb-4">
9
- <img class="d-block ml-auto" src="/img/content/avatar-burh-404.svg" alt="imagem de erro">
9
+ <img class="d-block mx-auto" src="/img/content/avatar-burh-404.svg" alt="imagem de erro">
10
10
  </div>
11
11
 
12
12
  <div class="col-12">
@@ -4,14 +4,20 @@
4
4
  <div class=""><h2 class="display-4">Editar capa do treinamento</h2></div>
5
5
  </template>
6
6
 
7
- <dropzone-file-upload v-model="fileToUpload"></dropzone-file-upload>
7
+ <dropzone-file-upload v-if="!image" ref="Mydropzone" v-model="fileToUpload" class=""></dropzone-file-upload>
8
8
 
9
- <div class="d-flex">
10
- <base-button size="md" type="primary" role="button"
9
+ <div class="row mb-4" v-if="image">
10
+ <img class="col-12" :src="image" alt="Cover">
11
+ </div>
12
+
13
+ <template slot="footer">
14
+ <base-button type="link" @click="removeImage">Remover Imagem
15
+ </base-button>
16
+ <base-button type="primary" class="ml-auto" role="button"
11
17
  @click="saveImage"
12
- class="ml-auto">Salvar Imagem
18
+ >Salvar Imagem
13
19
  </base-button>
14
- </div>
20
+ </template>
15
21
  </modal>
16
22
  </template>
17
23
  <script>
@@ -21,7 +27,11 @@ export default {
21
27
  DropzoneFileUpload,
22
28
  },
23
29
  props:{
24
- show: false
30
+ show: false,
31
+ image: {
32
+ type: String,
33
+ default: null
34
+ }
25
35
  },
26
36
  data(){
27
37
  return{
@@ -42,12 +52,25 @@ export default {
42
52
  }
43
53
  },
44
54
  methods:{
45
- async saveImage(){
46
- let image = this.fileToUpload
47
- this.$emit('save-img', image)
55
+ removeImage() {
56
+ if(!this.image) {
57
+ this.$refs.Mydropzone.removeAllFiles();
58
+ }
59
+ this.$emit('remove-image')
60
+ },
61
+ async saveImage() {
62
+ if(this.fileToUpload != null) {
63
+ let image = this.fileToUpload
64
+ this.$emit('save-img', image)
65
+ }
48
66
 
49
67
  this.$emit('close-modal-video')
50
68
  }
69
+ },
70
+ watch: {
71
+ image(e) {
72
+ console.log(e);
73
+ }
51
74
  }
52
75
  }
53
76
  </script>
@@ -154,9 +154,17 @@ export default {
154
154
  let params = {
155
155
  users: formatRequest()
156
156
  };
157
-
157
+ this.resetSlots();
158
158
  this.$emit('send-course', params);
159
- }
159
+ },
160
+ resetSlots() {
161
+ this.slots = [
162
+ {
163
+ name: '',
164
+ email: ''
165
+ }
166
+ ];
167
+ }
160
168
  },
161
169
  watch: {
162
170
  selectedCourse(newValue) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burh/nuxt-core",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
4
4
  "description": "Design System and Components.",
5
5
  "author": "Burh",
6
6
  "scripts": {