@windward/games 0.5.1 → 0.7.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/CHANGELOG.md +11 -0
- package/bitbucket-pipelines.yml +14 -0
- package/components/content/blocks/dragDrop/BucketGame.vue +24 -8
- package/components/content/blocks/flashcards/CardFace.vue +3 -3
- package/components/content/blocks/matchingGame/MatchingGame.vue +30 -38
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +2 -6
- package/components/content/blocks/wordJumble/WordJumble.vue +9 -8
- package/components/settings/BucketGameSettingsManager.vue +253 -243
- package/components/settings/CrosswordPuzzleSettingsManager.vue +164 -111
- package/components/settings/FlashCardSlidesManager.vue +337 -336
- package/components/settings/MatchingGameManager.vue +347 -323
- package/components/settings/MultipleChoiceSettingsManager.vue +100 -69
- package/components/settings/QuizShowSettingsManager.vue +223 -203
- package/components/settings/SevenStrikesSettingsManager.vue +173 -133
- package/components/settings/SlideShowManager.vue +174 -134
- package/components/settings/SortingGameSettingsManager.vue +157 -108
- package/components/settings/WordJumbleSettingsManager.vue +171 -135
- package/i18n/en-US/components/content/blocks/bucket_game.ts +1 -0
- package/i18n/en-US/components/content/blocks/flashcard.ts +2 -2
- package/i18n/en-US/components/content/blocks/quizshow_game.ts +1 -1
- package/i18n/en-US/components/settings/bucket_game.ts +2 -1
- package/i18n/en-US/components/settings/crossword.ts +1 -0
- package/i18n/en-US/components/settings/flashcard.ts +2 -1
- package/i18n/en-US/components/settings/matching_game.ts +1 -0
- package/i18n/en-US/components/settings/multiple_choice.ts +1 -0
- package/i18n/en-US/components/settings/quizshow_game.ts +1 -1
- package/i18n/en-US/components/settings/seven_strikes.ts +1 -1
- package/i18n/en-US/components/settings/slideshow.ts +3 -2
- package/i18n/en-US/components/settings/sorting_game.ts +1 -0
- package/i18n/en-US/components/settings/word_jumble.ts +1 -0
- package/i18n/en-US/shared/settings.ts +3 -0
- package/i18n/es-ES/components/content/blocks/bucket_game.ts +1 -0
- package/i18n/es-ES/components/settings/bucket_game.ts +3 -1
- package/i18n/es-ES/components/settings/crossword.ts +2 -0
- package/i18n/es-ES/components/settings/flashcard.ts +1 -0
- package/i18n/es-ES/components/settings/matching_game.ts +1 -0
- package/i18n/es-ES/components/settings/multiple_choice.ts +2 -0
- package/i18n/es-ES/components/settings/quizshow_game.ts +1 -1
- package/i18n/es-ES/components/settings/slideshow.ts +1 -0
- package/i18n/es-ES/components/settings/sorting_game.ts +1 -0
- package/i18n/es-ES/components/settings/word_jumble.ts +1 -0
- package/i18n/es-ES/shared/settings.ts +3 -0
- package/i18n/sv-SE/components/content/blocks/bucket_game.ts +1 -0
- package/i18n/sv-SE/components/content/blocks/quizshow_game.ts +1 -1
- package/i18n/sv-SE/components/settings/bucket_game.ts +2 -0
- package/i18n/sv-SE/components/settings/crossword.ts +1 -0
- package/i18n/sv-SE/components/settings/flashcard.ts +1 -0
- package/i18n/sv-SE/components/settings/matching_game.ts +1 -0
- package/i18n/sv-SE/components/settings/multiple_choice.ts +1 -0
- package/i18n/sv-SE/components/settings/quizshow_game.ts +1 -1
- package/i18n/sv-SE/components/settings/slideshow.ts +1 -0
- package/i18n/sv-SE/components/settings/sorting_game.ts +1 -0
- package/i18n/sv-SE/components/settings/word_jumble.ts +2 -1
- package/i18n/sv-SE/shared/content_blocks.ts +5 -5
- package/i18n/sv-SE/shared/settings.ts +8 -5
- package/package.json +1 -1
|
@@ -1,345 +1,324 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<v-
|
|
4
|
-
<v-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
3
|
+
<v-container class="pa-0">
|
|
4
|
+
<v-text-field
|
|
5
|
+
ref="title"
|
|
6
|
+
v-model="block.metadata.config.title"
|
|
7
|
+
:rules="validation.shortInputRules"
|
|
8
|
+
:autofocus="true"
|
|
9
|
+
outlined
|
|
10
|
+
:counter="50"
|
|
11
|
+
:label="
|
|
12
|
+
$t(
|
|
13
|
+
'windward.games.components.settings.matching_game.form.title'
|
|
14
|
+
)
|
|
15
|
+
"
|
|
16
|
+
:disabled="render"
|
|
17
|
+
></v-text-field>
|
|
18
|
+
<v-textarea
|
|
19
|
+
v-model="block.metadata.config.instructions"
|
|
20
|
+
:rules="validation.instructionRule"
|
|
21
|
+
outlined
|
|
22
|
+
auto-grow
|
|
23
|
+
:counter="255"
|
|
24
|
+
:label="
|
|
25
|
+
$t(
|
|
26
|
+
'windward.games.components.settings.matching_game.form.instructions'
|
|
27
|
+
)
|
|
28
|
+
"
|
|
29
|
+
:disabled="render"
|
|
30
|
+
></v-textarea>
|
|
31
|
+
</v-container>
|
|
32
|
+
<v-divider class="my-4 primary"></v-divider>
|
|
33
|
+
<v-container class="pa-0">
|
|
34
|
+
<p>
|
|
35
|
+
{{
|
|
36
|
+
$t(
|
|
37
|
+
'windward.games.components.content.blocks.matching_game.terms'
|
|
38
|
+
)
|
|
39
|
+
}}
|
|
40
|
+
</p>
|
|
41
|
+
<SortableExpansionPanel
|
|
42
|
+
v-model="block.metadata.config.answerObjects"
|
|
43
|
+
:disabled="render"
|
|
44
|
+
@change="onDragged"
|
|
45
|
+
@click:close="onConfirmDeleteAnswer($event)"
|
|
46
|
+
>
|
|
47
|
+
<template #header="{ item, index }">
|
|
34
48
|
{{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
49
|
+
item.display
|
|
50
|
+
? block.metadata.config.answerObjects[index].display
|
|
51
|
+
: $t(
|
|
52
|
+
'windward.games.components.content.blocks.matching_game.click_here'
|
|
53
|
+
)
|
|
38
54
|
}}
|
|
39
|
-
</
|
|
40
|
-
<
|
|
41
|
-
v-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
55
|
+
</template>
|
|
56
|
+
<template #body="{ index }">
|
|
57
|
+
<v-container>
|
|
58
|
+
<v-flex xs12>
|
|
59
|
+
<p color="primary" class="p-label">
|
|
60
|
+
{{
|
|
61
|
+
$t(
|
|
62
|
+
'windward.games.components.content.blocks.matching_game.term'
|
|
63
|
+
)
|
|
64
|
+
}}
|
|
65
|
+
</p>
|
|
66
|
+
<v-text-field
|
|
67
|
+
v-model="
|
|
68
|
+
block.metadata.config.answerObjects[index]
|
|
69
|
+
.display
|
|
70
|
+
"
|
|
71
|
+
:counter="50"
|
|
72
|
+
:rules="validation.shortInputRules"
|
|
73
|
+
outlined
|
|
74
|
+
:disabled="render"
|
|
75
|
+
></v-text-field>
|
|
76
|
+
</v-flex>
|
|
77
|
+
<v-flex xs12>
|
|
78
|
+
<p color="primary" class="p-label">
|
|
79
|
+
{{
|
|
80
|
+
$t(
|
|
81
|
+
'windward.games.components.content.blocks.matching_game.prompts'
|
|
82
|
+
)
|
|
83
|
+
}}
|
|
84
|
+
</p>
|
|
85
|
+
</v-flex>
|
|
86
|
+
|
|
87
|
+
<SortableExpansionPanel
|
|
88
|
+
v-model="block.metadata.config.prompts[index]"
|
|
89
|
+
:disabled="render"
|
|
90
|
+
@click:close="onConfirmDeletePrompt($event, index)"
|
|
91
|
+
>
|
|
92
|
+
<template
|
|
93
|
+
#header="{ item: prompt, index: indexPrompt }"
|
|
94
|
+
>
|
|
95
|
+
<span v-if="prompt.textOrImage === 'text'">
|
|
79
96
|
{{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
97
|
+
prompt.prompt
|
|
98
|
+
? block.metadata.config.prompts[
|
|
99
|
+
index
|
|
100
|
+
][indexPrompt].prompt
|
|
101
|
+
: $t(
|
|
102
|
+
'windward.games.components.content.blocks.matching_game.click_here'
|
|
103
|
+
)
|
|
83
104
|
}}
|
|
84
|
-
</
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
105
|
+
</span>
|
|
106
|
+
<span v-if="prompt.textOrImage === 'image'">{{
|
|
107
|
+
prompt.file && prompt.file !== null
|
|
108
|
+
? prompt.file.name
|
|
109
|
+
: $t(
|
|
110
|
+
'windward.games.components.content.blocks.matching_game.image'
|
|
111
|
+
)
|
|
112
|
+
}}</span>
|
|
113
|
+
</template>
|
|
114
|
+
<template
|
|
115
|
+
#body="{ item: prompt, index: indexPrompt }"
|
|
93
116
|
>
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}"
|
|
99
|
-
>
|
|
100
|
-
<span v-if="prompt.textOrImage === 'text'">
|
|
101
|
-
{{
|
|
102
|
-
prompt.prompt
|
|
103
|
-
? block.metadata.config.prompts[
|
|
104
|
-
index
|
|
105
|
-
][indexPrompt].prompt
|
|
106
|
-
: $t(
|
|
107
|
-
'windward.games.components.content.blocks.matching_game.click_here'
|
|
108
|
-
)
|
|
109
|
-
}}
|
|
110
|
-
</span>
|
|
111
|
-
<span
|
|
112
|
-
v-if="prompt.textOrImage === 'image'"
|
|
113
|
-
>{{
|
|
114
|
-
prompt.file && prompt.file !== null
|
|
115
|
-
? prompt.file.name
|
|
116
|
-
: $t(
|
|
117
|
-
'windward.games.components.content.blocks.matching_game.image'
|
|
118
|
-
)
|
|
119
|
-
}}</span
|
|
120
|
-
>
|
|
121
|
-
</template>
|
|
122
|
-
<template
|
|
123
|
-
#body="{ item: prompt, index: indexPrompt }"
|
|
124
|
-
>
|
|
125
|
-
<v-container>
|
|
126
|
-
<v-container class="pa-0">
|
|
127
|
-
<v-row
|
|
128
|
-
class="ma-1 d-flex align-center justify-space-between"
|
|
129
|
-
>
|
|
130
|
-
<v-col
|
|
131
|
-
cols="6"
|
|
132
|
-
color="primary"
|
|
133
|
-
class="p-label d-flex align-center justify-start mb-0 pa-0"
|
|
134
|
-
>
|
|
135
|
-
{{
|
|
136
|
-
$t(
|
|
137
|
-
'windward.games.components.content.blocks.matching_game.prompt'
|
|
138
|
-
)
|
|
139
|
-
}}
|
|
140
|
-
</v-col>
|
|
141
|
-
<v-col
|
|
142
|
-
cols="6"
|
|
143
|
-
class="d-flex justify-end pa-0"
|
|
144
|
-
>
|
|
145
|
-
<v-btn-toggle
|
|
146
|
-
v-model="
|
|
147
|
-
block.metadata
|
|
148
|
-
.config.prompts[
|
|
149
|
-
index
|
|
150
|
-
][indexPrompt]
|
|
151
|
-
.textOrImage
|
|
152
|
-
"
|
|
153
|
-
borderless
|
|
154
|
-
>
|
|
155
|
-
<v-btn
|
|
156
|
-
text
|
|
157
|
-
elevation="0"
|
|
158
|
-
class="pa-0 mr-2 btn-text-file-toggle"
|
|
159
|
-
value="text"
|
|
160
|
-
:disabled="render"
|
|
161
|
-
><v-icon
|
|
162
|
-
>mdi-alpha-t</v-icon
|
|
163
|
-
></v-btn
|
|
164
|
-
>
|
|
165
|
-
<v-btn
|
|
166
|
-
text
|
|
167
|
-
elevation="0"
|
|
168
|
-
class="pa-0 btn-text-file-toggle"
|
|
169
|
-
value="image"
|
|
170
|
-
:disabled="render"
|
|
171
|
-
><v-icon
|
|
172
|
-
>mdi-image-area</v-icon
|
|
173
|
-
></v-btn
|
|
174
|
-
>
|
|
175
|
-
</v-btn-toggle>
|
|
176
|
-
</v-col>
|
|
177
|
-
</v-row>
|
|
178
|
-
</v-container>
|
|
179
|
-
<v-container class="pa-0">
|
|
180
|
-
<v-text-field
|
|
181
|
-
v-if="
|
|
182
|
-
prompt.textOrImage ===
|
|
183
|
-
'text'
|
|
184
|
-
"
|
|
185
|
-
v-model="
|
|
186
|
-
block.metadata.config
|
|
187
|
-
.prompts[index][
|
|
188
|
-
indexPrompt
|
|
189
|
-
].prompt
|
|
190
|
-
"
|
|
191
|
-
:label="
|
|
192
|
-
$t(
|
|
193
|
-
'windward.games.components.settings.matching_game.form.prompt_body'
|
|
194
|
-
)
|
|
195
|
-
"
|
|
196
|
-
outlined
|
|
197
|
-
:autofocus="true"
|
|
198
|
-
:disabled="render"
|
|
199
|
-
></v-text-field>
|
|
200
|
-
</v-container>
|
|
201
|
-
<v-container
|
|
202
|
-
v-if="
|
|
203
|
-
prompt.textOrImage === 'image'
|
|
204
|
-
"
|
|
205
|
-
class="pa-0"
|
|
117
|
+
<v-container>
|
|
118
|
+
<v-container class="pa-0">
|
|
119
|
+
<v-row
|
|
120
|
+
class="ma-1 d-flex align-center justify-space-between"
|
|
206
121
|
>
|
|
207
|
-
<v-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
block.metadata.config
|
|
214
|
-
.prompts[index][
|
|
215
|
-
indexPrompt
|
|
216
|
-
].altText
|
|
217
|
-
"
|
|
218
|
-
class="pt-3 pb-3"
|
|
219
|
-
:hide-details="true"
|
|
220
|
-
dense
|
|
221
|
-
outlined
|
|
222
|
-
:autofocus="true"
|
|
223
|
-
:label="
|
|
224
|
-
$t(
|
|
225
|
-
'windward.games.components.content.blocks.matching_game.alt_image'
|
|
226
|
-
)
|
|
227
|
-
"
|
|
228
|
-
:placeholder="
|
|
229
|
-
getAriaDescribedBy(
|
|
230
|
-
block.metadata.config
|
|
231
|
-
.prompts[index][
|
|
232
|
-
indexPrompt
|
|
233
|
-
].file
|
|
234
|
-
)
|
|
235
|
-
"
|
|
236
|
-
persistent-placeholder
|
|
237
|
-
:disabled="render"
|
|
238
|
-
></v-text-field>
|
|
239
|
-
<v-text-field
|
|
240
|
-
v-if="
|
|
241
|
-
prompt.textOrImage ===
|
|
242
|
-
'image'
|
|
243
|
-
"
|
|
244
|
-
v-model="
|
|
245
|
-
block.metadata.config
|
|
246
|
-
.prompts[index][
|
|
247
|
-
indexPrompt
|
|
248
|
-
].ariaDescribedBy
|
|
249
|
-
"
|
|
250
|
-
class="pt-3 pb-3"
|
|
251
|
-
:hide-details="true"
|
|
252
|
-
dense
|
|
253
|
-
outlined
|
|
254
|
-
:label="
|
|
122
|
+
<v-col
|
|
123
|
+
cols="6"
|
|
124
|
+
color="primary"
|
|
125
|
+
class="p-label d-flex align-center justify-start mb-0 pa-0"
|
|
126
|
+
>
|
|
127
|
+
{{
|
|
255
128
|
$t(
|
|
256
|
-
'windward.games.components.content.blocks.matching_game.
|
|
129
|
+
'windward.games.components.content.blocks.matching_game.prompt'
|
|
257
130
|
)
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
131
|
+
}}
|
|
132
|
+
</v-col>
|
|
133
|
+
<v-col
|
|
134
|
+
cols="6"
|
|
135
|
+
class="d-flex justify-end pa-0"
|
|
136
|
+
>
|
|
137
|
+
<v-btn-toggle
|
|
138
|
+
v-model="
|
|
261
139
|
block.metadata.config
|
|
262
140
|
.prompts[index][
|
|
263
141
|
indexPrompt
|
|
264
|
-
].
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
142
|
+
].textOrImage
|
|
143
|
+
"
|
|
144
|
+
borderless
|
|
145
|
+
>
|
|
146
|
+
<v-btn
|
|
147
|
+
text
|
|
148
|
+
elevation="0"
|
|
149
|
+
class="pa-0 mr-2 btn-text-file-toggle"
|
|
150
|
+
value="text"
|
|
151
|
+
:disabled="render"
|
|
152
|
+
><v-icon
|
|
153
|
+
>mdi-alpha-t</v-icon
|
|
154
|
+
></v-btn
|
|
155
|
+
>
|
|
156
|
+
<v-btn
|
|
157
|
+
text
|
|
158
|
+
elevation="0"
|
|
159
|
+
class="pa-0 btn-text-file-toggle"
|
|
160
|
+
value="image"
|
|
161
|
+
:disabled="render"
|
|
162
|
+
><v-icon
|
|
163
|
+
>mdi-image-area</v-icon
|
|
164
|
+
></v-btn
|
|
165
|
+
>
|
|
166
|
+
</v-btn-toggle>
|
|
167
|
+
</v-col>
|
|
168
|
+
</v-row>
|
|
169
|
+
</v-container>
|
|
170
|
+
<v-container class="pa-0">
|
|
171
|
+
<v-textarea
|
|
172
|
+
v-if="prompt.textOrImage === 'text'"
|
|
173
|
+
v-model="
|
|
174
|
+
block.metadata.config.prompts[
|
|
175
|
+
index
|
|
176
|
+
][indexPrompt].prompt
|
|
177
|
+
"
|
|
178
|
+
:counter="200"
|
|
179
|
+
:rules="validation.promptRule"
|
|
180
|
+
:label="
|
|
181
|
+
$t(
|
|
182
|
+
'windward.games.components.settings.matching_game.form.prompt_body'
|
|
183
|
+
)
|
|
184
|
+
"
|
|
185
|
+
outlined
|
|
186
|
+
:autofocus="true"
|
|
187
|
+
:disabled="render"
|
|
188
|
+
></v-textarea>
|
|
189
|
+
</v-container>
|
|
190
|
+
<v-container
|
|
191
|
+
v-if="prompt.textOrImage === 'image'"
|
|
192
|
+
class="pa-0"
|
|
193
|
+
>
|
|
194
|
+
<v-text-field
|
|
195
|
+
v-if="
|
|
196
|
+
prompt.textOrImage === 'image'
|
|
197
|
+
"
|
|
198
|
+
v-model="
|
|
199
|
+
block.metadata.config.prompts[
|
|
200
|
+
index
|
|
201
|
+
][indexPrompt].altText
|
|
202
|
+
"
|
|
203
|
+
class="pt-3 pb-3"
|
|
204
|
+
:hide-details="true"
|
|
205
|
+
dense
|
|
206
|
+
outlined
|
|
207
|
+
:autofocus="true"
|
|
208
|
+
:label="
|
|
209
|
+
$t(
|
|
210
|
+
'windward.games.components.content.blocks.matching_game.alt_image'
|
|
211
|
+
)
|
|
212
|
+
"
|
|
213
|
+
:placeholder="
|
|
214
|
+
getAriaDescribedBy(
|
|
276
215
|
block.metadata.config
|
|
277
216
|
.prompts[index][
|
|
278
217
|
indexPrompt
|
|
279
218
|
].file
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
219
|
+
)
|
|
220
|
+
"
|
|
221
|
+
persistent-placeholder
|
|
222
|
+
:disabled="render"
|
|
223
|
+
></v-text-field>
|
|
224
|
+
<v-text-field
|
|
225
|
+
v-if="
|
|
226
|
+
prompt.textOrImage === 'image'
|
|
227
|
+
"
|
|
228
|
+
v-model="
|
|
229
|
+
block.metadata.config.prompts[
|
|
230
|
+
index
|
|
231
|
+
][indexPrompt].ariaDescribedBy
|
|
232
|
+
"
|
|
233
|
+
class="pt-3 pb-3"
|
|
234
|
+
:hide-details="true"
|
|
235
|
+
dense
|
|
236
|
+
outlined
|
|
237
|
+
:label="
|
|
238
|
+
$t(
|
|
239
|
+
'windward.games.components.content.blocks.matching_game.aria_described'
|
|
240
|
+
)
|
|
241
|
+
"
|
|
242
|
+
:placeholder="
|
|
243
|
+
getAlt(
|
|
290
244
|
block.metadata.config
|
|
291
245
|
.prompts[index][
|
|
292
246
|
indexPrompt
|
|
293
|
-
].
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
247
|
+
].file
|
|
248
|
+
)
|
|
249
|
+
"
|
|
250
|
+
persistent-placeholder
|
|
251
|
+
:disabled="render"
|
|
252
|
+
></v-text-field>
|
|
253
|
+
<ContentBlockAsset
|
|
254
|
+
v-if="
|
|
255
|
+
prompt.textOrImage === 'image'
|
|
256
|
+
"
|
|
257
|
+
v-model="
|
|
258
|
+
block.metadata.config.prompts[
|
|
259
|
+
index
|
|
260
|
+
][indexPrompt].file
|
|
261
|
+
"
|
|
262
|
+
:assets.sync="block.assets"
|
|
263
|
+
class="content-block-asset"
|
|
264
|
+
mimes="image/png,image/jpeg"
|
|
265
|
+
:disabled="render"
|
|
266
|
+
></ContentBlockAsset>
|
|
303
267
|
</v-container>
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
</v-
|
|
320
|
-
</
|
|
321
|
-
</
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
268
|
+
<v-container class="pa-0">
|
|
269
|
+
<v-text-field
|
|
270
|
+
v-model="
|
|
271
|
+
block.metadata.config.prompts[
|
|
272
|
+
index
|
|
273
|
+
][indexPrompt].matchExplanation
|
|
274
|
+
"
|
|
275
|
+
:label="
|
|
276
|
+
$t(
|
|
277
|
+
'windward.games.components.settings.matching_game.form.correct_match_label'
|
|
278
|
+
)
|
|
279
|
+
"
|
|
280
|
+
outlined
|
|
281
|
+
></v-text-field>
|
|
282
|
+
</v-container>
|
|
283
|
+
</v-container>
|
|
284
|
+
</template>
|
|
285
|
+
</SortableExpansionPanel>
|
|
286
|
+
<v-row justify="center" class="my-4">
|
|
287
|
+
<v-btn
|
|
288
|
+
color="primary"
|
|
289
|
+
elevation="0"
|
|
290
|
+
:disabled="render"
|
|
291
|
+
@click="onAddPrompt(index)"
|
|
292
|
+
>
|
|
293
|
+
<v-icon>mdi-plus</v-icon>
|
|
294
|
+
{{
|
|
295
|
+
$t(
|
|
296
|
+
'windward.games.components.content.blocks.matching_game.add_prompt'
|
|
297
|
+
)
|
|
298
|
+
}}
|
|
299
|
+
</v-btn>
|
|
300
|
+
</v-row>
|
|
301
|
+
</v-container>
|
|
302
|
+
</template>
|
|
303
|
+
</SortableExpansionPanel>
|
|
304
|
+
</v-container>
|
|
305
|
+
<v-container class="pa-0">
|
|
306
|
+
<v-row justify="center" class="my-4">
|
|
307
|
+
<v-btn
|
|
308
|
+
color="primary"
|
|
309
|
+
elevation="0"
|
|
310
|
+
:disabled="render"
|
|
311
|
+
@click="onAddAnswer"
|
|
312
|
+
>
|
|
313
|
+
<v-icon>mdi-plus</v-icon>
|
|
314
|
+
{{
|
|
315
|
+
$t(
|
|
316
|
+
'windward.games.components.content.blocks.matching_game.add_answer'
|
|
317
|
+
)
|
|
318
|
+
}}
|
|
319
|
+
</v-btn>
|
|
320
|
+
</v-row>
|
|
321
|
+
</v-container>
|
|
343
322
|
<div v-if="loading" class="text-center">
|
|
344
323
|
<v-progress-circular
|
|
345
324
|
:size="70"
|
|
@@ -355,6 +334,7 @@
|
|
|
355
334
|
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
356
335
|
import _ from 'lodash'
|
|
357
336
|
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
337
|
+
import Uuid from '~/helpers/Uuid'
|
|
358
338
|
|
|
359
339
|
export default {
|
|
360
340
|
name: 'MatchingGameManager',
|
|
@@ -380,8 +360,14 @@ export default {
|
|
|
380
360
|
'windward.games.components.settings.matching_game.form.title'
|
|
381
361
|
)
|
|
382
362
|
}
|
|
383
|
-
if (
|
|
384
|
-
this.block.metadata.config.instructions
|
|
363
|
+
if (
|
|
364
|
+
_.isEmpty(this.block.metadata.config.instructions) &&
|
|
365
|
+
this.block.id &&
|
|
366
|
+
!Uuid.test(this.block.id)
|
|
367
|
+
) {
|
|
368
|
+
this.block.metadata.config.instructions = this.$t(
|
|
369
|
+
'windward.games.components.settings.matching_game.form.default_instructions'
|
|
370
|
+
)
|
|
385
371
|
}
|
|
386
372
|
if (_.isEmpty(this.block.metadata.config.feedback_correct)) {
|
|
387
373
|
this.block.metadata.config.feedback_correct = this.$t(
|
|
@@ -410,6 +396,44 @@ export default {
|
|
|
410
396
|
return {
|
|
411
397
|
valid: true,
|
|
412
398
|
loading: false,
|
|
399
|
+
validation: {
|
|
400
|
+
shortInputRules: [
|
|
401
|
+
(v) => {
|
|
402
|
+
if (v && v.length >= 50) {
|
|
403
|
+
return this.$t(
|
|
404
|
+
'windward.games.shared.settings.errors.input_limitations',
|
|
405
|
+
[50]
|
|
406
|
+
)
|
|
407
|
+
} else {
|
|
408
|
+
return true
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
],
|
|
412
|
+
instructionRule: [
|
|
413
|
+
(v) => {
|
|
414
|
+
if (v && v.length >= 255) {
|
|
415
|
+
return this.$t(
|
|
416
|
+
'windward.games.shared.settings.errors.input_limitations',
|
|
417
|
+
[255]
|
|
418
|
+
)
|
|
419
|
+
} else {
|
|
420
|
+
return true
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
],
|
|
424
|
+
promptRule: [
|
|
425
|
+
(v) => {
|
|
426
|
+
if (v && v.length >= 200) {
|
|
427
|
+
return this.$t(
|
|
428
|
+
'windward.games.shared.settings.errors.input_limitations',
|
|
429
|
+
[50]
|
|
430
|
+
)
|
|
431
|
+
} else {
|
|
432
|
+
return true
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
},
|
|
413
437
|
}
|
|
414
438
|
},
|
|
415
439
|
mounted() {},
|