@windward/games 0.0.10 → 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/CrudTable.vue +2 -2
- package/components/content/blocks/crosswordPuzzle/CrosswordClues.vue +4 -2
- package/components/content/blocks/crosswordPuzzle/CrosswordPuzzle.vue +14 -12
- package/components/content/blocks/dragDrop/BucketGame.vue +14 -15
- package/components/content/blocks/dragDrop/SortingGame.vue +4 -4
- package/components/content/blocks/flashcards/CardFace.vue +38 -39
- package/components/content/blocks/flashcards/Flashcard.vue +109 -28
- package/components/content/blocks/flashcards/FlashcardSlides.vue +1 -2
- package/components/content/blocks/matchingGame/MatchingGame.vue +15 -14
- package/components/content/blocks/multipleChoice/MultipleChoice.vue +186 -225
- package/components/content/blocks/multipleChoice/QuestionDialog.vue +7 -7
- package/components/content/blocks/quizshowGame/AnswerPanel.vue +9 -9
- package/components/content/blocks/quizshowGame/Gridview.vue +20 -24
- package/components/content/blocks/quizshowGame/QuizShow.vue +6 -6
- package/components/content/blocks/quizshowGame/feedbackIcons.vue +4 -2
- package/components/content/blocks/sevenStrikes/SevenStikes.vue +165 -111
- package/components/content/blocks/sevenStrikes/keyboard.vue +9 -2
- package/components/content/blocks/slideshow/SlideShow.vue +9 -5
- package/components/content/blocks/wordJumble/Jumble.vue +0 -2
- package/components/content/blocks/wordJumble/WordJumble.vue +121 -60
- package/components/settings/BucketGameSettingsManager.vue +20 -20
- package/components/settings/CrosswordPuzzleSettingsManager.vue +114 -181
- package/components/settings/FlashCardSlidesManager.vue +46 -63
- package/components/settings/MatchingGameManager.vue +19 -19
- package/components/settings/MultipleChoiceSettingsManager.vue +130 -140
- package/components/settings/QuizShowSettingsManager.vue +17 -17
- package/components/settings/SevenStrikesSettingsManager.vue +139 -193
- package/components/settings/SlideShowManager.vue +17 -9
- package/components/settings/SortingGameSettingsManager.vue +11 -11
- package/components/settings/WordJumbleSettingsManager.vue +48 -12
- package/i18n/en-US/components/content/blocks/flashcard.ts +1 -0
- package/i18n/en-US/components/content/blocks/word_jumble.ts +2 -0
- package/i18n/en-US/components/settings/bucket_game.ts +3 -2
- package/i18n/en-US/components/settings/flashcard.ts +1 -0
- package/i18n/en-US/components/settings/seven_strikes.ts +1 -1
- package/i18n/en-US/index.ts +2 -1
- package/i18n/es-ES/components/content/blocks/flashcard.ts +1 -0
- package/i18n/es-ES/components/content/blocks/word_jumble.ts +2 -0
- package/i18n/es-ES/components/settings/bucket_game.ts +3 -2
- package/i18n/es-ES/components/settings/flashcard.ts +1 -0
- package/i18n/es-ES/components/settings/seven_strikes.ts +2 -2
- package/i18n/es-ES/index.ts +2 -1
- package/i18n/index.ts +11 -0
- package/i18n/sv-SE/components/content/blocks/flashcard.ts +1 -0
- package/i18n/sv-SE/components/content/blocks/word_jumble.ts +2 -0
- package/i18n/sv-SE/components/settings/bucket_game.ts +2 -2
- package/i18n/sv-SE/components/settings/flashcard.ts +1 -0
- package/i18n/sv-SE/components/settings/seven_strikes.ts +1 -1
- package/i18n/sv-SE/index.ts +2 -1
- package/package.json +1 -1
- package/plugin.js +33 -34
- package/test/Feature/LocaleKeys.spec.js +11 -0
- package/test/__mocks__/componentsMock.js +12 -0
- package/test/__mocks__/fileMock.js +1 -0
- package/test/__mocks__/modelMock.js +88 -0
- package/test/__mocks__/styleMock.js +1 -0
- package/test/blocks/crossword/CrosswordPuzzle.spec.js +1 -1
- package/test/blocks/dragDrop/BucketGame.spec.js +1 -1
- package/test/blocks/dragDrop/SortingGame.spec.js +1 -1
- package/test/blocks/flashcards/CardFace.spec.js +1 -1
- package/test/blocks/flashcards/FlashCardSlides.spec.js +1 -1
- package/test/blocks/flashcards/Flashcard.spec.js +1 -1
- package/test/blocks/matchingGame/MatchingGame.spec.js +1 -1
- package/test/blocks/multipleChoice/MultipleChoice.spec.js +1 -1
- package/test/blocks/multipleChoice/QuestionDialog.spec.js +1 -1
- package/test/blocks/quizShow/quizShow.spec.js +1 -1
- package/test/blocks/sevenStrikes/sevenStrikes.spec.js +1 -1
- package/test/blocks/slideshow/slideshow.spec.js +1 -1
- package/test/blocks/wordJumble/Jumble.spec.js +1 -1
- package/test/blocks/wordJumble/WordJumble.spec.js +1 -1
- package/test/mocks.js +8 -2
- package/test/settings/BucketGameManager.spec.js +4 -4
- package/test/settings/CrosswordPuzzleManager.spec.js +6 -11
- package/test/settings/FlashCardSlidesManager.spec.js +1 -1
- package/test/settings/MatchingGameManager.spec.js +1 -1
- package/test/settings/MultipleChoiceGameManager.spec.js +1 -1
- package/test/settings/SevenStrikesManager.spec.js +1 -1
- package/test/settings/SlideShowManager.spec.js +1 -1
- package/test/settings/SortingGameManager.spec.js +1 -1
- package/test/settings/WordJumbleManager.spec.js +1 -4
|
@@ -1,149 +1,132 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<v-form ref="form" v-model="valid">
|
|
4
|
-
<v-
|
|
5
|
-
v-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
3
|
+
<v-form ref="form" v-model="valid" v-if="!loading">
|
|
4
|
+
<v-container class="pa-0">
|
|
5
|
+
<v-text-field
|
|
6
|
+
v-model="block.metadata.config.title"
|
|
7
|
+
:counter="50"
|
|
8
|
+
outlined
|
|
9
|
+
:autofocus="true"
|
|
10
|
+
:label="
|
|
11
|
+
$t(
|
|
12
|
+
'windward.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
|
+
'windward.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 class="mb-0">
|
|
32
|
+
{{
|
|
33
|
+
$t(
|
|
34
|
+
'windward.games.components.settings.crossword.crossword_items'
|
|
35
|
+
)
|
|
36
|
+
}}
|
|
37
|
+
</p>
|
|
38
|
+
<p class="p-label-crosswords">
|
|
39
|
+
{{
|
|
40
|
+
$t(
|
|
41
|
+
'windward.games.components.settings.crossword.min_length'
|
|
42
|
+
)
|
|
43
|
+
}}
|
|
44
|
+
</p>
|
|
45
|
+
<SortableExpansionPanel
|
|
46
|
+
v-model="block.metadata.config.words"
|
|
47
|
+
@click:close="onDelete($event)"
|
|
48
|
+
>
|
|
49
|
+
<template #header="{ item, index }">
|
|
50
|
+
{{
|
|
51
|
+
item.word !== ''
|
|
52
|
+
? item.word
|
|
53
|
+
: $t(
|
|
54
|
+
'windward.games.components.settings.bucket_game.form.enter_text'
|
|
55
|
+
)
|
|
56
|
+
}}
|
|
57
|
+
</template>
|
|
58
|
+
<template #body="{ item, index }">
|
|
59
|
+
<v-container>
|
|
60
|
+
<p class="p-label mb-0">
|
|
40
61
|
{{
|
|
41
62
|
$t(
|
|
42
|
-
'
|
|
63
|
+
'windward.games.components.settings.crossword.word'
|
|
43
64
|
)
|
|
44
65
|
}}
|
|
45
66
|
</p>
|
|
46
|
-
<v-
|
|
47
|
-
v-for="(item, index) in block.metadata.config
|
|
48
|
-
.words"
|
|
49
|
-
:key="'bucket_' + index"
|
|
50
|
-
class="pa-2 flex-fill cardOutline"
|
|
51
|
-
elevation="0"
|
|
67
|
+
<v-textarea
|
|
52
68
|
outlined
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
:class="cursor"
|
|
63
|
-
tabindex="0"
|
|
64
|
-
>
|
|
65
|
-
<v-icon class="pl-2"
|
|
66
|
-
>mdi-gesture-tap-hold</v-icon
|
|
67
|
-
>
|
|
68
|
-
{{
|
|
69
|
-
item.word
|
|
70
|
-
? item.word
|
|
71
|
-
: $t(
|
|
72
|
-
'plugin.games.components.settings.bucket_game.form.enter_text'
|
|
73
|
-
)
|
|
74
|
-
}}
|
|
75
|
-
</p>
|
|
76
|
-
<v-icon
|
|
77
|
-
class="twenty"
|
|
78
|
-
@click="onDelete(index)"
|
|
79
|
-
>mdi-delete-outline</v-icon
|
|
80
|
-
>
|
|
81
|
-
</v-row>
|
|
82
|
-
<v-textarea
|
|
83
|
-
v-if="item.expand"
|
|
84
|
-
outlined
|
|
85
|
-
:counter="20"
|
|
86
|
-
maxlength="20"
|
|
87
|
-
:autofocus="true"
|
|
88
|
-
:label="
|
|
89
|
-
$t(
|
|
90
|
-
'plugin.games.components.settings.crossword.word'
|
|
91
|
-
)
|
|
92
|
-
"
|
|
93
|
-
class="pt-4"
|
|
94
|
-
v-model="
|
|
95
|
-
block.metadata.config.words[index].word
|
|
96
|
-
"
|
|
97
|
-
></v-textarea>
|
|
98
|
-
<v-textarea
|
|
99
|
-
v-if="item.expand"
|
|
100
|
-
outlined
|
|
101
|
-
:counter="155"
|
|
102
|
-
maxlength="155"
|
|
103
|
-
:label="
|
|
104
|
-
$t(
|
|
105
|
-
'plugin.games.components.settings.crossword.clue'
|
|
106
|
-
)
|
|
107
|
-
"
|
|
108
|
-
class="pt-4"
|
|
109
|
-
v-model="
|
|
110
|
-
block.metadata.config.words[index].clue
|
|
111
|
-
"
|
|
112
|
-
></v-textarea>
|
|
113
|
-
</v-card>
|
|
114
|
-
<p
|
|
115
|
-
@mouseover="onHover"
|
|
116
|
-
@mouseleave="onHoverLeave"
|
|
117
|
-
@click="onAddElement"
|
|
118
|
-
v-on:keyup.enter="onAddElement"
|
|
119
|
-
class="fullWidth"
|
|
120
|
-
:class="cursor"
|
|
121
|
-
tabindex="0"
|
|
122
|
-
>
|
|
123
|
-
<v-icon class="primary addIcon"
|
|
124
|
-
>mdi-plus</v-icon
|
|
125
|
-
>
|
|
69
|
+
:counter="20"
|
|
70
|
+
maxlength="20"
|
|
71
|
+
:autofocus="true"
|
|
72
|
+
class="pt-4"
|
|
73
|
+
v-model="
|
|
74
|
+
block.metadata.config.words[index].word
|
|
75
|
+
"
|
|
76
|
+
></v-textarea>
|
|
77
|
+
<p class="p-label mb-0">
|
|
126
78
|
{{
|
|
127
79
|
$t(
|
|
128
|
-
'
|
|
80
|
+
'windward.games.components.settings.crossword.clue'
|
|
129
81
|
)
|
|
130
82
|
}}
|
|
131
83
|
</p>
|
|
84
|
+
<v-textarea
|
|
85
|
+
outlined
|
|
86
|
+
:counter="155"
|
|
87
|
+
maxlength="155"
|
|
88
|
+
class="pt-4"
|
|
89
|
+
v-model="
|
|
90
|
+
block.metadata.config.words[index].clue
|
|
91
|
+
"
|
|
92
|
+
></v-textarea>
|
|
132
93
|
</v-container>
|
|
133
|
-
</
|
|
134
|
-
</
|
|
135
|
-
|
|
94
|
+
</template>
|
|
95
|
+
</SortableExpansionPanel>
|
|
96
|
+
<v-container class="pa-0">
|
|
97
|
+
<v-row justify="center" class="my-4">
|
|
98
|
+
<v-btn color="primary" @click="onAddElement">
|
|
99
|
+
<v-icon>mdi-plus</v-icon>
|
|
100
|
+
{{
|
|
101
|
+
$t(
|
|
102
|
+
'windward.games.components.settings.bucket_game.form.add_answer'
|
|
103
|
+
)
|
|
104
|
+
}}
|
|
105
|
+
</v-btn>
|
|
106
|
+
</v-row>
|
|
107
|
+
</v-container>
|
|
108
|
+
</v-container>
|
|
136
109
|
</v-form>
|
|
110
|
+
<div v-if="loading" class="text-center">
|
|
111
|
+
<v-progress-circular
|
|
112
|
+
:size="70"
|
|
113
|
+
:width="7"
|
|
114
|
+
color="primary"
|
|
115
|
+
indeterminate
|
|
116
|
+
></v-progress-circular>
|
|
117
|
+
</div>
|
|
137
118
|
</div>
|
|
138
119
|
</template>
|
|
139
120
|
|
|
140
121
|
<script>
|
|
141
122
|
import _ from 'lodash'
|
|
142
123
|
import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
|
|
124
|
+
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
125
|
+
|
|
143
126
|
export default {
|
|
144
127
|
name: 'CrosswordPuzzleSettingsManager',
|
|
145
128
|
extends: BaseContentSettings,
|
|
146
|
-
components: {},
|
|
129
|
+
components: { SortableExpansionPanel },
|
|
147
130
|
beforeMount() {
|
|
148
131
|
if (_.isEmpty(this.block)) {
|
|
149
132
|
this.block = {}
|
|
@@ -155,7 +138,9 @@ export default {
|
|
|
155
138
|
this.block.metadata.config = {}
|
|
156
139
|
}
|
|
157
140
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
158
|
-
this.block.metadata.config.title =
|
|
141
|
+
this.block.metadata.config.title = this.$t(
|
|
142
|
+
'windward.games.components.content.blocks.crossword.crossword'
|
|
143
|
+
)
|
|
159
144
|
}
|
|
160
145
|
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
161
146
|
this.block.metadata.config.instructions = ''
|
|
@@ -169,7 +154,6 @@ export default {
|
|
|
169
154
|
id: counter,
|
|
170
155
|
word: '',
|
|
171
156
|
clue: '',
|
|
172
|
-
expand: false,
|
|
173
157
|
}
|
|
174
158
|
counter = counter + 1
|
|
175
159
|
!this.block.metadata.config.words.push(default_object)
|
|
@@ -179,21 +163,16 @@ export default {
|
|
|
179
163
|
data() {
|
|
180
164
|
return {
|
|
181
165
|
valid: true,
|
|
182
|
-
|
|
166
|
+
loading: false,
|
|
183
167
|
}
|
|
184
168
|
},
|
|
185
169
|
methods: {
|
|
186
170
|
onAddElement() {
|
|
187
|
-
//
|
|
188
|
-
this.block.metadata.config.words.forEach((element) => {
|
|
189
|
-
element.expand = false
|
|
190
|
-
})
|
|
191
|
-
// pushes in new crossword object and expands element
|
|
171
|
+
// pushes in new crossword object
|
|
192
172
|
const default_object = {
|
|
193
173
|
id: this.block.metadata.config.words.length,
|
|
194
174
|
word: '',
|
|
195
175
|
clue: '',
|
|
196
|
-
expand: true,
|
|
197
176
|
}
|
|
198
177
|
this.block.metadata.config.words.push(default_object)
|
|
199
178
|
},
|
|
@@ -208,21 +187,6 @@ export default {
|
|
|
208
187
|
this.onAddElement()
|
|
209
188
|
}
|
|
210
189
|
},
|
|
211
|
-
onOpenEditor(index) {
|
|
212
|
-
this.block.metadata.config.words[index].expand =
|
|
213
|
-
!this.block.metadata.config.words[index].expand
|
|
214
|
-
this.block.metadata.config.words.forEach((element) => {
|
|
215
|
-
if (index !== element.id) {
|
|
216
|
-
element.expand = false
|
|
217
|
-
}
|
|
218
|
-
})
|
|
219
|
-
},
|
|
220
|
-
onHover(index) {
|
|
221
|
-
this.cursor = 'changePointer'
|
|
222
|
-
},
|
|
223
|
-
onHoverLeave() {
|
|
224
|
-
this.cursor = ''
|
|
225
|
-
},
|
|
226
190
|
},
|
|
227
191
|
}
|
|
228
192
|
</script>
|
|
@@ -230,42 +194,11 @@ export default {
|
|
|
230
194
|
.v-progress-circular {
|
|
231
195
|
margin: 1rem;
|
|
232
196
|
}
|
|
233
|
-
.
|
|
234
|
-
|
|
197
|
+
.p-label-crosswords {
|
|
198
|
+
font-size: 0.85rem;
|
|
235
199
|
}
|
|
236
|
-
.
|
|
237
|
-
border: 2px solid var(--v-primary-base);
|
|
238
|
-
margin-bottom: 8px;
|
|
239
|
-
}
|
|
240
|
-
.fullWidth {
|
|
241
|
-
display: flex;
|
|
242
|
-
justify-content: center;
|
|
243
|
-
align-items: center;
|
|
244
|
-
font-weight: bold;
|
|
200
|
+
.p-label {
|
|
245
201
|
font-size: 16px;
|
|
246
|
-
|
|
247
|
-
.itemHeight {
|
|
248
|
-
display: flex;
|
|
249
|
-
align-content: center;
|
|
250
|
-
justify-content: space-between;
|
|
251
|
-
height: 60px;
|
|
252
|
-
}
|
|
253
|
-
.seventy {
|
|
254
|
-
width: 70%;
|
|
255
|
-
height: 100%;
|
|
256
|
-
display: flex;
|
|
257
|
-
align-items: center;
|
|
258
|
-
}
|
|
259
|
-
.twenty {
|
|
260
|
-
width: 20%;
|
|
261
|
-
height: 90%;
|
|
262
|
-
margin-top: 3px;
|
|
263
|
-
border-left: 2px solid var(--v-primary-base);
|
|
264
|
-
}
|
|
265
|
-
.addIcon {
|
|
266
|
-
margin-right: 5px;
|
|
267
|
-
}
|
|
268
|
-
.v-expansion-panel-content::v-deep .v-expansion-panel-content__wrap {
|
|
269
|
-
padding: 0 !important;
|
|
202
|
+
font-weight: 500;
|
|
270
203
|
}
|
|
271
204
|
</style>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:counter="50"
|
|
9
9
|
:label="
|
|
10
10
|
$t(
|
|
11
|
-
'
|
|
11
|
+
'windward.games.components.settings.bucket_game.form.title'
|
|
12
12
|
)
|
|
13
13
|
"
|
|
14
14
|
ref="title"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
v-model="block.metadata.config.instructions"
|
|
20
20
|
:label="
|
|
21
21
|
$t(
|
|
22
|
-
'
|
|
22
|
+
'windward.games.components.settings.bucket_game.form.instructions'
|
|
23
23
|
)
|
|
24
24
|
"
|
|
25
25
|
></v-textarea>
|
|
@@ -29,23 +29,22 @@
|
|
|
29
29
|
<p>
|
|
30
30
|
{{
|
|
31
31
|
$t(
|
|
32
|
-
'
|
|
32
|
+
'windward.games.components.content.blocks.flashcard.items'
|
|
33
33
|
)
|
|
34
34
|
}}
|
|
35
35
|
</p>
|
|
36
36
|
<SortableExpansionPanel
|
|
37
37
|
v-model="block.metadata.config.cards"
|
|
38
38
|
@click:close="onDelete($event)"
|
|
39
|
+
v-bind:currentPanel.sync="
|
|
40
|
+
block.metadata.config.currentSlide
|
|
41
|
+
"
|
|
39
42
|
>
|
|
40
43
|
<template #header="{ item, index }">
|
|
41
44
|
{{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
'plugin.games.components.settings.flashcard.form.card'
|
|
46
|
-
) +
|
|
47
|
-
' ' +
|
|
48
|
-
(index + 1)
|
|
45
|
+
stripHtml(
|
|
46
|
+
block.metadata.config.cards[index].front.text
|
|
47
|
+
)
|
|
49
48
|
}}
|
|
50
49
|
</template>
|
|
51
50
|
<template #body="{ item, index }">
|
|
@@ -62,23 +61,23 @@
|
|
|
62
61
|
"
|
|
63
62
|
>{{
|
|
64
63
|
$t(
|
|
65
|
-
'
|
|
64
|
+
'windward.games.components.settings.flashcard.form.front'
|
|
66
65
|
)
|
|
67
66
|
}}</v-btn
|
|
68
67
|
>
|
|
69
68
|
{{
|
|
70
69
|
$t(
|
|
71
|
-
'
|
|
70
|
+
'windward.games.components.settings.flashcard.form.card'
|
|
72
71
|
) +
|
|
73
72
|
' ' +
|
|
74
73
|
(index + 1) +
|
|
75
74
|
' ' +
|
|
76
75
|
(block.metadata.config.cards[index].side
|
|
77
76
|
? $t(
|
|
78
|
-
'
|
|
77
|
+
'windward.games.components.settings.flashcard.form.front'
|
|
79
78
|
)
|
|
80
79
|
: $t(
|
|
81
|
-
'
|
|
80
|
+
'windward.games.components.settings.flashcard.form.back'
|
|
82
81
|
))
|
|
83
82
|
}}<v-btn
|
|
84
83
|
@click="flipCardBack(index)"
|
|
@@ -89,40 +88,15 @@
|
|
|
89
88
|
>
|
|
90
89
|
{{
|
|
91
90
|
$t(
|
|
92
|
-
'
|
|
91
|
+
'windward.games.components.settings.flashcard.form.back'
|
|
93
92
|
)
|
|
94
93
|
}}</v-btn
|
|
95
94
|
></v-row
|
|
96
95
|
><br />
|
|
97
96
|
<v-form ref="form">
|
|
98
|
-
<v-text-field
|
|
99
|
-
v-model="
|
|
100
|
-
block.metadata.config.cards[index].title
|
|
101
|
-
"
|
|
102
|
-
:label="
|
|
103
|
-
$t(
|
|
104
|
-
'plugin.games.components.settings.flashcard.form.label'
|
|
105
|
-
)
|
|
106
|
-
"
|
|
107
|
-
></v-text-field>
|
|
108
97
|
<br />
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
block.metadata.config.cards[index].side
|
|
112
|
-
"
|
|
113
|
-
outlined
|
|
114
|
-
auto-grow
|
|
115
|
-
v-model="
|
|
116
|
-
block.metadata.config.cards[index].front
|
|
117
|
-
.header
|
|
118
|
-
"
|
|
119
|
-
:label="
|
|
120
|
-
$t(
|
|
121
|
-
'plugin.games.components.settings.flashcard.form.header'
|
|
122
|
-
)
|
|
123
|
-
"
|
|
124
|
-
/>
|
|
125
|
-
<v-textarea
|
|
98
|
+
|
|
99
|
+
<v-text-field
|
|
126
100
|
v-if="
|
|
127
101
|
!block.metadata.config.cards[index].side
|
|
128
102
|
"
|
|
@@ -135,34 +109,36 @@
|
|
|
135
109
|
:counter="255"
|
|
136
110
|
:label="
|
|
137
111
|
$t(
|
|
138
|
-
'
|
|
112
|
+
'windward.games.components.settings.flashcard.form.header'
|
|
139
113
|
)
|
|
140
114
|
"
|
|
141
115
|
required
|
|
142
116
|
/>
|
|
143
117
|
<v-card
|
|
144
|
-
|
|
118
|
+
elevation="0"
|
|
145
119
|
v-show="
|
|
146
120
|
block.metadata.config.cards[index].side
|
|
147
121
|
"
|
|
148
122
|
>
|
|
149
|
-
<v-card-
|
|
123
|
+
<v-card-title>
|
|
150
124
|
{{
|
|
151
125
|
$t(
|
|
152
|
-
'
|
|
126
|
+
'windward.games.components.settings.flashcard.form.card_content'
|
|
153
127
|
)
|
|
154
128
|
}}
|
|
155
|
-
</v-card-
|
|
129
|
+
</v-card-title>
|
|
156
130
|
<textEditor
|
|
157
131
|
outlined
|
|
158
132
|
auto-grow
|
|
133
|
+
menubar="edit"
|
|
134
|
+
toolbar="undo redo | italic underline strikethrough removeformat | mathButton"
|
|
159
135
|
v-model="
|
|
160
136
|
block.metadata.config.cards[index]
|
|
161
137
|
.front.text
|
|
162
138
|
"
|
|
163
139
|
:label="
|
|
164
140
|
$t(
|
|
165
|
-
'
|
|
141
|
+
'windward.games.components.settings.flashcard.form.text'
|
|
166
142
|
)
|
|
167
143
|
"
|
|
168
144
|
required
|
|
@@ -177,13 +153,15 @@
|
|
|
177
153
|
<v-card-text>
|
|
178
154
|
{{
|
|
179
155
|
$t(
|
|
180
|
-
'
|
|
156
|
+
'windward.games.components.settings.flashcard.form.card_content'
|
|
181
157
|
)
|
|
182
158
|
}}
|
|
183
159
|
</v-card-text>
|
|
184
160
|
<textEditor
|
|
185
161
|
outlined
|
|
186
162
|
auto-grow
|
|
163
|
+
menubar="edit"
|
|
164
|
+
toolbar="undo redo | italic underline strikethrough removeformat | mathButton"
|
|
187
165
|
v-model="
|
|
188
166
|
block.metadata.config.cards[index]
|
|
189
167
|
.back.text
|
|
@@ -207,14 +185,14 @@
|
|
|
207
185
|
<template #title>
|
|
208
186
|
{{
|
|
209
187
|
$t(
|
|
210
|
-
'
|
|
188
|
+
'windward.games.components.settings.flashcard.form.image.title'
|
|
211
189
|
)
|
|
212
190
|
}}
|
|
213
191
|
</template>
|
|
214
192
|
<template #description>
|
|
215
193
|
{{
|
|
216
194
|
$t(
|
|
217
|
-
'
|
|
195
|
+
'windward.games.components.settings.flashcard.form.image.configure_blurb'
|
|
218
196
|
)
|
|
219
197
|
}}
|
|
220
198
|
</template>
|
|
@@ -233,14 +211,14 @@
|
|
|
233
211
|
<template #title>
|
|
234
212
|
{{
|
|
235
213
|
$t(
|
|
236
|
-
'
|
|
214
|
+
'windward.games.components.settings.flashcard.form.image.title'
|
|
237
215
|
)
|
|
238
216
|
}}
|
|
239
217
|
</template>
|
|
240
218
|
<template #description>
|
|
241
219
|
{{
|
|
242
220
|
$t(
|
|
243
|
-
'
|
|
221
|
+
'windward.games.components.settings.flashcard.form.image.configure_blurb'
|
|
244
222
|
)
|
|
245
223
|
}}
|
|
246
224
|
</template>
|
|
@@ -285,7 +263,7 @@
|
|
|
285
263
|
"
|
|
286
264
|
>{{
|
|
287
265
|
$t(
|
|
288
|
-
'
|
|
266
|
+
'windward.games.components.settings.flashcard.form.front'
|
|
289
267
|
)
|
|
290
268
|
}}</v-btn
|
|
291
269
|
>
|
|
@@ -300,7 +278,7 @@
|
|
|
300
278
|
>
|
|
301
279
|
{{
|
|
302
280
|
$t(
|
|
303
|
-
'
|
|
281
|
+
'windward.games.components.settings.flashcard.form.back'
|
|
304
282
|
)
|
|
305
283
|
}}</v-btn
|
|
306
284
|
></v-row
|
|
@@ -317,7 +295,7 @@
|
|
|
317
295
|
<v-icon>mdi-plus</v-icon>
|
|
318
296
|
{{
|
|
319
297
|
$t(
|
|
320
|
-
'
|
|
298
|
+
'windward.games.components.settings.flashcard.form.add_card'
|
|
321
299
|
)
|
|
322
300
|
}}
|
|
323
301
|
</v-btn>
|
|
@@ -376,7 +354,7 @@ export default {
|
|
|
376
354
|
}
|
|
377
355
|
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
378
356
|
this.block.metadata.config.title = this.$t(
|
|
379
|
-
'
|
|
357
|
+
'windward.games.components.content.blocks.flashcard.title'
|
|
380
358
|
)
|
|
381
359
|
}
|
|
382
360
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
@@ -392,15 +370,17 @@ export default {
|
|
|
392
370
|
return {
|
|
393
371
|
front: {
|
|
394
372
|
img: {},
|
|
395
|
-
header: '
|
|
396
|
-
text: '
|
|
397
|
-
imgAltText: '
|
|
373
|
+
header: '',
|
|
374
|
+
text: '',
|
|
375
|
+
imgAltText: '',
|
|
398
376
|
},
|
|
399
377
|
back: {
|
|
400
378
|
img: {},
|
|
401
|
-
header:
|
|
402
|
-
|
|
403
|
-
|
|
379
|
+
header: this.$t(
|
|
380
|
+
'windward.games.components.settings.flashcard.form.header'
|
|
381
|
+
),
|
|
382
|
+
text: '',
|
|
383
|
+
imgAltText: '',
|
|
404
384
|
},
|
|
405
385
|
expand: false,
|
|
406
386
|
title: '',
|
|
@@ -446,6 +426,9 @@ export default {
|
|
|
446
426
|
flipCardBack(index) {
|
|
447
427
|
this.block.metadata.config.cards[index].side = false
|
|
448
428
|
},
|
|
429
|
+
stripHtml(htmlString) {
|
|
430
|
+
return htmlString.replace(/(<([^>]+)>)/gi, '')
|
|
431
|
+
},
|
|
449
432
|
},
|
|
450
433
|
}
|
|
451
434
|
</script>
|