@windward/games 0.2.2 → 0.4.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/components/content/CrudTable.vue +8 -4
- package/components/content/DatableEditor.vue +1 -0
- package/components/content/blocks/crosswordPuzzle/CrosswordPuzzle.vue +2 -1
- package/components/content/blocks/dragDrop/BucketGame.vue +4 -3
- package/components/content/blocks/dragDrop/SortingGame.vue +37 -28
- package/components/content/blocks/flashcards/CardFace.vue +48 -9
- package/components/content/blocks/flashcards/Flashcard.vue +26 -17
- package/components/content/blocks/flashcards/FlashcardSlides.vue +10 -5
- package/components/content/blocks/matchingGame/MatchingGame.vue +76 -50
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +13 -9
- package/components/content/blocks/multipleChoice/QuestionDialog.vue +27 -13
- package/components/content/blocks/quizshowGame/AnswerPanel.vue +2 -1
- package/components/content/blocks/quizshowGame/Gridview.vue +2 -1
- package/components/content/blocks/quizshowGame/QuizShow.vue +5 -2
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +8 -2
- package/components/content/blocks/slideshow/SlideShow.vue +31 -22
- package/components/content/blocks/wordJumble/WordJumble.vue +8 -2
- package/components/settings/BucketGameSettingsManager.vue +25 -5
- package/components/settings/CrosswordPuzzleSettingsManager.vue +20 -10
- package/components/settings/FlashCardSlidesManager.vue +194 -115
- package/components/settings/MatchingGameManager.vue +57 -8
- package/components/settings/MultipleChoiceSettingsManager.vue +33 -77
- package/components/settings/QuizShowSettingsManager.vue +22 -11
- package/components/settings/SevenStrikesSettingsManager.vue +17 -5
- package/components/settings/SlideShowManager.vue +46 -15
- package/components/settings/SortingGameSettingsManager.vue +19 -8
- package/components/settings/WordJumbleSettingsManager.vue +22 -10
- package/i18n/en-US/components/content/blocks/slideshow.ts +1 -3
- package/i18n/en-US/components/settings/seven_strikes.ts +1 -1
- package/i18n/es-ES/components/content/blocks/slideshow.ts +0 -2
- package/i18n/es-ES/components/settings/seven_strikes.ts +1 -1
- package/i18n/sv-SE/components/content/blocks/slideshow.ts +0 -2
- package/i18n/sv-SE/components/settings/seven_strikes.ts +1 -1
- package/jest.config.js +0 -1
- package/package.json +2 -2
- package/test/__mocks__/componentsMock.js +3 -1
- package/test/__mocks__/modelMock.js +13 -84
- package/test/blocks/flashcards/CardFace.spec.js +2 -0
- package/test/blocks/flashcards/Flashcard.spec.js +1 -0
- package/test/blocks/multipleChoice/MultipleChoice.spec.js +1 -1
- package/test/settings/WordJumbleManager.spec.js +3 -0
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
'windward.games.components.settings.multiple_choice.title_placeholder'
|
|
14
14
|
)
|
|
15
15
|
"
|
|
16
|
+
:disabled="render"
|
|
16
17
|
></v-text-field>
|
|
17
18
|
<v-textarea
|
|
18
19
|
v-model="block.metadata.config.instructions"
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
'windward.games.components.settings.multiple_choice.instructions'
|
|
26
27
|
)
|
|
27
28
|
"
|
|
29
|
+
:disabled="render"
|
|
28
30
|
></v-textarea>
|
|
29
31
|
</v-container>
|
|
30
32
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -36,57 +38,30 @@
|
|
|
36
38
|
)
|
|
37
39
|
}}
|
|
38
40
|
</p>
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
<SortableExpansionPanel
|
|
42
|
+
v-model="block.metadata.config.questions"
|
|
43
|
+
:current-panel.sync="editingIndex"
|
|
44
|
+
:disabled="render"
|
|
45
|
+
@click="onOpenModal"
|
|
46
|
+
@click:close="onDelete($event)"
|
|
42
47
|
>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
<template #header="{ item }">
|
|
49
|
+
{{
|
|
50
|
+
item.body
|
|
51
|
+
? item.body
|
|
52
|
+
: $t(
|
|
53
|
+
'windward.games.components.settings.bucket_game.form.enter_text'
|
|
54
|
+
)
|
|
55
|
+
}}
|
|
56
|
+
</template>
|
|
57
|
+
</SortableExpansionPanel>
|
|
58
|
+
<v-row justify="center" class="my-4">
|
|
59
|
+
<v-btn
|
|
60
|
+
color="primary"
|
|
48
61
|
elevation="0"
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
:disabled="render"
|
|
63
|
+
@click="onOpenModal"
|
|
51
64
|
>
|
|
52
|
-
<v-layout row wrap outlined>
|
|
53
|
-
<v-flex xs10>
|
|
54
|
-
<p
|
|
55
|
-
class="text-truncate mb-0 p-header"
|
|
56
|
-
:class="cursor"
|
|
57
|
-
@click="onOpenModal($event, index)"
|
|
58
|
-
@mouseover="onHover"
|
|
59
|
-
@mouseleave="onHoverLeave"
|
|
60
|
-
>
|
|
61
|
-
<v-icon class="pl-2"
|
|
62
|
-
>mdi-drag-vertical</v-icon
|
|
63
|
-
>
|
|
64
|
-
<span class="span-text-ellipsis">
|
|
65
|
-
{{
|
|
66
|
-
question.body
|
|
67
|
-
? question.body
|
|
68
|
-
: $t(
|
|
69
|
-
'windward.games.components.settings.bucket_game.form.enter_text'
|
|
70
|
-
)
|
|
71
|
-
}}
|
|
72
|
-
</span>
|
|
73
|
-
</p>
|
|
74
|
-
</v-flex>
|
|
75
|
-
<v-flex
|
|
76
|
-
xs2
|
|
77
|
-
class="btn-header-delete d-flex justify-center"
|
|
78
|
-
>
|
|
79
|
-
<v-icon
|
|
80
|
-
class="btn-delete-icon"
|
|
81
|
-
@click="onDelete(index)"
|
|
82
|
-
>mdi-delete-outline</v-icon
|
|
83
|
-
>
|
|
84
|
-
</v-flex>
|
|
85
|
-
</v-layout>
|
|
86
|
-
</v-container>
|
|
87
|
-
</draggable>
|
|
88
|
-
<v-row justify="center" class="my-4">
|
|
89
|
-
<v-btn color="primary" @click="onOpenModal">
|
|
90
65
|
<v-icon>mdi-plus</v-icon>
|
|
91
66
|
{{
|
|
92
67
|
$t(
|
|
@@ -102,6 +77,7 @@
|
|
|
102
77
|
:trigger="false"
|
|
103
78
|
action-save
|
|
104
79
|
:action-save-new="isNotEditing"
|
|
80
|
+
:disabled="render"
|
|
105
81
|
@click:outside="close"
|
|
106
82
|
@click:close="close"
|
|
107
83
|
@keydown.esc="close"
|
|
@@ -116,6 +92,7 @@
|
|
|
116
92
|
v-bind="attrs"
|
|
117
93
|
v-on="on"
|
|
118
94
|
v-model="block.metadata.config.questions[editingIndex]"
|
|
95
|
+
:disabled="render"
|
|
119
96
|
@saveAndNew="saveAndNewCalled"
|
|
120
97
|
></QuestionDialog>
|
|
121
98
|
</template>
|
|
@@ -133,17 +110,17 @@
|
|
|
133
110
|
</div>
|
|
134
111
|
</template>
|
|
135
112
|
<script>
|
|
136
|
-
import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
|
|
137
|
-
import draggable from 'vuedraggable'
|
|
138
113
|
import _ from 'lodash'
|
|
139
|
-
import
|
|
114
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
115
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
116
|
+
import DialogBox from '~/components/Core/DialogBox.vue'
|
|
140
117
|
import QuestionDialog from '../content/blocks/multipleChoice/QuestionDialog.vue'
|
|
141
118
|
import Crypto from '~/helpers/Crypto'
|
|
142
119
|
|
|
143
120
|
export default {
|
|
144
121
|
name: 'MultipleChoiceSettingsManager',
|
|
145
122
|
extends: BaseContentSettings,
|
|
146
|
-
components: {
|
|
123
|
+
components: { SortableExpansionPanel, QuestionDialog, DialogBox },
|
|
147
124
|
beforeMount() {
|
|
148
125
|
if (_.isEmpty(this.block)) {
|
|
149
126
|
this.block = {}
|
|
@@ -181,7 +158,7 @@ export default {
|
|
|
181
158
|
this.emittedQuestion = {}
|
|
182
159
|
},
|
|
183
160
|
methods: {
|
|
184
|
-
onOpenModal(
|
|
161
|
+
onOpenModal(e, questionIndex = null) {
|
|
185
162
|
//checks if modal is opening to edit or create new
|
|
186
163
|
if (questionIndex !== null) {
|
|
187
164
|
this.editingIndex = questionIndex
|
|
@@ -252,7 +229,7 @@ export default {
|
|
|
252
229
|
this.editingIndex = this.block.metadata.config.questions.length - 1
|
|
253
230
|
},
|
|
254
231
|
onHover(index) {
|
|
255
|
-
this.cursor = '
|
|
232
|
+
this.cursor = 'container-pointer'
|
|
256
233
|
},
|
|
257
234
|
onHoverLeave() {
|
|
258
235
|
this.cursor = ''
|
|
@@ -262,34 +239,13 @@ export default {
|
|
|
262
239
|
},
|
|
263
240
|
close() {
|
|
264
241
|
this.dialog = false
|
|
242
|
+
this.editingIndex = null
|
|
265
243
|
},
|
|
266
244
|
},
|
|
267
245
|
}
|
|
268
246
|
</script>
|
|
269
247
|
<style lang="scss" scoped>
|
|
270
|
-
.container-
|
|
271
|
-
border: solid 1px var(--v-primary-base);
|
|
272
|
-
border-radius: 3px !important;
|
|
273
|
-
margin-bottom: 8px;
|
|
274
|
-
}
|
|
275
|
-
.p-header {
|
|
276
|
-
height: 45px;
|
|
277
|
-
display: flex;
|
|
278
|
-
align-items: center;
|
|
279
|
-
}
|
|
280
|
-
.p-header:hover {
|
|
281
|
-
background-color: rgb(243, 243, 243);
|
|
282
|
-
}
|
|
283
|
-
.btn-delete-icon {
|
|
284
|
-
color: var(--v-primary-base);
|
|
285
|
-
}
|
|
286
|
-
.btn-header-delete {
|
|
287
|
-
border-left: 1px solid var(--v-primary-base);
|
|
288
|
-
}
|
|
289
|
-
.btn-header-delete:hover {
|
|
290
|
-
background-color: rgb(243, 243, 243);
|
|
291
|
-
}
|
|
292
|
-
.changePointer {
|
|
248
|
+
.container-pointer {
|
|
293
249
|
cursor: pointer !important;
|
|
294
250
|
}
|
|
295
251
|
</style>
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
'windward.games.components.settings.quizshow_game.form.title'
|
|
12
12
|
)
|
|
13
13
|
"
|
|
14
|
+
:disabled="render"
|
|
14
15
|
></v-text-field>
|
|
15
16
|
<br />
|
|
16
17
|
<v-checkbox
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
'windward.games.components.settings.quizshow_game.form.responsive'
|
|
21
22
|
)
|
|
22
23
|
"
|
|
24
|
+
:disabled="render"
|
|
23
25
|
></v-checkbox>
|
|
24
26
|
<br />
|
|
25
27
|
<v-textarea
|
|
@@ -33,13 +35,14 @@
|
|
|
33
35
|
'windward.games.components.settings.multiple_choice.instructions'
|
|
34
36
|
)
|
|
35
37
|
"
|
|
38
|
+
:disabled="render"
|
|
36
39
|
></v-textarea>
|
|
37
40
|
<br />
|
|
38
41
|
<v-expansion-panels outlined tile flat>
|
|
39
42
|
<v-divider class="cardOutline primary"></v-divider>
|
|
40
43
|
<v-expansion-panel>
|
|
41
44
|
<v-expansion-panel-header>
|
|
42
|
-
<template
|
|
45
|
+
<template #default="{ open }">
|
|
43
46
|
<v-row no-gutters class="text-capitalize">
|
|
44
47
|
<h5>
|
|
45
48
|
{{
|
|
@@ -50,7 +53,7 @@
|
|
|
50
53
|
</h5>
|
|
51
54
|
</v-row>
|
|
52
55
|
</template>
|
|
53
|
-
<template
|
|
56
|
+
<template #actions>
|
|
54
57
|
<v-icon> mdi-chevron-down </v-icon>
|
|
55
58
|
</template>
|
|
56
59
|
</v-expansion-panel-header>
|
|
@@ -64,6 +67,7 @@
|
|
|
64
67
|
v-for="index in Number(
|
|
65
68
|
block.metadata.config.maxCategories
|
|
66
69
|
)"
|
|
70
|
+
:key="'maxcategories-row-' + index"
|
|
67
71
|
>
|
|
68
72
|
<v-text-field
|
|
69
73
|
:key="'cat' + index"
|
|
@@ -82,6 +86,7 @@
|
|
|
82
86
|
index
|
|
83
87
|
"
|
|
84
88
|
outlined
|
|
89
|
+
:disabled="render"
|
|
85
90
|
@click:append="
|
|
86
91
|
removeCategory(index)
|
|
87
92
|
"
|
|
@@ -101,11 +106,13 @@
|
|
|
101
106
|
.maxCategories
|
|
102
107
|
) < 6
|
|
103
108
|
"
|
|
109
|
+
elevation="0"
|
|
110
|
+
color="primary"
|
|
104
111
|
class="text-capitalize clickable"
|
|
112
|
+
:disabled="render"
|
|
105
113
|
@click="addCategory"
|
|
106
|
-
color="primary"
|
|
107
114
|
>
|
|
108
|
-
<v-icon>mdi-plus</v-icon> {{
|
|
115
|
+
<v-icon>mdi-plus</v-icon> {{
|
|
109
116
|
$t(
|
|
110
117
|
'windward.games.components.settings.quizshow_game.form.add_category'
|
|
111
118
|
)
|
|
@@ -120,7 +127,7 @@
|
|
|
120
127
|
<v-divider class="cardOutline primary"></v-divider>
|
|
121
128
|
<v-expansion-panel>
|
|
122
129
|
<v-expansion-panel-header>
|
|
123
|
-
<template
|
|
130
|
+
<template #default="{ open }">
|
|
124
131
|
<v-row no-gutters class="text-capitalize">
|
|
125
132
|
<h5>
|
|
126
133
|
{{
|
|
@@ -131,7 +138,7 @@
|
|
|
131
138
|
</h5>
|
|
132
139
|
</v-row>
|
|
133
140
|
</template>
|
|
134
|
-
<template
|
|
141
|
+
<template #actions>
|
|
135
142
|
<v-icon> mdi-chevron-down </v-icon>
|
|
136
143
|
</template>
|
|
137
144
|
</v-expansion-panel-header>
|
|
@@ -145,19 +152,19 @@
|
|
|
145
152
|
v-for="index in Number(
|
|
146
153
|
block.metadata.config.maxRows
|
|
147
154
|
)"
|
|
155
|
+
:key="'maxrows-row-' + index"
|
|
148
156
|
>
|
|
149
157
|
<v-text-field
|
|
150
158
|
:key="'row' + index"
|
|
151
|
-
append-icon="mdi-delete-outline"
|
|
152
159
|
v-model="
|
|
153
160
|
block.metadata.config.points[
|
|
154
161
|
index - 1
|
|
155
162
|
]
|
|
156
163
|
"
|
|
164
|
+
append-icon="mdi-delete-outline"
|
|
157
165
|
type="number"
|
|
158
166
|
min="1"
|
|
159
167
|
max="9999"
|
|
160
|
-
@input="onPointsChange(index - 1)"
|
|
161
168
|
:label="
|
|
162
169
|
$t(
|
|
163
170
|
'windward.games.components.settings.quizshow_game.form.row'
|
|
@@ -166,6 +173,8 @@
|
|
|
166
173
|
index
|
|
167
174
|
"
|
|
168
175
|
outlined
|
|
176
|
+
:disabled="render"
|
|
177
|
+
@input="onPointsChange(index - 1)"
|
|
169
178
|
@click:append="removeRow(index)"
|
|
170
179
|
></v-text-field>
|
|
171
180
|
</v-row>
|
|
@@ -177,11 +186,13 @@
|
|
|
177
186
|
.maxRows
|
|
178
187
|
) < 6
|
|
179
188
|
"
|
|
189
|
+
elevation="0"
|
|
180
190
|
class="text-capitalize clickable"
|
|
181
|
-
@click="addRow"
|
|
182
191
|
color="primary"
|
|
192
|
+
:disabled="render"
|
|
193
|
+
@click="addRow"
|
|
183
194
|
>
|
|
184
|
-
<v-icon>mdi-plus</v-icon> {{
|
|
195
|
+
<v-icon>mdi-plus</v-icon> {{
|
|
185
196
|
$t(
|
|
186
197
|
'windward.games.components.settings.quizshow_game.form.add_row'
|
|
187
198
|
)
|
|
@@ -209,7 +220,7 @@
|
|
|
209
220
|
|
|
210
221
|
<script>
|
|
211
222
|
import TextEditor from '~/components/Text/TextEditor.vue'
|
|
212
|
-
import BaseContentSettings from '~/components/Content/
|
|
223
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
213
224
|
export default {
|
|
214
225
|
name: 'QuizShowSettingsManager',
|
|
215
226
|
extends: BaseContentSettings,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<v-form ref="form" v-model="valid" v-if="!loading">
|
|
4
4
|
<v-container class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
|
+
ref="title"
|
|
6
7
|
v-model="block.metadata.config.title"
|
|
7
8
|
outlined
|
|
8
9
|
:counter="50"
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
'windward.games.components.settings.bucket_game.form.title'
|
|
13
14
|
)
|
|
14
15
|
"
|
|
15
|
-
|
|
16
|
+
:disabled="render"
|
|
16
17
|
></v-text-field>
|
|
17
18
|
<v-textarea
|
|
18
19
|
v-model="block.metadata.config.instructions"
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
'windward.games.components.settings.bucket_game.form.instructions'
|
|
24
25
|
)
|
|
25
26
|
"
|
|
27
|
+
:disabled="render"
|
|
26
28
|
></v-textarea>
|
|
27
29
|
</v-container>
|
|
28
30
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
<SortableExpansionPanel
|
|
38
40
|
v-model="block.metadata.config.words"
|
|
39
41
|
v-bind:currentPanel.sync="block.metadata.config.currentWord"
|
|
42
|
+
:disabled="render"
|
|
40
43
|
@click:close="onDelete($event)"
|
|
41
44
|
>
|
|
42
45
|
<template #header="{ item, index }">
|
|
@@ -64,6 +67,7 @@
|
|
|
64
67
|
"
|
|
65
68
|
outlined
|
|
66
69
|
:autofocus="true"
|
|
70
|
+
:disabled="render"
|
|
67
71
|
></v-textarea>
|
|
68
72
|
<p class="p-label">
|
|
69
73
|
{{
|
|
@@ -78,6 +82,7 @@
|
|
|
78
82
|
"
|
|
79
83
|
outlined
|
|
80
84
|
class="pt-4"
|
|
85
|
+
:disabled="render"
|
|
81
86
|
></v-textarea>
|
|
82
87
|
</v-flex>
|
|
83
88
|
</v-container>
|
|
@@ -86,7 +91,12 @@
|
|
|
86
91
|
</v-container>
|
|
87
92
|
<v-container class="pa-0">
|
|
88
93
|
<v-row justify="center" class="my-4">
|
|
89
|
-
<v-btn
|
|
94
|
+
<v-btn
|
|
95
|
+
color="primary"
|
|
96
|
+
elevation="0"
|
|
97
|
+
:disabled="render"
|
|
98
|
+
@click="onAddElement"
|
|
99
|
+
>
|
|
90
100
|
<v-icon>mdi-plus</v-icon>
|
|
91
101
|
{{
|
|
92
102
|
$t(
|
|
@@ -98,6 +108,7 @@
|
|
|
98
108
|
</v-container>
|
|
99
109
|
<v-row class="mt-3">
|
|
100
110
|
<v-textarea
|
|
111
|
+
ref="title"
|
|
101
112
|
v-model="block.metadata.config.feedback_correct"
|
|
102
113
|
outlined
|
|
103
114
|
auto-grow
|
|
@@ -107,7 +118,7 @@
|
|
|
107
118
|
'windward.games.components.settings.word_jumble.feedback_correct'
|
|
108
119
|
)
|
|
109
120
|
"
|
|
110
|
-
|
|
121
|
+
:disabled="render"
|
|
111
122
|
></v-textarea>
|
|
112
123
|
<v-textarea
|
|
113
124
|
v-model="block.metadata.config.feedback_incorrect"
|
|
@@ -118,6 +129,7 @@
|
|
|
118
129
|
'windward.games.components.settings.word_jumble.feedback_incorrect'
|
|
119
130
|
)
|
|
120
131
|
"
|
|
132
|
+
:disabled="render"
|
|
121
133
|
></v-textarea>
|
|
122
134
|
</v-row>
|
|
123
135
|
</v-form>
|
|
@@ -127,9 +139,9 @@
|
|
|
127
139
|
<script>
|
|
128
140
|
import _ from 'lodash'
|
|
129
141
|
import draggable from 'vuedraggable'
|
|
130
|
-
import BaseContentSettings from '~/components/Content/
|
|
142
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
131
143
|
import CrudTable from '../content/CrudTable.vue'
|
|
132
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
144
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
133
145
|
|
|
134
146
|
export default {
|
|
135
147
|
name: 'SevenStrikesSettingsManager',
|
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
'windward.games.components.settings.slideshow.form.title'
|
|
13
13
|
)
|
|
14
14
|
"
|
|
15
|
+
:disabled="render"
|
|
15
16
|
></v-text-field>
|
|
16
17
|
<v-textarea
|
|
18
|
+
v-model="block.metadata.config.instructions"
|
|
17
19
|
outlined
|
|
18
20
|
auto-grow
|
|
19
|
-
v-model="block.metadata.config.instructions"
|
|
20
21
|
:counter="255"
|
|
21
22
|
maxlength="255"
|
|
22
23
|
:label="
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
'windward.games.components.settings.slideshow.form.instructions'
|
|
25
26
|
)
|
|
26
27
|
"
|
|
28
|
+
:disabled="render"
|
|
27
29
|
></v-textarea>
|
|
28
30
|
</v-container>
|
|
29
31
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
v-bind:currentPanel.sync="
|
|
41
43
|
block.metadata.config.currentSlide
|
|
42
44
|
"
|
|
45
|
+
:disabled="render"
|
|
43
46
|
@click:close="onDeleteSlide($event)"
|
|
44
47
|
>
|
|
45
48
|
<template #header="{ item, index }">
|
|
@@ -65,6 +68,7 @@
|
|
|
65
68
|
'windward.games.components.content.blocks.slideshow.slides.slide_header'
|
|
66
69
|
)
|
|
67
70
|
"
|
|
71
|
+
:disabled="render"
|
|
68
72
|
></v-text-field>
|
|
69
73
|
<v-text-field
|
|
70
74
|
v-model="
|
|
@@ -77,32 +81,55 @@
|
|
|
77
81
|
'windward.games.components.content.blocks.slideshow.slides.slide_description'
|
|
78
82
|
)
|
|
79
83
|
"
|
|
84
|
+
:disabled="render"
|
|
80
85
|
></v-text-field>
|
|
81
|
-
|
|
86
|
+
|
|
87
|
+
<ContentBlockAsset
|
|
88
|
+
id="content-block-asset"
|
|
82
89
|
v-model="
|
|
83
90
|
block.metadata.config.slides[index]
|
|
84
|
-
.
|
|
91
|
+
.imageAsset
|
|
92
|
+
"
|
|
93
|
+
:assets.sync="block.assets"
|
|
94
|
+
mimes="image/png,image/jpeg"
|
|
95
|
+
:disabled="render"
|
|
96
|
+
></ContentBlockAsset>
|
|
97
|
+
|
|
98
|
+
<v-text-field
|
|
99
|
+
v-if="
|
|
100
|
+
block.metadata.config.slides[index]
|
|
101
|
+
.imageAsset
|
|
85
102
|
"
|
|
103
|
+
v-model="
|
|
104
|
+
block.metadata.config.slides[index].imageAlt
|
|
105
|
+
"
|
|
106
|
+
class="mt-4"
|
|
86
107
|
outlined
|
|
108
|
+
:placeholder="
|
|
109
|
+
getImageAlt(
|
|
110
|
+
block.metadata.config.slides[index]
|
|
111
|
+
.imageAsset
|
|
112
|
+
)
|
|
113
|
+
"
|
|
114
|
+
persistent-placeholder
|
|
87
115
|
:label="
|
|
88
116
|
$t(
|
|
89
117
|
'windward.games.components.content.blocks.slideshow.slides.image_alt'
|
|
90
118
|
)
|
|
91
119
|
"
|
|
120
|
+
:disabled="render"
|
|
92
121
|
></v-text-field>
|
|
93
|
-
<ContentBlockAsset
|
|
94
|
-
id="content-block-asset"
|
|
95
|
-
v-model="
|
|
96
|
-
block.metadata.config.slides[index].image
|
|
97
|
-
"
|
|
98
|
-
mimes="image/png,image/jpeg"
|
|
99
|
-
></ContentBlockAsset>
|
|
100
122
|
</v-container>
|
|
101
123
|
</template>
|
|
102
124
|
</SortableExpansionPanel>
|
|
103
125
|
<v-container>
|
|
104
126
|
<v-row justify="center" class="my-4">
|
|
105
|
-
<v-btn
|
|
127
|
+
<v-btn
|
|
128
|
+
color="primary"
|
|
129
|
+
elevation="0"
|
|
130
|
+
:disabled="render"
|
|
131
|
+
@click="onAddSlide"
|
|
132
|
+
>
|
|
106
133
|
<v-icon>mdi-plus</v-icon>
|
|
107
134
|
{{
|
|
108
135
|
$t(
|
|
@@ -125,10 +152,10 @@
|
|
|
125
152
|
</div>
|
|
126
153
|
</template>
|
|
127
154
|
<script>
|
|
128
|
-
import BaseContentSettings from '~/components/Content/
|
|
155
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
129
156
|
import _ from 'lodash'
|
|
130
157
|
import ContentBlockAsset from '~/components/Content/ContentBlockAsset.vue'
|
|
131
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
158
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
132
159
|
|
|
133
160
|
export default {
|
|
134
161
|
name: 'SlideShowManager',
|
|
@@ -184,8 +211,8 @@ export default {
|
|
|
184
211
|
id: this.block.metadata.config.slides.length + 1,
|
|
185
212
|
header: '',
|
|
186
213
|
description: '',
|
|
187
|
-
|
|
188
|
-
|
|
214
|
+
imageAsset: null,
|
|
215
|
+
imageAlt: '',
|
|
189
216
|
}
|
|
190
217
|
this.block.metadata.config.slides.push(defaultSlide)
|
|
191
218
|
this.block.metadata.config.currentSlide =
|
|
@@ -215,6 +242,10 @@ export default {
|
|
|
215
242
|
this.block.metadata.config.currentSlide =
|
|
216
243
|
this.block.metadata.config.slides.length - 1
|
|
217
244
|
},
|
|
245
|
+
getImageAlt(file) {
|
|
246
|
+
file = this.resolveAsset(file)
|
|
247
|
+
return _.get(file, 'asset.metadata.props.alt', '')
|
|
248
|
+
},
|
|
218
249
|
},
|
|
219
250
|
}
|
|
220
251
|
</script>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<v-form ref="form" v-model="valid" v-if="!loading">
|
|
4
4
|
<v-container class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
|
+
ref="title"
|
|
6
7
|
v-model="block.metadata.config.title"
|
|
7
8
|
outlined
|
|
8
9
|
:autofocus="true"
|
|
@@ -12,18 +13,19 @@
|
|
|
12
13
|
'windward.games.components.settings.bucket_game.form.title'
|
|
13
14
|
)
|
|
14
15
|
"
|
|
15
|
-
|
|
16
|
+
:disabled="render"
|
|
16
17
|
></v-text-field>
|
|
17
18
|
<v-textarea
|
|
19
|
+
v-model="block.metadata.config.instructions"
|
|
18
20
|
outlined
|
|
19
21
|
auto-grow
|
|
20
|
-
v-model="block.metadata.config.instructions"
|
|
21
22
|
:counter="255"
|
|
22
23
|
:label="
|
|
23
24
|
$t(
|
|
24
25
|
'windward.games.components.settings.bucket_game.form.instructions'
|
|
25
26
|
)
|
|
26
27
|
"
|
|
28
|
+
:disabled="render"
|
|
27
29
|
></v-textarea>
|
|
28
30
|
</v-container>
|
|
29
31
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
</p>
|
|
38
40
|
<SortableExpansionPanel
|
|
39
41
|
v-model="block.metadata.config.answer"
|
|
42
|
+
:disabled="render"
|
|
40
43
|
@click:close="onDelete($event)"
|
|
41
44
|
>
|
|
42
45
|
<template #header="{ item, index }">
|
|
@@ -58,11 +61,12 @@
|
|
|
58
61
|
}}
|
|
59
62
|
</p>
|
|
60
63
|
<v-textarea
|
|
61
|
-
outlined
|
|
62
64
|
v-model="
|
|
63
65
|
block.metadata.config.answer[index].value
|
|
64
66
|
"
|
|
67
|
+
outlined
|
|
65
68
|
:autofocus="true"
|
|
69
|
+
:disabled="render"
|
|
66
70
|
></v-textarea>
|
|
67
71
|
</v-container>
|
|
68
72
|
</template>
|
|
@@ -70,7 +74,12 @@
|
|
|
70
74
|
</v-container>
|
|
71
75
|
<v-container class="pa-0">
|
|
72
76
|
<v-row justify="center" class="my-4">
|
|
73
|
-
<v-btn
|
|
77
|
+
<v-btn
|
|
78
|
+
color="primary"
|
|
79
|
+
elevation="0"
|
|
80
|
+
:disabled="render"
|
|
81
|
+
@click="onAddElement"
|
|
82
|
+
>
|
|
74
83
|
<v-icon>mdi-plus</v-icon>
|
|
75
84
|
{{
|
|
76
85
|
$t(
|
|
@@ -80,26 +89,28 @@
|
|
|
80
89
|
</v-btn>
|
|
81
90
|
</v-row>
|
|
82
91
|
<v-textarea
|
|
92
|
+
v-model="block.metadata.config.feedback_correct"
|
|
83
93
|
outlined
|
|
84
94
|
auto-grow
|
|
85
|
-
v-model="block.metadata.config.feedback_correct"
|
|
86
95
|
:counter="255"
|
|
87
96
|
:label="
|
|
88
97
|
$t(
|
|
89
98
|
'windward.games.components.settings.bucket_game.form.feedback.correct'
|
|
90
99
|
)
|
|
91
100
|
"
|
|
101
|
+
:disabled="render"
|
|
92
102
|
></v-textarea>
|
|
93
103
|
<v-textarea
|
|
104
|
+
v-model="block.metadata.config.feedback_incorrect"
|
|
94
105
|
outlined
|
|
95
106
|
auto-grow
|
|
96
|
-
v-model="block.metadata.config.feedback_incorrect"
|
|
97
107
|
:counter="255"
|
|
98
108
|
:label="
|
|
99
109
|
$t(
|
|
100
110
|
'windward.games.components.settings.bucket_game.form.feedback.incorrect'
|
|
101
111
|
)
|
|
102
112
|
"
|
|
113
|
+
:disabled="render"
|
|
103
114
|
></v-textarea>
|
|
104
115
|
</v-container>
|
|
105
116
|
</v-form>
|
|
@@ -116,8 +127,8 @@
|
|
|
116
127
|
|
|
117
128
|
<script>
|
|
118
129
|
import _ from 'lodash'
|
|
119
|
-
import BaseContentSettings from '~/components/Content/
|
|
120
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
130
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
131
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
121
132
|
export default {
|
|
122
133
|
name: 'SortingGameSettingsManager',
|
|
123
134
|
extends: BaseContentSettings,
|