Skip to content

Commit 41aebd0

Browse files
committed
Lint files
1 parent 3ede8ef commit 41aebd0

3 files changed

Lines changed: 174 additions & 176 deletions

File tree

contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeListItem/index.vue

Lines changed: 172 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -2,190 +2,190 @@
22

33
<VHover :disabled="copying">
44
<template #default="{ hover }">
5-
<DraggableHandle v-bind="draggableHandle">
6-
<template #default>
7-
<VListTile
8-
v-if="node"
9-
class="content-list-item pa-0"
10-
:class="{
11-
'compact': isCompact,
12-
hover: hover && !copying,
13-
active: (active || hover) && !copying,
14-
disabled: copying,
15-
highlight,
16-
}"
17-
data-test="content-item"
18-
@click="handleTileClick"
5+
<DraggableHandle v-bind="draggableHandle">
6+
<template #default>
7+
<VListTile
8+
v-if="node"
9+
class="content-list-item pa-0"
10+
:class="{
11+
'compact': isCompact,
12+
hover: hover && !copying,
13+
active: (active || hover) && !copying,
14+
disabled: copying,
15+
highlight,
16+
}"
17+
data-test="content-item"
18+
@click="handleTileClick"
19+
>
20+
<slot name="actions-start" :hover="hover" class="actions-start-col"></slot>
21+
<div
22+
class="mx-2 thumbnail-col"
23+
:class="{
24+
'px-2': !isCompact,
25+
'py-4': !isCompact,
26+
'py-3': isCompact,
27+
}"
28+
>
29+
<ImageOnlyThumbnail
30+
v-bind="thumbnailAttrs"
31+
:isTopic="isTopic"
32+
:learningActivities="node.learning_activities"
33+
:compact="isCompact"
34+
:isEmpty="node.total_count === 0"
35+
/>
36+
</div>
37+
<VListTileContent
38+
class="description-col grow px-2"
39+
:class="{
40+
'my-4': !isCompact,
41+
'my-3': isCompact,
42+
}"
43+
>
44+
<VListTileTitle data-test="title">
45+
<VLayout row>
46+
<VFlex shrink class="text-truncate">
47+
<h3
48+
v-if="hasTitle(node) || !canEdit || copying || isNew"
49+
class="notranslate text-truncate"
50+
:class="[
51+
isCompact ? 'font-weight-regular' : '',
52+
getTitleClass(node),
53+
]"
54+
dir="auto"
55+
>
56+
{{ getTitle(node) }}
57+
</h3>
58+
</VFlex>
59+
<VFlex v-if="!isTopic && isCoach" class="px-1">
60+
<Icon
61+
color="roleVisibilityCoach"
62+
small
63+
style="vertical-align: middle;"
64+
>
65+
local_library
66+
</Icon>
67+
</VFlex>
68+
<VFlex>
69+
<ContentNodeValidator
70+
v-if="canEdit && !copying && !isNew"
71+
:node="node"
72+
/>
73+
</VFlex>
74+
</VLayout>
75+
</VListTileTitle>
76+
77+
<ToggleText
78+
v-show="!isCompact && !comfortable"
79+
:text="node.description"
80+
data-test="description"
81+
notranslate
82+
dir="auto"
83+
:splitAt="280"
84+
/>
85+
86+
<VListTileSubTitle
87+
v-if="!isCompact"
88+
data-test="subtitle"
89+
class="metadata"
1990
>
20-
<slot name="actions-start" :hover="hover" class="actions-start-col"></slot>
21-
<div
22-
class="mx-2 thumbnail-col"
23-
:class="{
24-
'px-2': !isCompact,
25-
'py-4': !isCompact,
26-
'py-3': isCompact,
27-
}"
91+
<span v-if="subtitle" class="text">{{ subtitle }}</span>
92+
<span
93+
v-if="node.categories ? Object.keys(node.categories).length > 0 : null"
94+
class="text"
2895
>
29-
<ImageOnlyThumbnail
30-
v-bind="thumbnailAttrs"
31-
:isTopic="isTopic"
32-
:learningActivities="node.learning_activities"
33-
:compact="isCompact"
34-
:isEmpty="node.total_count === 0"
35-
/>
36-
</div>
37-
<VListTileContent
38-
class="description-col grow px-2"
39-
:class="{
40-
'my-4': !isCompact,
41-
'my-3': isCompact,
42-
}"
43-
>
44-
<VListTileTitle data-test="title">
45-
<VLayout row>
46-
<VFlex shrink class="text-truncate">
47-
<h3
48-
v-if="hasTitle(node) || !canEdit || copying || isNew"
49-
class="notranslate text-truncate"
50-
:class="[
51-
isCompact ? 'font-weight-regular' : '',
52-
getTitleClass(node),
53-
]"
54-
dir="auto"
55-
>
56-
{{ getTitle(node) }}
57-
</h3>
58-
</VFlex>
59-
<VFlex v-if="!isTopic && isCoach" class="px-1">
96+
{{ category(node.categories) }}
97+
</span>
98+
<span v-if="isTopic && node.coach_count">
99+
<!-- for each learning activity -->
100+
<VTooltip bottom lazy>
101+
<template #activator="{ on }">
102+
<div style="display: inline-block;" v-on="on">
60103
<Icon
61104
color="roleVisibilityCoach"
62105
small
63-
style="vertical-align: middle;"
106+
class="mx-1"
107+
style="vertical-align: sub;"
64108
>
65109
local_library
66110
</Icon>
67-
</VFlex>
68-
<VFlex>
69-
<ContentNodeValidator
70-
v-if="canEdit && !copying && !isNew"
71-
:node="node"
72-
/>
73-
</VFlex>
74-
</VLayout>
75-
</VListTileTitle>
76-
77-
<ToggleText
78-
v-show="!isCompact && !comfortable"
79-
:text="node.description"
80-
data-test="description"
81-
notranslate
82-
dir="auto"
83-
:splitAt="280"
84-
/>
85-
86-
<VListTileSubTitle
87-
v-if="!isCompact"
88-
data-test="subtitle"
89-
class="metadata"
90-
>
91-
<span v-if="subtitle" class="text">{{ subtitle }}</span>
92-
<span
93-
v-if="node.categories ? Object.keys(node.categories).length > 0 : null"
94-
class="text"
95-
>
96-
{{ category(node.categories) }}
97-
</span>
98-
<span v-if="isTopic && node.coach_count">
99-
<!-- for each learning activity -->
100-
<VTooltip bottom lazy>
101-
<template #activator="{ on }">
102-
<div style="display: inline-block;" v-on="on">
103-
<Icon
104-
color="roleVisibilityCoach"
105-
small
106-
class="mx-1"
107-
style="vertical-align: sub;"
108-
>
109-
local_library
110-
</Icon>
111-
<span v-if="isTopic">
112-
{{ $formatNumber(node.coach_count) }}
113-
</span>
114-
</div>
115-
</template>
116-
<span>
117-
{{ isTopic ?
118-
$tr('hasCoachTooltip', { value: node.coach_count })
119-
: $tr('coachTooltip')
120-
}}
111+
<span v-if="isTopic">
112+
{{ $formatNumber(node.coach_count) }}
121113
</span>
122-
</VTooltip>
123-
</span>
124-
</VListTileSubTitle>
125-
<span v-if="!isCompact">
126-
127-
<ContentNodeLearningActivityIcon
128-
v-if="!isTopic"
129-
:learningActivities="node.learning_activities"
130-
showEachActivityIcon
131-
includeText
132-
small
133-
chip
134-
class="inline"
135-
/>
136-
<span v-if="node.grade_levels">
137-
<span
138-
v-for="(key, index) in Object.keys(node.grade_levels)"
139-
:key="index"
140-
class="small-chip"
141-
:style="{ backgroundColor: $themeTokens.fineLine }"
142-
>
143-
{{ levels(key) }}
144-
</span>
114+
</div>
115+
</template>
116+
<span>
117+
{{ isTopic ?
118+
$tr('hasCoachTooltip', { value: node.coach_count })
119+
: $tr('coachTooltip')
120+
}}
145121
</span>
122+
</VTooltip>
123+
</span>
124+
</VListTileSubTitle>
125+
<span v-if="!isCompact">
126+
127+
<ContentNodeLearningActivityIcon
128+
v-if="!isTopic"
129+
:learningActivities="node.learning_activities"
130+
showEachActivityIcon
131+
includeText
132+
small
133+
chip
134+
class="inline"
135+
/>
136+
<span v-if="node.grade_levels">
137+
<span
138+
v-for="(key, index) in Object.keys(node.grade_levels)"
139+
:key="index"
140+
class="small-chip"
141+
:style="{ backgroundColor: $themeTokens.fineLine }"
142+
>
143+
{{ levels(key) }}
146144
</span>
147-
</VListTileContent>
148-
149-
<VListTileContent class="actions-end-col updated">
150-
<ContentNodeChangedIcon v-if="canEdit && !copying" :node="node" />
151-
</VListTileContent>
152-
<template v-if="!copying">
153-
<VListTileAction class="actions-end-col">
154-
<KIconButton
155-
v-if="isTopic"
156-
:aria-hidden="hover"
157-
data-test="btn-chevron"
158-
icon="chevronRight"
159-
:tooltip="$tr('openTopic')"
160-
size="small"
161-
@click="$emit('topicChevronClick')"
162-
/>
163-
</VListTileAction>
164-
<slot name="actions-end" :hover="hover"></slot>
165-
</template>
166-
<template v-else>
167-
<div class="copying">
168-
<p class="caption pr-3">
169-
<span
170-
class="grey--text"
171-
:style="{ 'cursor': hasCopyingErrored ? 'default' : 'progress' }"
172-
>
173-
{{ copyingMessage }}
174-
</span>
175-
<slot name="copy-fail-retry-action"></slot>
176-
</p>
177-
<ContentNodeCopyTaskProgress
178-
:node="node"
179-
size="30"
180-
/>
181-
<slot name="copy-fail-remove-action"></slot>
182-
</div>
183-
<div class="disabled-overlay"></div>
184-
</template>
185-
<slot name="context-menu" v-if="!contextMenuDisabled"></slot>
186-
</VListTile>
145+
</span>
146+
</span>
147+
</VListTileContent>
148+
149+
<VListTileContent class="actions-end-col updated">
150+
<ContentNodeChangedIcon v-if="canEdit && !copying" :node="node" />
151+
</VListTileContent>
152+
<template v-if="!copying">
153+
<VListTileAction class="actions-end-col">
154+
<KIconButton
155+
v-if="isTopic"
156+
:aria-hidden="hover"
157+
data-test="btn-chevron"
158+
icon="chevronRight"
159+
:tooltip="$tr('openTopic')"
160+
size="small"
161+
@click="$emit('topicChevronClick')"
162+
/>
163+
</VListTileAction>
164+
<slot name="actions-end" :hover="hover"></slot>
165+
</template>
166+
<template v-else>
167+
<div class="copying">
168+
<p class="caption pr-3">
169+
<span
170+
class="grey--text"
171+
:style="{ 'cursor': hasCopyingErrored ? 'default' : 'progress' }"
172+
>
173+
{{ copyingMessage }}
174+
</span>
175+
<slot name="copy-fail-retry-action"></slot>
176+
</p>
177+
<ContentNodeCopyTaskProgress
178+
:node="node"
179+
size="30"
180+
/>
181+
<slot name="copy-fail-remove-action"></slot>
182+
</div>
183+
<div class="disabled-overlay"></div>
187184
</template>
188-
</DraggableHandle>
185+
<slot v-if="!contextMenuDisabled" name="context-menu"></slot>
186+
</VListTile>
187+
</template>
188+
</DraggableHandle>
189189
</template>
190190
</VHover>
191191

