@windward/games 0.0.7 → 0.0.9
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/blocks/dragDrop/BucketGame.vue +18 -6
- package/components/content/blocks/dragDrop/SortingGame.vue +127 -55
- package/components/content/blocks/quizshowGame/AnswerPanel.vue +73 -83
- package/components/content/blocks/quizshowGame/QuizShow.vue +40 -30
- package/components/content/blocks/wordJumble/WordJumble.vue +11 -5
- package/components/settings/BucketGameSettingsManager.vue +306 -369
- package/components/settings/QuizShowSettingsManager.vue +228 -201
- package/components/settings/SortingGameSettingsManager.vue +181 -152
- package/components/settings/WordJumbleSettingsManager.vue +145 -137
- package/i18n/en-US/components/content/blocks/quizshow_game.ts +1 -1
- package/i18n/en-US/components/content/blocks/word_jumble.ts +1 -1
- package/i18n/en-US/components/settings/bucket_game.ts +5 -2
- package/i18n/en-US/components/settings/quizshow_game.ts +8 -2
- package/i18n/en-US/components/settings/sorting_game.ts +2 -0
- package/i18n/en-US/components/settings/word_jumble.ts +1 -1
- package/package.json +1 -1
|
@@ -1,250 +1,221 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<br />
|
|
4
3
|
<v-form ref="form" v-model="valid" v-if="!loading">
|
|
5
|
-
<v-
|
|
6
|
-
v-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
4
|
+
<v-container class="pa-0">
|
|
5
|
+
<v-text-field
|
|
6
|
+
v-model="block.metadata.config.title"
|
|
7
|
+
outlined
|
|
8
|
+
:counter="50"
|
|
9
|
+
:autofocus="true"
|
|
10
|
+
:label="
|
|
11
|
+
$t(
|
|
12
|
+
'plugin.games.components.settings.bucket_game.form.title'
|
|
13
|
+
)
|
|
14
|
+
"
|
|
15
|
+
ref="title"
|
|
16
|
+
></v-text-field>
|
|
17
|
+
<v-textarea
|
|
18
|
+
outlined
|
|
19
|
+
auto-grow
|
|
20
|
+
v-model="block.metadata.config.instructions"
|
|
21
|
+
:counter="255"
|
|
22
|
+
:label="
|
|
23
|
+
$t(
|
|
24
|
+
'plugin.games.components.settings.bucket_game.form.instructions'
|
|
25
|
+
)
|
|
26
|
+
"
|
|
27
|
+
></v-textarea>
|
|
28
|
+
</v-container>
|
|
29
|
+
<v-divider class="my-4 primary"></v-divider>
|
|
30
|
+
<v-container class="pa-0">
|
|
31
|
+
<p>
|
|
32
|
+
{{
|
|
33
|
+
$t(
|
|
34
|
+
'plugin.games.components.settings.bucket_game.form.buckets'
|
|
35
|
+
)
|
|
36
|
+
}}
|
|
37
|
+
</p>
|
|
38
|
+
<draggable
|
|
39
|
+
v-model="block.metadata.config.bucket_titles"
|
|
40
|
+
group="containers"
|
|
41
|
+
>
|
|
42
|
+
<v-container
|
|
43
|
+
v-for="(item, index) in block.metadata.config
|
|
44
|
+
.bucket_titles"
|
|
45
|
+
:key="'bucket_' + index"
|
|
46
|
+
class="container-card-outline"
|
|
47
|
+
elevation="0"
|
|
48
|
+
outlined
|
|
49
|
+
tile
|
|
50
|
+
>
|
|
51
|
+
<v-layout row wrap outlined>
|
|
52
|
+
<v-flex xs10 :class="bottomBorder(index)">
|
|
53
|
+
<p
|
|
54
|
+
class="text-truncate mb-0 p-header"
|
|
55
|
+
@click="onOpenEditor(index)"
|
|
56
|
+
v-on:keyup.enter="onOpenEditor(index)"
|
|
57
|
+
@mouseover="onHover"
|
|
58
|
+
@mouseleave="onHoverLeave"
|
|
59
|
+
:class="cursor"
|
|
60
|
+
tabindex="0"
|
|
61
|
+
>
|
|
62
|
+
<v-icon>mdi-drag-vertical</v-icon>
|
|
63
|
+
<span class="span-text-ellipsis">
|
|
64
|
+
{{
|
|
65
|
+
item.title
|
|
66
|
+
? block.metadata.config
|
|
67
|
+
.bucket_titles[index]
|
|
68
|
+
.title
|
|
69
|
+
: $t(
|
|
70
|
+
'plugin.games.components.settings.bucket_game.form.click_here'
|
|
71
|
+
)
|
|
72
|
+
}}
|
|
73
|
+
</span>
|
|
74
|
+
</p>
|
|
75
|
+
</v-flex>
|
|
76
|
+
<v-flex
|
|
77
|
+
xs2
|
|
78
|
+
class="btn-header-delete d-flex justify-center"
|
|
79
|
+
:class="bottomBorder(index)"
|
|
51
80
|
>
|
|
52
|
-
<v-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
<v-icon
|
|
82
|
+
@click="onConfirmDeleteBucket(index)"
|
|
83
|
+
class="btn-delete-icon"
|
|
84
|
+
>mdi-delete-outline</v-icon
|
|
85
|
+
>
|
|
86
|
+
</v-flex>
|
|
87
|
+
<v-container v-if="item.expand">
|
|
88
|
+
<v-flex xs12>
|
|
89
|
+
<p class="p-label">
|
|
90
|
+
{{
|
|
91
|
+
$t(
|
|
92
|
+
'plugin.games.components.content.blocks.bucket_game.name'
|
|
93
|
+
)
|
|
94
|
+
}}
|
|
95
|
+
</p>
|
|
96
|
+
<v-text-field
|
|
97
|
+
outlined
|
|
98
|
+
:autofocus="true"
|
|
99
|
+
v-model="
|
|
100
|
+
block.metadata.config.bucket_titles[
|
|
101
|
+
index
|
|
102
|
+
].title
|
|
103
|
+
"
|
|
104
|
+
></v-text-field>
|
|
105
|
+
</v-flex>
|
|
106
|
+
<v-flex xs12>
|
|
107
|
+
<p class="p-label">
|
|
108
|
+
{{
|
|
109
|
+
$t(
|
|
110
|
+
'plugin.games.components.settings.bucket_game.form.color'
|
|
111
|
+
)
|
|
112
|
+
}}
|
|
113
|
+
</p>
|
|
114
|
+
<v-color-picker
|
|
115
|
+
v-model="item.color"
|
|
116
|
+
hide-canvas
|
|
117
|
+
hide-inputs
|
|
118
|
+
hide-sliders
|
|
119
|
+
show-swatches
|
|
120
|
+
:swatches="swatches"
|
|
121
|
+
swatches-max-height="130"
|
|
122
|
+
></v-color-picker>
|
|
123
|
+
</v-flex>
|
|
124
|
+
<v-flex xs12>
|
|
125
|
+
<p class="p-label">
|
|
126
|
+
{{
|
|
127
|
+
$t(
|
|
128
|
+
'plugin.games.components.content.blocks.bucket_game.answers'
|
|
129
|
+
)
|
|
130
|
+
}}
|
|
131
|
+
</p>
|
|
132
|
+
</v-flex>
|
|
133
|
+
<template>
|
|
134
|
+
<v-container
|
|
135
|
+
v-for="(bucket, indexBucket) in block
|
|
136
|
+
.metadata.config.bucket_answers[
|
|
137
|
+
index
|
|
138
|
+
]"
|
|
139
|
+
:key="indexBucket"
|
|
140
|
+
class="container-card-outline"
|
|
86
141
|
>
|
|
87
|
-
<v-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<v-flex xs12 class="pt-4">
|
|
96
|
-
<p
|
|
97
|
-
color="primary"
|
|
98
|
-
class="labelChanges"
|
|
99
|
-
>
|
|
100
|
-
{{
|
|
101
|
-
$t(
|
|
102
|
-
'plugin.games.components.content.blocks.bucket_game.name'
|
|
142
|
+
<v-layout row wrap outlined>
|
|
143
|
+
<v-flex
|
|
144
|
+
xs10
|
|
145
|
+
:class="
|
|
146
|
+
bottomBorder(
|
|
147
|
+
indexBucket,
|
|
148
|
+
true,
|
|
149
|
+
index
|
|
103
150
|
)
|
|
104
|
-
}}
|
|
105
|
-
</p>
|
|
106
|
-
<v-text-field
|
|
107
|
-
v-if="item.expand"
|
|
108
|
-
outlined
|
|
109
|
-
:autofocus="true"
|
|
110
|
-
v-model="
|
|
111
|
-
block.metadata.config
|
|
112
|
-
.bucket_titles[index]
|
|
113
|
-
.title
|
|
114
151
|
"
|
|
115
|
-
></v-text-field>
|
|
116
|
-
</v-flex>
|
|
117
|
-
<v-flex xs12 class="pt-4">
|
|
118
|
-
<p
|
|
119
|
-
color="primary"
|
|
120
|
-
class="labelChanges"
|
|
121
|
-
>
|
|
122
|
-
{{
|
|
123
|
-
$t(
|
|
124
|
-
'plugin.games.components.settings.bucket_game.form.color'
|
|
125
|
-
)
|
|
126
|
-
}}
|
|
127
|
-
</p>
|
|
128
|
-
<v-color-picker
|
|
129
|
-
v-model="item.color"
|
|
130
|
-
hide-canvas
|
|
131
|
-
hide-inputs
|
|
132
|
-
hide-sliders
|
|
133
|
-
show-swatches
|
|
134
|
-
:swatches="swatches"
|
|
135
|
-
swatches-max-height="130"
|
|
136
|
-
></v-color-picker>
|
|
137
|
-
</v-flex>
|
|
138
|
-
<v-flex xs12 class="pt-4">
|
|
139
|
-
<p
|
|
140
|
-
color="primary"
|
|
141
|
-
class="labelChanges"
|
|
142
|
-
>
|
|
143
|
-
{{
|
|
144
|
-
$t(
|
|
145
|
-
'plugin.games.components.content.blocks.bucket_game.answers'
|
|
146
|
-
)
|
|
147
|
-
}}
|
|
148
|
-
</p>
|
|
149
|
-
</v-flex>
|
|
150
|
-
<template
|
|
151
|
-
v-for="(
|
|
152
|
-
bucket, indexBucket
|
|
153
|
-
) in block.metadata.config
|
|
154
|
-
.bucket_answers[index]"
|
|
155
|
-
>
|
|
156
|
-
<v-container
|
|
157
|
-
:key="indexBucket"
|
|
158
|
-
class="pa-0 d-flex flex-wrap align-center cardOutline"
|
|
159
152
|
>
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
153
|
+
<p
|
|
154
|
+
class="text-truncate pa-0 ma-0 p-header"
|
|
155
|
+
@click="
|
|
156
|
+
onOpenEditor(
|
|
157
|
+
index,
|
|
158
|
+
indexBucket
|
|
159
|
+
)
|
|
160
|
+
"
|
|
161
|
+
v-on:keyup.enter="
|
|
162
|
+
onOpenEditor(
|
|
163
|
+
index,
|
|
164
|
+
indexBucket
|
|
167
165
|
)
|
|
168
166
|
"
|
|
169
|
-
|
|
167
|
+
@mouseover="onHover"
|
|
168
|
+
@mouseleave="onHoverLeave"
|
|
169
|
+
:class="cursor"
|
|
170
|
+
tabindex="0"
|
|
170
171
|
>
|
|
171
|
-
<
|
|
172
|
-
|
|
173
|
-
@click="
|
|
174
|
-
onOpenEditor(
|
|
175
|
-
index,
|
|
176
|
-
indexBucket
|
|
177
|
-
)
|
|
178
|
-
"
|
|
179
|
-
v-on:keyup.enter="
|
|
180
|
-
onOpenEditor(
|
|
181
|
-
index,
|
|
182
|
-
indexBucket
|
|
183
|
-
)
|
|
184
|
-
"
|
|
185
|
-
@mouseover="onHover"
|
|
186
|
-
@mouseleave="
|
|
187
|
-
onHoverLeave
|
|
188
|
-
"
|
|
189
|
-
:class="cursor"
|
|
190
|
-
tabindex="0"
|
|
172
|
+
<v-icon class="pl-2"
|
|
173
|
+
>mdi-drag-vertical</v-icon
|
|
191
174
|
>
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
175
|
+
<span
|
|
176
|
+
class="span-text-ellipsis"
|
|
177
|
+
>
|
|
178
|
+
{{
|
|
179
|
+
bucket.display
|
|
180
|
+
? bucket.display
|
|
181
|
+
: $t(
|
|
182
|
+
'plugin.games.components.settings.bucket_game.form.click_here'
|
|
183
|
+
)
|
|
184
|
+
}}
|
|
185
|
+
</span>
|
|
186
|
+
</p>
|
|
187
|
+
</v-flex>
|
|
188
|
+
<v-flex
|
|
189
|
+
xs2
|
|
190
|
+
class="d-flex justify-center btn-header-delete"
|
|
191
|
+
:class="
|
|
192
|
+
bottomBorder(
|
|
193
|
+
indexBucket,
|
|
194
|
+
true,
|
|
195
|
+
index
|
|
196
|
+
)
|
|
197
|
+
"
|
|
198
|
+
>
|
|
199
|
+
<v-icon
|
|
200
|
+
@click="
|
|
201
|
+
onConfirmDelete(
|
|
213
202
|
indexBucket,
|
|
214
|
-
true,
|
|
215
203
|
index
|
|
216
204
|
)
|
|
217
205
|
"
|
|
206
|
+
class="btn-delete-icon"
|
|
207
|
+
>mdi-delete-outline</v-icon
|
|
218
208
|
>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
209
|
+
</v-flex>
|
|
210
|
+
<v-container v-if="bucket.expand">
|
|
211
|
+
<v-flex xs12>
|
|
212
|
+
<p class="p-label">
|
|
213
|
+
{{
|
|
214
|
+
$t(
|
|
215
|
+
'plugin.games.components.content.blocks.bucket_game.form.answer'
|
|
224
216
|
)
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
>
|
|
228
|
-
</v-flex>
|
|
229
|
-
<v-flex
|
|
230
|
-
xs12
|
|
231
|
-
v-if="bucket.expand"
|
|
232
|
-
class="pa-4"
|
|
233
|
-
>
|
|
234
|
-
<v-row
|
|
235
|
-
class="ma-1 d-flex align-center justify-space-between"
|
|
236
|
-
>
|
|
237
|
-
<div
|
|
238
|
-
color="primary mb-0"
|
|
239
|
-
class="labelChanges d-flex align-center"
|
|
240
|
-
>
|
|
241
|
-
{{
|
|
242
|
-
$t(
|
|
243
|
-
'plugin.games.components.content.blocks.bucket_game.form.answer'
|
|
244
|
-
)
|
|
245
|
-
}}
|
|
246
|
-
</div>
|
|
247
|
-
</v-row>
|
|
217
|
+
}}
|
|
218
|
+
</p>
|
|
248
219
|
<v-text-field
|
|
249
220
|
outlined
|
|
250
221
|
:autofocus="true"
|
|
@@ -257,20 +228,13 @@
|
|
|
257
228
|
.display
|
|
258
229
|
"
|
|
259
230
|
></v-text-field>
|
|
260
|
-
<
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
{{
|
|
268
|
-
$t(
|
|
269
|
-
'plugin.games.components.content.blocks.bucket_game.form.value'
|
|
270
|
-
)
|
|
271
|
-
}}
|
|
272
|
-
</div>
|
|
273
|
-
</v-row>
|
|
231
|
+
<p class="p-label">
|
|
232
|
+
{{
|
|
233
|
+
$t(
|
|
234
|
+
'plugin.games.components.content.blocks.bucket_game.form.value'
|
|
235
|
+
)
|
|
236
|
+
}}
|
|
237
|
+
</p>
|
|
274
238
|
<v-text-field
|
|
275
239
|
outlined
|
|
276
240
|
v-model="
|
|
@@ -282,20 +246,13 @@
|
|
|
282
246
|
.display_value
|
|
283
247
|
"
|
|
284
248
|
></v-text-field>
|
|
285
|
-
<
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
{{
|
|
293
|
-
$t(
|
|
294
|
-
'plugin.games.components.content.blocks.bucket_game.form.feedback.feedback'
|
|
295
|
-
)
|
|
296
|
-
}}
|
|
297
|
-
</div>
|
|
298
|
-
</v-row>
|
|
249
|
+
<p class="p-label">
|
|
250
|
+
{{
|
|
251
|
+
$t(
|
|
252
|
+
'plugin.games.components.content.blocks.bucket_game.form.feedback.feedback'
|
|
253
|
+
)
|
|
254
|
+
}}
|
|
255
|
+
</p>
|
|
299
256
|
<v-text-field
|
|
300
257
|
outlined
|
|
301
258
|
v-model="
|
|
@@ -309,74 +266,62 @@
|
|
|
309
266
|
></v-text-field>
|
|
310
267
|
</v-flex>
|
|
311
268
|
</v-container>
|
|
312
|
-
</
|
|
313
|
-
<p
|
|
314
|
-
@mouseover="onHover"
|
|
315
|
-
@mouseleave="onHoverLeave"
|
|
316
|
-
@click="onAddBucketAnswer(index)"
|
|
317
|
-
v-on:keyup.enter="
|
|
318
|
-
onAddBucketAnswer(index)
|
|
319
|
-
"
|
|
320
|
-
class="fullWidth"
|
|
321
|
-
:class="cursor"
|
|
322
|
-
tabindex="0"
|
|
323
|
-
>
|
|
324
|
-
<v-icon class="primary mr-2"
|
|
325
|
-
>mdi-plus</v-icon
|
|
326
|
-
>
|
|
327
|
-
{{
|
|
328
|
-
$t(
|
|
329
|
-
'plugin.games.components.settings.bucket_game.form.add_answer'
|
|
330
|
-
)
|
|
331
|
-
}}
|
|
332
|
-
</p>
|
|
269
|
+
</v-layout>
|
|
333
270
|
</v-container>
|
|
334
|
-
</
|
|
271
|
+
</template>
|
|
272
|
+
<v-row justify="center" class="my-4">
|
|
273
|
+
<v-btn
|
|
274
|
+
color="primary"
|
|
275
|
+
@click="onAddBucketAnswer(index)"
|
|
276
|
+
>
|
|
277
|
+
<v-icon>mdi-plus</v-icon>
|
|
278
|
+
{{
|
|
279
|
+
$t(
|
|
280
|
+
'plugin.games.components.settings.bucket_game.form.add_answer'
|
|
281
|
+
)
|
|
282
|
+
}}
|
|
283
|
+
</v-btn>
|
|
284
|
+
</v-row>
|
|
335
285
|
</v-container>
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
286
|
+
</v-layout>
|
|
287
|
+
</v-container>
|
|
288
|
+
</draggable>
|
|
289
|
+
</v-container>
|
|
290
|
+
<v-container class="pa-0">
|
|
291
|
+
<v-row justify="center" class="my-4">
|
|
292
|
+
<v-btn color="primary" @click="onAddBucket">
|
|
293
|
+
<v-icon>mdi-plus</v-icon>
|
|
294
|
+
{{
|
|
295
|
+
$t(
|
|
296
|
+
'plugin.games.components.settings.bucket_game.form.add_bucket'
|
|
297
|
+
)
|
|
298
|
+
}}
|
|
299
|
+
</v-btn>
|
|
300
|
+
</v-row>
|
|
301
|
+
<v-textarea
|
|
302
|
+
class="pt-4"
|
|
303
|
+
outlined
|
|
304
|
+
auto-grow
|
|
305
|
+
v-model="block.metadata.config.feedback_correct"
|
|
306
|
+
:counter="255"
|
|
307
|
+
:label="
|
|
308
|
+
$t(
|
|
309
|
+
'plugin.games.components.settings.bucket_game.form.feedback.correct'
|
|
310
|
+
)
|
|
311
|
+
"
|
|
312
|
+
></v-textarea>
|
|
313
|
+
<v-textarea
|
|
314
|
+
outlined
|
|
315
|
+
auto-grow
|
|
316
|
+
v-model="block.metadata.config.feedback_incorrect"
|
|
317
|
+
:counter="255"
|
|
318
|
+
:label="
|
|
319
|
+
$t(
|
|
320
|
+
'plugin.games.components.settings.bucket_game.form.feedback.incorrect'
|
|
321
|
+
)
|
|
322
|
+
"
|
|
323
|
+
></v-textarea>
|
|
356
324
|
</v-container>
|
|
357
|
-
<v-textarea
|
|
358
|
-
class="pt-4"
|
|
359
|
-
outlined
|
|
360
|
-
auto-grow
|
|
361
|
-
v-model="block.metadata.config.feedback_correct"
|
|
362
|
-
:counter="255"
|
|
363
|
-
:label="
|
|
364
|
-
$t(
|
|
365
|
-
'plugin.games.components.settings.bucket_game.form.feedback.correct'
|
|
366
|
-
)
|
|
367
|
-
"
|
|
368
|
-
></v-textarea>
|
|
369
|
-
<v-textarea
|
|
370
|
-
outlined
|
|
371
|
-
auto-grow
|
|
372
|
-
v-model="block.metadata.config.feedback_incorrect"
|
|
373
|
-
:counter="255"
|
|
374
|
-
:label="
|
|
375
|
-
$t(
|
|
376
|
-
'plugin.games.components.settings.bucket_game.form.feedback.incorrect'
|
|
377
|
-
)
|
|
378
|
-
"
|
|
379
|
-
></v-textarea>
|
|
380
325
|
</v-form>
|
|
381
326
|
<div v-if="loading" class="text-center">
|
|
382
327
|
<v-progress-circular
|
|
@@ -398,6 +343,8 @@ import {
|
|
|
398
343
|
} from '@windward/core/utils'
|
|
399
344
|
import colors from 'vuetify/lib/util/colors'
|
|
400
345
|
import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
|
|
346
|
+
import draggable from 'vuedraggable'
|
|
347
|
+
|
|
401
348
|
export default {
|
|
402
349
|
name: 'BucketGameSettingsManager',
|
|
403
350
|
extends: BaseContentSettings,
|
|
@@ -405,6 +352,7 @@ export default {
|
|
|
405
352
|
MathExpressionEditor,
|
|
406
353
|
MathLiveWrapper,
|
|
407
354
|
ContentViewer,
|
|
355
|
+
draggable,
|
|
408
356
|
},
|
|
409
357
|
beforeMount() {
|
|
410
358
|
if (_.isEmpty(this.block)) {
|
|
@@ -417,16 +365,22 @@ export default {
|
|
|
417
365
|
this.block.metadata.config = {}
|
|
418
366
|
}
|
|
419
367
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
420
|
-
this.block.metadata.config.title =
|
|
368
|
+
this.block.metadata.config.title = this.$t(
|
|
369
|
+
'plugin.games.components.content.blocks.bucket_game.game_title'
|
|
370
|
+
)
|
|
421
371
|
}
|
|
422
372
|
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
423
373
|
this.block.metadata.config.instructions = ''
|
|
424
374
|
}
|
|
425
375
|
if (_.isEmpty(this.block.metadata.config.feedback_correct)) {
|
|
426
|
-
this.block.metadata.config.feedback_correct =
|
|
376
|
+
this.block.metadata.config.feedback_correct = this.$t(
|
|
377
|
+
'plugin.games.components.settings.bucket_game.form.feedback.correct_default'
|
|
378
|
+
)
|
|
427
379
|
}
|
|
428
380
|
if (_.isEmpty(this.block.metadata.config.feedback_incorrect)) {
|
|
429
|
-
this.block.metadata.config.feedback_incorrect =
|
|
381
|
+
this.block.metadata.config.feedback_incorrect = this.$t(
|
|
382
|
+
'plugin.games.components.settings.bucket_game.form.feedback.incorrect_default'
|
|
383
|
+
)
|
|
430
384
|
}
|
|
431
385
|
if (_.isEmpty(this.block.metadata.config.bucket_titles)) {
|
|
432
386
|
this.block.metadata.config.bucket_titles = []
|
|
@@ -447,6 +401,7 @@ export default {
|
|
|
447
401
|
dialog: false,
|
|
448
402
|
loading: false,
|
|
449
403
|
cursor: '',
|
|
404
|
+
panel: 0,
|
|
450
405
|
swatches: [
|
|
451
406
|
[colors.grey.lighten1, colors.blueGrey.lighten5],
|
|
452
407
|
[colors.brown.lighten3, colors.red.lighten3],
|
|
@@ -497,7 +452,7 @@ export default {
|
|
|
497
452
|
)
|
|
498
453
|
},
|
|
499
454
|
onHover(index) {
|
|
500
|
-
this.cursor = '
|
|
455
|
+
this.cursor = 'change-pointer'
|
|
501
456
|
},
|
|
502
457
|
onHoverLeave() {
|
|
503
458
|
this.cursor = ''
|
|
@@ -508,7 +463,7 @@ export default {
|
|
|
508
463
|
this.block.metadata.config.bucket_answers[mainIndex][index]
|
|
509
464
|
.expand === true
|
|
510
465
|
) {
|
|
511
|
-
return '
|
|
466
|
+
return 'container-header-border'
|
|
512
467
|
} else {
|
|
513
468
|
return null
|
|
514
469
|
}
|
|
@@ -517,7 +472,7 @@ export default {
|
|
|
517
472
|
this.block.metadata.config.bucket_titles[index].expand ===
|
|
518
473
|
true
|
|
519
474
|
) {
|
|
520
|
-
return '
|
|
475
|
+
return 'container-header-border'
|
|
521
476
|
} else {
|
|
522
477
|
return null
|
|
523
478
|
}
|
|
@@ -622,62 +577,44 @@ export default {
|
|
|
622
577
|
</script>
|
|
623
578
|
|
|
624
579
|
<style scoped>
|
|
625
|
-
.
|
|
626
|
-
|
|
580
|
+
.btn-delete-icon {
|
|
581
|
+
color: var(--v-primary-base);
|
|
627
582
|
}
|
|
628
|
-
.
|
|
629
|
-
|
|
583
|
+
.btn-header-delete {
|
|
584
|
+
border-left: 1px solid var(--v-primary-base);
|
|
630
585
|
}
|
|
631
|
-
.
|
|
632
|
-
|
|
586
|
+
.btn-header-delete:hover {
|
|
587
|
+
background-color: rgb(243, 243, 243);
|
|
633
588
|
}
|
|
634
|
-
.
|
|
589
|
+
.p-header {
|
|
635
590
|
height: 45px;
|
|
636
591
|
display: flex;
|
|
637
592
|
align-items: center;
|
|
638
593
|
}
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
}
|
|
642
|
-
.customButton {
|
|
643
|
-
min-width: 34px !important;
|
|
594
|
+
.p-header:hover {
|
|
595
|
+
background-color: rgb(243, 243, 243);
|
|
644
596
|
}
|
|
645
|
-
.
|
|
646
|
-
display: flex;
|
|
647
|
-
align-content: center;
|
|
648
|
-
justify-content: space-between;
|
|
649
|
-
}
|
|
650
|
-
.bottomBorder {
|
|
651
|
-
border-bottom: 2px solid var(--v-primary-base);
|
|
652
|
-
}
|
|
653
|
-
.setHeight {
|
|
654
|
-
height: 47px;
|
|
655
|
-
}
|
|
656
|
-
.fullWidth {
|
|
657
|
-
display: flex;
|
|
658
|
-
justify-content: center;
|
|
659
|
-
align-items: center;
|
|
660
|
-
font-weight: bold;
|
|
597
|
+
.p-label {
|
|
661
598
|
font-size: 16px;
|
|
599
|
+
font-weight: 500;
|
|
662
600
|
}
|
|
663
|
-
.
|
|
664
|
-
border: solid
|
|
601
|
+
.container-header-border {
|
|
602
|
+
border-bottom: 1px solid var(--v-primary-base);
|
|
603
|
+
}
|
|
604
|
+
.container-card-outline {
|
|
605
|
+
border: solid 1px var(--v-primary-base);
|
|
665
606
|
border-radius: 3px !important;
|
|
666
607
|
margin-bottom: 8px;
|
|
667
608
|
}
|
|
668
|
-
.
|
|
669
|
-
border-left: 2px solid var(--v-primary-base);
|
|
670
|
-
}
|
|
671
|
-
.rightSideBorder {
|
|
672
|
-
border-right: 2px solid var(--v-primary-base);
|
|
673
|
-
}
|
|
674
|
-
.labelChanges {
|
|
675
|
-
font-size: 16px;
|
|
676
|
-
font-weight: 500;
|
|
677
|
-
}
|
|
678
|
-
.ellipsisText {
|
|
609
|
+
.span-text-ellipsis {
|
|
679
610
|
white-space: nowrap;
|
|
680
611
|
overflow: hidden;
|
|
681
612
|
text-overflow: ellipsis;
|
|
682
613
|
}
|
|
614
|
+
.v-progress-circular {
|
|
615
|
+
margin: 1rem;
|
|
616
|
+
}
|
|
617
|
+
.change-pointer {
|
|
618
|
+
cursor: pointer !important;
|
|
619
|
+
}
|
|
683
620
|
</style>
|