@windward/games 0.1.0 → 0.1.2
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/SortingGame.vue +1 -8
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +1 -0
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +12 -3
- package/components/content/blocks/slideshow/SlideShow.vue +6 -2
- package/components/content/blocks/wordJumble/WordJumble.vue +11 -7
- package/components/settings/SevenStrikesSettingsManager.vue +8 -0
- package/components/settings/SlideShowManager.vue +55 -37
- package/components/settings/WordJumbleSettingsManager.vue +8 -0
- package/package.json +1 -1
|
@@ -19,13 +19,6 @@
|
|
|
19
19
|
v-if="isFail() || isSuccess()"
|
|
20
20
|
class="d-flex justify-end"
|
|
21
21
|
>
|
|
22
|
-
<v-btn
|
|
23
|
-
v-if="isSuccess()"
|
|
24
|
-
class="success"
|
|
25
|
-
elevation="0"
|
|
26
|
-
@click="reset"
|
|
27
|
-
>{{ $t('shared.forms.continue') }}
|
|
28
|
-
</v-btn>
|
|
29
22
|
<v-container
|
|
30
23
|
v-if="isFail()"
|
|
31
24
|
@click="continueGame"
|
|
@@ -97,7 +90,7 @@
|
|
|
97
90
|
color="primary"
|
|
98
91
|
outlined
|
|
99
92
|
@click="continueGame"
|
|
100
|
-
>{{ $t('shared.forms.
|
|
93
|
+
>{{ $t('shared.forms.try_again') }} </v-btn
|
|
101
94
|
>
|
|
102
95
|
<v-btn color="primary" elevation="0" @click="reset"
|
|
103
96
|
>{{ $t('shared.forms.reset') }}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<v-col class="pa-0">
|
|
16
16
|
<template>
|
|
17
17
|
<v-carousel
|
|
18
|
-
v-model="
|
|
18
|
+
v-model="block.metadata.config.currentWord"
|
|
19
19
|
@change="onSlideChanged($event)"
|
|
20
20
|
>
|
|
21
21
|
<v-carousel-item
|
|
@@ -184,6 +184,9 @@ export default {
|
|
|
184
184
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
185
185
|
this.block.metadata.config = {}
|
|
186
186
|
}
|
|
187
|
+
if (_.isEmpty(this.block.metadata.config.currentWord)) {
|
|
188
|
+
this.block.metadata.config.currentWord = 0
|
|
189
|
+
}
|
|
187
190
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
188
191
|
this.block.metadata.config.title = this.$t(
|
|
189
192
|
'windward.games.components.settings.seven_strikes.title'
|
|
@@ -226,16 +229,22 @@ export default {
|
|
|
226
229
|
keyBoardClass: 'simple-keyboard',
|
|
227
230
|
onSlide: 0,
|
|
228
231
|
onStrike: 0,
|
|
229
|
-
carouselIndex: 0,
|
|
230
232
|
}
|
|
231
233
|
},
|
|
234
|
+
watch: {
|
|
235
|
+
render(newValue) {
|
|
236
|
+
if (newValue) {
|
|
237
|
+
this.block.metadata.config.currentWord = 0
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
},
|
|
232
241
|
mounted() {},
|
|
233
242
|
methods: {
|
|
234
243
|
onChangeSlide(newIndex) {
|
|
235
244
|
if (newIndex >= this.block.metadata.config.words.length) {
|
|
236
245
|
newIndex = 0
|
|
237
246
|
}
|
|
238
|
-
this.
|
|
247
|
+
this.block.metadata.config.currentWord = newIndex
|
|
239
248
|
this.onSlideChanged(newIndex)
|
|
240
249
|
},
|
|
241
250
|
onChange(input) {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
<div>
|
|
27
27
|
<template v-if="block.metadata.config.slides.length !== 0">
|
|
28
|
-
<v-carousel v-model="
|
|
28
|
+
<v-carousel v-model="block.metadata.config.currentSlide">
|
|
29
29
|
<template #prev="{ on, attrs }">
|
|
30
30
|
<v-btn
|
|
31
31
|
variant="elevated"
|
|
@@ -120,7 +120,11 @@ export default {
|
|
|
120
120
|
return {
|
|
121
121
|
next: {},
|
|
122
122
|
prev: {},
|
|
123
|
-
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
watch: {
|
|
126
|
+
render(newValue) {
|
|
127
|
+
this.block.metadata.config.currentSlide = 0
|
|
124
128
|
}
|
|
125
129
|
},
|
|
126
130
|
methods: {},
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<template>
|
|
17
17
|
<v-carousel
|
|
18
18
|
hide-delimiters
|
|
19
|
-
v-model="
|
|
19
|
+
v-model="block.metadata.config.currentWord"
|
|
20
20
|
@change="onSlideChanged()"
|
|
21
21
|
>
|
|
22
22
|
<v-carousel-item
|
|
@@ -184,7 +184,6 @@ export default {
|
|
|
184
184
|
showAnswer: false,
|
|
185
185
|
showFeedback: false,
|
|
186
186
|
resetValue: false,
|
|
187
|
-
selectedPage: 0,
|
|
188
187
|
studentResponse: '',
|
|
189
188
|
feedbackStatus: '',
|
|
190
189
|
updateJumble: 0,
|
|
@@ -195,6 +194,7 @@ export default {
|
|
|
195
194
|
watch: {
|
|
196
195
|
render(newValue) {
|
|
197
196
|
this.updateJumble = Crypto.id()
|
|
197
|
+
this.block.metadata.config.currentWord = 0
|
|
198
198
|
},
|
|
199
199
|
},
|
|
200
200
|
mounted() {
|
|
@@ -282,12 +282,16 @@ export default {
|
|
|
282
282
|
// this function is called when the slide is changed
|
|
283
283
|
// reset the game each time this occurs via props due to fact
|
|
284
284
|
// that components do not remount on slides each time the slide is revisited
|
|
285
|
-
this.block.metadata.config.words[
|
|
286
|
-
this.
|
|
287
|
-
|
|
288
|
-
|
|
285
|
+
this.block.metadata.config.words[
|
|
286
|
+
this.block.metadata.config.currentWord
|
|
287
|
+
].shuffledWord = this.shuffle(
|
|
288
|
+
this.block.metadata.config.words[
|
|
289
|
+
this.block.metadata.config.currentWord
|
|
290
|
+
].value
|
|
291
|
+
)
|
|
289
292
|
if (changeSlide) {
|
|
290
|
-
this.
|
|
293
|
+
this.block.metadata.config.currentWord =
|
|
294
|
+
this.block.metadata.config.currentWord + 1
|
|
291
295
|
}
|
|
292
296
|
// updates class
|
|
293
297
|
this.feedbackStatus = ''
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
</p>
|
|
37
37
|
<SortableExpansionPanel
|
|
38
38
|
v-model="block.metadata.config.words"
|
|
39
|
+
v-bind:currentPanel.sync="block.metadata.config.currentWord"
|
|
39
40
|
@click:close="onDelete($event)"
|
|
40
41
|
>
|
|
41
42
|
<template #header="{ item, index }">
|
|
@@ -144,6 +145,9 @@ export default {
|
|
|
144
145
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
145
146
|
this.block.metadata.config = {}
|
|
146
147
|
}
|
|
148
|
+
if (_.isEmpty(this.block.metadata.config.currentWord)) {
|
|
149
|
+
this.block.metadata.config.currentWord = 0
|
|
150
|
+
}
|
|
147
151
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
148
152
|
this.block.metadata.config.title = this.$t(
|
|
149
153
|
'windward.games.components.settings.seven_strikes.title'
|
|
@@ -214,9 +218,13 @@ export default {
|
|
|
214
218
|
splitWord: '',
|
|
215
219
|
}
|
|
216
220
|
this.block.metadata.config.words.push(default_object)
|
|
221
|
+
this.block.metadata.config.currentWord =
|
|
222
|
+
this.block.metadata.config.words.length - 1
|
|
217
223
|
},
|
|
218
224
|
onDelete(index) {
|
|
219
225
|
this.block.metadata.config.words.splice(index, 1)
|
|
226
|
+
this.block.metadata.config.currentWord =
|
|
227
|
+
this.block.metadata.config.words.length - 1
|
|
220
228
|
},
|
|
221
229
|
},
|
|
222
230
|
}
|
|
@@ -37,6 +37,9 @@
|
|
|
37
37
|
</p>
|
|
38
38
|
<SortableExpansionPanel
|
|
39
39
|
v-model="block.metadata.config.slides"
|
|
40
|
+
v-bind:currentPanel.sync="
|
|
41
|
+
block.metadata.config.currentSlide
|
|
42
|
+
"
|
|
40
43
|
@click:close="onDeleteSlide($event)"
|
|
41
44
|
>
|
|
42
45
|
<template #header="{ item, index }">
|
|
@@ -50,43 +53,51 @@
|
|
|
50
53
|
}}
|
|
51
54
|
</template>
|
|
52
55
|
<template #body="{ item, index }">
|
|
53
|
-
<v-
|
|
54
|
-
v-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
56
|
+
<v-container>
|
|
57
|
+
<v-text-field
|
|
58
|
+
v-model="
|
|
59
|
+
block.metadata.config.slides[index].header
|
|
60
|
+
"
|
|
61
|
+
:autofocus="true"
|
|
62
|
+
outlined
|
|
63
|
+
:label="
|
|
64
|
+
$t(
|
|
65
|
+
'windward.games.components.content.blocks.slideshow.slides.slide_header'
|
|
66
|
+
)
|
|
67
|
+
"
|
|
68
|
+
></v-text-field>
|
|
69
|
+
<v-text-field
|
|
70
|
+
v-model="
|
|
71
|
+
block.metadata.config.slides[index]
|
|
72
|
+
.description
|
|
73
|
+
"
|
|
74
|
+
outlined
|
|
75
|
+
:label="
|
|
76
|
+
$t(
|
|
77
|
+
'windward.games.components.content.blocks.slideshow.slides.slide_description'
|
|
78
|
+
)
|
|
79
|
+
"
|
|
80
|
+
></v-text-field>
|
|
81
|
+
<v-text-field
|
|
82
|
+
v-model="
|
|
83
|
+
block.metadata.config.slides[index]
|
|
84
|
+
.image_alt
|
|
85
|
+
"
|
|
86
|
+
outlined
|
|
87
|
+
:label="
|
|
88
|
+
$t(
|
|
89
|
+
'windward.games.components.content.blocks.slideshow.slides.image_alt'
|
|
90
|
+
)
|
|
91
|
+
"
|
|
92
|
+
></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
|
+
</v-container>
|
|
90
101
|
</template>
|
|
91
102
|
</SortableExpansionPanel>
|
|
92
103
|
<v-container>
|
|
@@ -139,6 +150,9 @@ export default {
|
|
|
139
150
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
140
151
|
this.block.metadata.config = {}
|
|
141
152
|
}
|
|
153
|
+
if (_.isEmpty(this.block.metadata.config.currentSlide)) {
|
|
154
|
+
this.block.metadata.config.currentSlide = 0
|
|
155
|
+
}
|
|
142
156
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
143
157
|
this.block.metadata.config.title = this.$t(
|
|
144
158
|
'windward.games.components.settings.slideshow.form.slideshow_title'
|
|
@@ -174,6 +188,8 @@ export default {
|
|
|
174
188
|
image_alt: '',
|
|
175
189
|
}
|
|
176
190
|
this.block.metadata.config.slides.push(defaultSlide)
|
|
191
|
+
this.block.metadata.config.currentSlide =
|
|
192
|
+
this.block.metadata.config.slides.length - 1
|
|
177
193
|
},
|
|
178
194
|
onDeleteSlide(index) {
|
|
179
195
|
this.$toast.info(this.$t('shared.forms.confirm_delete_text'), {
|
|
@@ -196,6 +212,8 @@ export default {
|
|
|
196
212
|
},
|
|
197
213
|
],
|
|
198
214
|
})
|
|
215
|
+
this.block.metadata.config.currentSlide =
|
|
216
|
+
this.block.metadata.config.slides.length - 1
|
|
199
217
|
},
|
|
200
218
|
},
|
|
201
219
|
}
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
</p>
|
|
37
37
|
<SortableExpansionPanel
|
|
38
38
|
v-model="block.metadata.config.words"
|
|
39
|
+
v-bind:currentPanel.sync="block.metadata.config.currentWord"
|
|
39
40
|
@click:close="onDelete($event)"
|
|
40
41
|
>
|
|
41
42
|
<template #header="{ item, index }">
|
|
@@ -150,6 +151,9 @@ export default {
|
|
|
150
151
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
151
152
|
this.block.metadata.config = {}
|
|
152
153
|
}
|
|
154
|
+
if (_.isEmpty(this.block.metadata.config.currentWord)) {
|
|
155
|
+
this.block.metadata.config.currentWord = 0
|
|
156
|
+
}
|
|
153
157
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
154
158
|
this.block.metadata.config.title = this.$t(
|
|
155
159
|
'windward.games.components.content.blocks.word_jumble.title'
|
|
@@ -215,6 +219,8 @@ export default {
|
|
|
215
219
|
shuffledWord: '',
|
|
216
220
|
}
|
|
217
221
|
this.block.metadata.config.words.push(defaultWord)
|
|
222
|
+
this.block.metadata.config.currentWord =
|
|
223
|
+
this.block.metadata.config.words.length - 1
|
|
218
224
|
},
|
|
219
225
|
onDelete(index) {
|
|
220
226
|
let startingIndex = 0
|
|
@@ -223,6 +229,8 @@ export default {
|
|
|
223
229
|
startingIndex = startingIndex + 1
|
|
224
230
|
return (element.id = startingIndex)
|
|
225
231
|
})
|
|
232
|
+
this.block.metadata.config.currentWord =
|
|
233
|
+
this.block.metadata.config.words.length - 1
|
|
226
234
|
},
|
|
227
235
|
},
|
|
228
236
|
}
|