@@ -204,7 +204,6 @@
204204
import { RolesNames } from 'shared/leUtils/Roles';
205205
import ImageOnlyThumbnail from 'shared/views/files/ImageOnlyThumbnail';
206206
import ToggleText from 'shared/views/ToggleText';
207-
import ContextMenuCloak from 'shared/views/ContextMenuCloak';
208207
import DraggableHandle from 'shared/views/draggable/DraggableHandle';
209208
import { titleMixin, metadataTranslationMixin } from 'shared/mixins';
210209
import { EffectAllowed } from 'shared/mixins/draggable/constants';
@@ -214,7 +213,6 @@
214213
name: 'ContentNodeListItem',
215214
components: {
216215
DraggableHandle,
217-
ContextMenuCloak,
218216
ImageOnlyThumbnail,
219217
ContentNodeValidator,
220218
ContentNodeChangedIcon,

contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeOptions.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@select="handleSelect"
77
>
88
<template #header>
9-
<slot name="header" />
9+
<slot name="header"></slot>
1010
</template>
1111
</KDropdownMenu>
1212

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"jspdf": "https://github.com/parallax/jsPDF.git#b7a1d8239c596292ce86dafa77f05987bcfa2e6e",
7474
"jszip": "^3.10.1",
7575
"kolibri-constants": "^0.2.0",
76-
"kolibri-design-system": "https://github.com/AlexVelezLl/kolibri-design-system.git#8b8808f35a330e0e25103720ea63f42154f6e678",
76+
"kolibri-design-system": "https://github.com/AlexVelezLl/kolibri-design-system.git#04047be07e8de50d9a31e5e1a2b2eca810495fb8",
7777
"lodash": "^4.17.21",
7878
"material-icons": "0.3.1",
7979
"mutex-js": "^1.1.5",

0 commit comments

Comments
 (0)