@windward/games 0.1.0 → 0.1.1
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/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 +8 -0
- package/components/settings/WordJumbleSettingsManager.vue +8 -0
- package/package.json +1 -1
|
@@ -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,7 @@
|
|
|
37
37
|
</p>
|
|
38
38
|
<SortableExpansionPanel
|
|
39
39
|
v-model="block.metadata.config.slides"
|
|
40
|
+
v-bind:currentPanel.sync="block.metadata.config.currentSlide"
|
|
40
41
|
@click:close="onDeleteSlide($event)"
|
|
41
42
|
>
|
|
42
43
|
<template #header="{ item, index }">
|
|
@@ -139,6 +140,9 @@ export default {
|
|
|
139
140
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
140
141
|
this.block.metadata.config = {}
|
|
141
142
|
}
|
|
143
|
+
if (_.isEmpty(this.block.metadata.config.currentSlide)) {
|
|
144
|
+
this.block.metadata.config.currentSlide = 0
|
|
145
|
+
}
|
|
142
146
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
143
147
|
this.block.metadata.config.title = this.$t(
|
|
144
148
|
'windward.games.components.settings.slideshow.form.slideshow_title'
|
|
@@ -174,6 +178,8 @@ export default {
|
|
|
174
178
|
image_alt: '',
|
|
175
179
|
}
|
|
176
180
|
this.block.metadata.config.slides.push(defaultSlide)
|
|
181
|
+
this.block.metadata.config.currentSlide =
|
|
182
|
+
this.block.metadata.config.slides.length - 1
|
|
177
183
|
},
|
|
178
184
|
onDeleteSlide(index) {
|
|
179
185
|
this.$toast.info(this.$t('shared.forms.confirm_delete_text'), {
|
|
@@ -196,6 +202,8 @@ export default {
|
|
|
196
202
|
},
|
|
197
203
|
],
|
|
198
204
|
})
|
|
205
|
+
this.block.metadata.config.currentSlide =
|
|
206
|
+
this.block.metadata.config.slides.length - 1
|
|
199
207
|
},
|
|
200
208
|
},
|
|
201
209
|
}
|
|
@@ -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
|
}
|