@enso-ui/how-to 5.0.0 → 5.1.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/LICENSE
CHANGED
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enso-ui/how-to",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Basic how-to package",
|
|
5
5
|
"main": "src/bulma/pages/howTo/Index.vue",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
6
|
"repository": {
|
|
10
7
|
"type": "git",
|
|
11
8
|
"url": "git+https://github.com/enso-ui/how-to.git"
|
|
@@ -15,7 +12,7 @@
|
|
|
15
12
|
"vue"
|
|
16
13
|
],
|
|
17
14
|
"author": "Adrian Ocneanu <aocneanu@gmail.com>",
|
|
18
|
-
"license": "
|
|
15
|
+
"license": "MIT",
|
|
19
16
|
"bugs": {
|
|
20
17
|
"url": "https://github.com/enso-ui/how-to/issues"
|
|
21
18
|
},
|
|
@@ -24,26 +21,15 @@
|
|
|
24
21
|
"@enso-ui/card": "^3.0",
|
|
25
22
|
"@enso-ui/confirmation": "^2.0",
|
|
26
23
|
"@enso-ui/directives": "^2.0",
|
|
27
|
-
"@enso-ui/ui": "^
|
|
24
|
+
"@enso-ui/ui": "^7.0.0",
|
|
28
25
|
"@enso-ui/uploader": "^2.0",
|
|
29
26
|
"@enso-ui/transitions": "^2.0",
|
|
30
|
-
"@fortawesome/fontawesome-svg-core": "^
|
|
31
|
-
"@fortawesome/free-regular-svg-icons": "^
|
|
32
|
-
"@fortawesome/free-solid-svg-icons": "^
|
|
33
|
-
"@fortawesome/vue-fontawesome": "3.
|
|
27
|
+
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
28
|
+
"@fortawesome/free-regular-svg-icons": "^7.2.0",
|
|
29
|
+
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
30
|
+
"@fortawesome/vue-fontawesome": "3.1.3",
|
|
34
31
|
"v-tooltip": "^4.0.0-beta.2",
|
|
35
32
|
"video.js": "^7.0",
|
|
36
33
|
"vue": "^3.0"
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@vue/cli-plugin-babel": "5.0.0-beta.6",
|
|
40
|
-
"@vue/cli-plugin-eslint": "5.0.0-beta.6",
|
|
41
|
-
"@vue/eslint-config-airbnb": "^5.0.0",
|
|
42
|
-
"autoprefixer": "^9.6.1",
|
|
43
|
-
"babel-eslint": "^10.0.1",
|
|
44
|
-
"cross-env": "^6.0.0",
|
|
45
|
-
"eslint": "^7.0.0",
|
|
46
|
-
"eslint-import-resolver-alias": "^1.1.2",
|
|
47
|
-
"eslint-plugin-vue": "^8.0.0"
|
|
48
34
|
}
|
|
49
35
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="column is-three-quarters-desktop is-full-touch">
|
|
4
4
|
<fade enter="down"
|
|
5
5
|
leave="up">
|
|
6
|
-
<div class="columns"
|
|
6
|
+
<div class="columns how-to-editor"
|
|
7
7
|
v-if="addingVideo || editingVideo">
|
|
8
8
|
<div class="column is-narrow">
|
|
9
9
|
<div class="control">
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
v-if="video.name">
|
|
30
30
|
<enso-uploader :url="uploadLink"
|
|
31
31
|
:params="video"
|
|
32
|
-
:file-size-limit="
|
|
32
|
+
:file-size-limit="25*1024*1024"
|
|
33
33
|
file-key="video"
|
|
34
34
|
@upload-successful="reset(); getVideos()"
|
|
35
35
|
v-if="addingVideo">
|
|
36
36
|
<template #control="{ controlEvents }">
|
|
37
37
|
<a v-on="controlEvents">
|
|
38
|
-
<span class="file-cta">
|
|
38
|
+
<span class="file-cta how-to-editor__upload-cta">
|
|
39
39
|
<span class="file-icon">
|
|
40
|
-
<fa icon="
|
|
40
|
+
<fa :icon="faUpload"/>
|
|
41
41
|
</span>
|
|
42
42
|
<span class="file-label">
|
|
43
43
|
{{ i18n('Video') }}…
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
@click="video = video; update()"
|
|
51
51
|
v-if="editingVideo">
|
|
52
52
|
<span class="icon">
|
|
53
|
-
<fa icon="
|
|
53
|
+
<fa :icon="faCheck"/>
|
|
54
54
|
</span>
|
|
55
55
|
</a>
|
|
56
56
|
</div>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<a class="button is-danger is-outlined"
|
|
62
62
|
@click="reset()">
|
|
63
63
|
<span class="icon">
|
|
64
|
-
<fa icon="
|
|
64
|
+
<fa :icon="faBan"/>
|
|
65
65
|
</span>
|
|
66
66
|
</a>
|
|
67
67
|
</div>
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
<div class="column is-half"
|
|
74
74
|
v-for="(vid, index) in filteredVideos"
|
|
75
75
|
:key="vid.id">
|
|
76
|
-
<how-to-video class="is-rounded
|
|
76
|
+
<how-to-video class="is-rounded"
|
|
77
77
|
:video="vid"
|
|
78
78
|
:tags="tags"
|
|
79
79
|
@start-tagging="video = vid; taggingId = video.id"
|
|
@@ -93,16 +93,16 @@
|
|
|
93
93
|
{{ i18n('Add video') }}
|
|
94
94
|
</span>
|
|
95
95
|
<span class="icon is-small">
|
|
96
|
-
<fa icon="
|
|
96
|
+
<fa :icon="faPlus"/>
|
|
97
97
|
</span>
|
|
98
98
|
</a>
|
|
99
|
-
<div class="box
|
|
99
|
+
<div class="box how-to-tags-panel">
|
|
100
100
|
<div class="level">
|
|
101
101
|
<div class="level-left">
|
|
102
102
|
<div class="level-item">
|
|
103
103
|
<label class="label">
|
|
104
104
|
<span class="icon is-small">
|
|
105
|
-
<fa icon="
|
|
105
|
+
<fa :icon="faTags"
|
|
106
106
|
size="xs"/>
|
|
107
107
|
</span>
|
|
108
108
|
{{ i18n('Tags') }}
|
|
@@ -115,28 +115,28 @@
|
|
|
115
115
|
@click="addTag"
|
|
116
116
|
v-if="canAccess('howTo.tags.store') && query && tagIsNew">
|
|
117
117
|
<span class="icon is-small">
|
|
118
|
-
<fa icon="
|
|
118
|
+
<fa :icon="faCheck"/>
|
|
119
119
|
</span>
|
|
120
120
|
</a>
|
|
121
121
|
<a class="button is-small is-outlined is-danger"
|
|
122
122
|
v-if="canAccess('howTo.tags.update') && !query && selectedTag"
|
|
123
123
|
@click="editingTag = true">
|
|
124
124
|
<span class="icon is-small">
|
|
125
|
-
<fa icon="
|
|
125
|
+
<fa :icon="faPen"/>
|
|
126
126
|
</span>
|
|
127
127
|
</a>
|
|
128
128
|
<a class="button is-small is-outlined is-success ml-1"
|
|
129
129
|
v-if="editingTag"
|
|
130
130
|
@click="editingTag = false; updateTag()">
|
|
131
131
|
<span class="icon is-small">
|
|
132
|
-
<fa icon="
|
|
132
|
+
<fa :icon="faCheck"/>
|
|
133
133
|
</span>
|
|
134
134
|
</a>
|
|
135
135
|
<a class="button is-small is-outlined ml-1"
|
|
136
136
|
v-if="editingTag"
|
|
137
137
|
@click="editingTag = false">
|
|
138
138
|
<span class="icon is-small">
|
|
139
|
-
<fa icon="
|
|
139
|
+
<fa :icon="faBan"/>
|
|
140
140
|
</span>
|
|
141
141
|
</a>
|
|
142
142
|
</div>
|
|
@@ -180,11 +180,10 @@
|
|
|
180
180
|
import { focus } from '@enso-ui/directives';
|
|
181
181
|
import { Fade } from '@enso-ui/transitions';
|
|
182
182
|
import { EnsoUploader } from '@enso-ui/uploader/bulma';
|
|
183
|
-
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
184
183
|
import {
|
|
185
184
|
faBan,
|
|
186
185
|
faCheck,
|
|
187
|
-
|
|
186
|
+
faPen,
|
|
188
187
|
faPlus,
|
|
189
188
|
faTags,
|
|
190
189
|
faUpload,
|
|
@@ -192,8 +191,6 @@ import {
|
|
|
192
191
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
193
192
|
import HowToVideo from './components/HowToVideo.vue';
|
|
194
193
|
|
|
195
|
-
library.add([faPlus, faUpload, faBan, faCheck, faPencilAlt, faTags]);
|
|
196
|
-
|
|
197
194
|
export default {
|
|
198
195
|
name: 'Index',
|
|
199
196
|
|
|
@@ -206,6 +203,12 @@ export default {
|
|
|
206
203
|
inject: ['canAccess', 'errorHandler', 'http', 'i18n', 'route', 'toastr'],
|
|
207
204
|
|
|
208
205
|
data: () => ({
|
|
206
|
+
faBan,
|
|
207
|
+
faCheck,
|
|
208
|
+
faPen,
|
|
209
|
+
faPlus,
|
|
210
|
+
faTags,
|
|
211
|
+
faUpload,
|
|
209
212
|
videos: [],
|
|
210
213
|
query: '',
|
|
211
214
|
tags: [],
|
|
@@ -335,3 +338,44 @@ export default {
|
|
|
335
338
|
},
|
|
336
339
|
};
|
|
337
340
|
</script>
|
|
341
|
+
|
|
342
|
+
<style lang="scss">
|
|
343
|
+
.how-to-editor__upload-cta {
|
|
344
|
+
background-color: var(--enso-filter-control-surface);
|
|
345
|
+
color: var(--bulma-text-strong);
|
|
346
|
+
|
|
347
|
+
&:hover,
|
|
348
|
+
&:focus {
|
|
349
|
+
background-color: var(--enso-filter-surface);
|
|
350
|
+
color: var(--bulma-text-strong);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.how-to-editor {
|
|
355
|
+
.file-cta {
|
|
356
|
+
color: var(--bulma-text-strong);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.how-to-tags-panel.box {
|
|
361
|
+
color: var(--bulma-text);
|
|
362
|
+
|
|
363
|
+
.label {
|
|
364
|
+
color: var(--bulma-text-strong);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.tag.is-white,
|
|
368
|
+
.tag.is-delete.is-white {
|
|
369
|
+
background-color: var(--bulma-scheme-main-ter);
|
|
370
|
+
color: var(--bulma-text-strong);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.tag.is-delete.is-white:hover {
|
|
374
|
+
background-color: color-mix(
|
|
375
|
+
in srgb,
|
|
376
|
+
var(--bulma-danger) 16%,
|
|
377
|
+
var(--bulma-scheme-main-ter)
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
</style>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<card>
|
|
2
|
+
<card class="how-to-video-card">
|
|
3
3
|
<card-header>
|
|
4
4
|
<template #title>
|
|
5
5
|
<span class="icon is-small mr-1">
|
|
6
|
-
<fa icon="
|
|
6
|
+
<fa :icon="faVideo"/>
|
|
7
7
|
</span>
|
|
8
8
|
{{ video.name }}
|
|
9
9
|
</template>
|
|
10
10
|
<template #controls>
|
|
11
11
|
<card-control v-tooltip="video.description">
|
|
12
12
|
<span class="icon">
|
|
13
|
-
<fa icon="
|
|
13
|
+
<fa :icon="faCircleInfo"/>
|
|
14
14
|
</span>
|
|
15
15
|
</card-control>
|
|
16
16
|
<card-control v-if="!video.poster && canAccess('howTo.posters.store')">
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<template #control="{ controlEvents }">
|
|
23
23
|
<span class="icon"
|
|
24
24
|
v-on="controlEvents">
|
|
25
|
-
<fa :icon="
|
|
25
|
+
<fa :icon="faImage"/>
|
|
26
26
|
</span>
|
|
27
27
|
</template>
|
|
28
28
|
</enso-uploader>
|
|
@@ -30,34 +30,34 @@
|
|
|
30
30
|
<card-control v-if="canAccess('howTo.videos.update')">
|
|
31
31
|
<span class="icon"
|
|
32
32
|
@click="$emit('edit')">
|
|
33
|
-
<fa :icon="
|
|
33
|
+
<fa :icon="faPenToSquare"/>
|
|
34
34
|
</span>
|
|
35
35
|
</card-control>
|
|
36
36
|
<card-control v-if="canAccess('howTo.videos.update')">
|
|
37
37
|
<span class="icon"
|
|
38
38
|
@click="tagging = !tagging;
|
|
39
39
|
$emit(tagging ? 'start-tagging' : 'stop-tagging')">
|
|
40
|
-
<fa :icon="tagging ?
|
|
40
|
+
<fa :icon="tagging ? faCheck : faTags"/>
|
|
41
41
|
</span>
|
|
42
42
|
</card-control>
|
|
43
43
|
<card-control v-if="canAccess('howTo.posters.destroy') && video.poster">
|
|
44
44
|
<confirmation @confirm="destroyPoster">
|
|
45
45
|
<span class="icon is-small">
|
|
46
|
-
<fa :icon="
|
|
46
|
+
<fa :icon="faTrashCan"/>
|
|
47
47
|
</span>
|
|
48
48
|
</confirmation>
|
|
49
49
|
</card-control>
|
|
50
50
|
<card-control v-else-if="canAccess('howTo.videos.destroy')">
|
|
51
51
|
<confirmation @confirm="destroyVideo">
|
|
52
52
|
<span class="icon is-small">
|
|
53
|
-
<fa :icon="
|
|
53
|
+
<fa :icon="faTrashCan"/>
|
|
54
54
|
</span>
|
|
55
55
|
</confirmation>
|
|
56
56
|
</card-control>
|
|
57
57
|
<card-collapse/>
|
|
58
58
|
</template>
|
|
59
59
|
</card-header>
|
|
60
|
-
<card-content class="
|
|
60
|
+
<card-content class="p-0">
|
|
61
61
|
<video-player :options="options()"
|
|
62
62
|
class="vjs-custom-skin"
|
|
63
63
|
playsinline/>
|
|
@@ -92,9 +92,13 @@
|
|
|
92
92
|
import 'v-tooltip/dist/v-tooltip.css';
|
|
93
93
|
import { VTooltip } from 'v-tooltip';
|
|
94
94
|
import { FontAwesomeIcon as Fa } from '@fortawesome/vue-fontawesome';
|
|
95
|
-
import {
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
import {
|
|
96
|
+
faCheck,
|
|
97
|
+
faCircleInfo,
|
|
98
|
+
faTags,
|
|
99
|
+
faVideo,
|
|
100
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
101
|
+
import { faTrashCan, faPenToSquare, faImage } from '@fortawesome/free-regular-svg-icons';
|
|
98
102
|
import {
|
|
99
103
|
Card, CardHeader, CardCollapse, CardControl, CardContent,
|
|
100
104
|
CardFooter, CardFooterItem,
|
|
@@ -104,8 +108,6 @@ import { EnsoUploader } from '@enso-ui/uploader';
|
|
|
104
108
|
import VideoPlayer from './VideoPlayer.vue';
|
|
105
109
|
import 'video.js/dist/video-js.css';
|
|
106
110
|
|
|
107
|
-
library.add([faTrashAlt, faInfo, faTags, faEdit, faImage, faInfoCircle]);
|
|
108
|
-
|
|
109
111
|
export default {
|
|
110
112
|
name: 'HowToVideo',
|
|
111
113
|
|
|
@@ -141,6 +143,13 @@ export default {
|
|
|
141
143
|
emits: ['delete', 'edit', 'start-tagging', 'stop-tagging'],
|
|
142
144
|
|
|
143
145
|
data: () => ({
|
|
146
|
+
faCheck,
|
|
147
|
+
faCircleInfo,
|
|
148
|
+
faImage,
|
|
149
|
+
faPenToSquare,
|
|
150
|
+
faTags,
|
|
151
|
+
faTrashCan,
|
|
152
|
+
faVideo,
|
|
144
153
|
tagging: false,
|
|
145
154
|
}),
|
|
146
155
|
|
|
@@ -189,9 +198,72 @@ export default {
|
|
|
189
198
|
</script>
|
|
190
199
|
|
|
191
200
|
<style lang="scss" scoped>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
201
|
+
:deep(.how-to-video-card.card) {
|
|
202
|
+
overflow: hidden;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:deep(.how-to-video-card .card-header-title),
|
|
206
|
+
:deep(.how-to-video-card .card-header-icon),
|
|
207
|
+
:deep(.how-to-video-card .card-header .icon) {
|
|
208
|
+
color: var(--bulma-text-strong);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
:deep(.how-to-video-card > .card-content) {
|
|
212
|
+
color: var(--bulma-text);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
:deep(.how-to-video-card > .card-footer),
|
|
216
|
+
:deep(.how-to-video-card .card-footer-item) {
|
|
217
|
+
background-color: var(--bulma-card-footer-background-color) !important;
|
|
218
|
+
border-color: var(--bulma-border);
|
|
219
|
+
color: var(--bulma-text);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:deep(.how-to-video-card .card-content .video-js),
|
|
223
|
+
:deep(.how-to-video-card .card-content .vjs-poster),
|
|
224
|
+
:deep(.how-to-video-card .card-content .vjs-tech) {
|
|
225
|
+
background-color: var(--bulma-scheme-main-bis) !important;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:deep(.how-to-video-card .card-content .video-js) {
|
|
229
|
+
color: var(--bulma-text);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:deep(.how-to-video-card .card-content .vjs-control-bar) {
|
|
233
|
+
background: color-mix(
|
|
234
|
+
in srgb,
|
|
235
|
+
var(--bulma-scheme-main-ter) 88%,
|
|
236
|
+
black
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
:deep(.how-to-video-card .card-content .vjs-big-play-button) {
|
|
241
|
+
border-color: color-mix(in srgb, var(--bulma-primary) 35%, var(--bulma-border));
|
|
242
|
+
background-color: color-mix(
|
|
243
|
+
in srgb,
|
|
244
|
+
var(--bulma-scheme-main) 80%,
|
|
245
|
+
black
|
|
246
|
+
);
|
|
247
|
+
color: var(--bulma-text-strong);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:deep(.how-to-video-card .card-control) {
|
|
251
|
+
color: var(--bulma-text-light);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
:deep(.how-to-video-card .card-control:hover),
|
|
255
|
+
:deep(.how-to-video-card .card-control:focus) {
|
|
256
|
+
color: var(--bulma-text-strong);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
:deep(.how-to-video-card .tag) {
|
|
260
|
+
background-color: var(--bulma-scheme-main-ter);
|
|
261
|
+
color: var(--bulma-text-strong);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.card-footer {
|
|
265
|
+
white-space: nowrap;
|
|
266
|
+
overflow: auto;
|
|
267
|
+
text-overflow: ellipsis;
|
|
268
|
+
}
|
|
197
269
|
</style>
|
|
@@ -215,6 +215,25 @@ export default {
|
|
|
215
215
|
</script>
|
|
216
216
|
|
|
217
217
|
<style>
|
|
218
|
+
.video-player,
|
|
219
|
+
.video-player .video-js,
|
|
220
|
+
.video-player .vjs-tech,
|
|
221
|
+
.video-player .vjs-poster {
|
|
222
|
+
background-color: var(--bulma-scheme-main-bis);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.video-player .video-js {
|
|
226
|
+
color: var(--bulma-text);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.video-player .video-js .vjs-control-bar {
|
|
230
|
+
background: color-mix(
|
|
231
|
+
in srgb,
|
|
232
|
+
var(--bulma-scheme-main-ter) 88%,
|
|
233
|
+
black
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
|
|
218
237
|
.vjs-custom-skin > .video-js .vjs-big-play-button {
|
|
219
238
|
top: 50%;
|
|
220
239
|
left: 50%;
|