Skip to content

Commit f3009f6

Browse files
committed
Update ContentIcon to ensure H5P and ZIM support for course resource types
1 parent 4da0a29 commit f3009f6

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

packages/kolibri-common/components/labels/ContentIcon.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@
5151
:color="color"
5252
style="top: 0"
5353
/>
54+
<KIcon
55+
v-if="is(ContentNodeKinds.H5P)"
56+
:icon="ContentNodeKinds.HTML5"
57+
:class="[colorClass]"
58+
:color="color"
59+
style="top: 0"
60+
/>
61+
<KIcon
62+
v-if="is(ContentNodeKinds.ZIM)"
63+
:icon="ContentNodeKinds.DOCUMENT"
64+
:class="[colorClass]"
65+
:color="color"
66+
style="top: 0"
67+
/>
5468
<KIcon
5569
v-if="is(ContentNodeKinds.EXAM)"
5670
icon="quiz"
@@ -161,6 +175,8 @@
161175
[ContentNodeKinds.AUDIO]: 'audio',
162176
[ContentNodeKinds.DOCUMENT]: 'document',
163177
[ContentNodeKinds.HTML5]: 'html5',
178+
[ContentNodeKinds.H5P]: 'html5',
179+
[ContentNodeKinds.ZIM]: 'document',
164180
[ContentNodeKinds.EXAM]: 'exam',
165181
[ContentNodeKinds.LESSON]: 'lesson',
166182
[ContentNodeKinds.SLIDESHOW]: 'slideshow',

packages/kolibri/constants.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export const ContentNodeKinds = {
4141
EXERCISE: 'exercise',
4242
TOPIC: 'topic',
4343
HTML5: 'html5',
44+
H5P: 'h5p',
45+
ZIM: 'zim',
4446
CHANNEL: 'channel', // e.g. a root topic
4547
EXAM: 'exam',
4648
LESSON: 'lesson',

0 commit comments

Comments
 (0)