Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ migrate:
# 4) Remove the management command from this `deploy-migrate` recipe
# 5) Repeat!
deploy-migrate:
echo "Nothing to do here!"
python contentcuration/manage.py set_file_duration

contentnodegc:
python contentcuration/manage.py garbage_collect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,44 +52,40 @@
>
<VIconWrapper small> check_circle </VIconWrapper>
<span class="mx-1">{{ $tr('addedText') }}</span>
<VBtn
color="primary"
<KButton
primary
:text="$tr('removeButton')"
@click="deselectNode(previewNode)"
>
{{ $tr('removeButton') }}
</VBtn>
/>
</VLayout>
</VFadeTransition>
<VBtn
<KButton
v-if="!previewIsSelected"
color="primary"
primary
:text="$tr('addButton')"
@click="selectNode(previewNode)"
>
{{ $tr('addButton') }}
</VBtn>
/>
</template>
</ResourceDrawer>
<template #bottom>
<div class="mx-2 subheading">
{{ $tr('resourcesSelected', { count: selectedResourcesCount }) }}
</div>
<VSpacer />
<VBtn
<KButton
v-if="isReview"
primary
:disabled="selected.length === 0"
color="primary"
:text="$tr('importAction')"
@click="handleClickImport"
>
{{ $tr('importAction') }}
</VBtn>
<VBtn
/>
<KButton
v-else
color="primary"
primary
:disabled="selected.length === 0"
:text="$tr('reviewAction')"
@click="handleClickReview"
>
{{ $tr('reviewAction') }}
</VBtn>
/>
</template>
</FullscreenModal>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
v-if="!isBrowsing"
class="my-2"
>
<ActionLink
<KButton
:text="$tr('backToBrowseAction')"
appearance="basic-link"
@click="handleBackToBrowse"
/>
</div>
Expand Down Expand Up @@ -44,25 +45,27 @@
<Icon icon="search" />
</template>
<template #append-outer>
<VBtn
<KButton
class="px-4 search-btn"
color="primary"
primary
type="submit"
:text="$tr('searchAction')"
:disabled="!searchIsValid"
depressed
large
>
{{ $tr('searchAction') }}
</VBtn>
appearance="raised-button"
/>
</template>
</VTextField>
</VForm>

<div class="my-2">
<ActionLink
v-if="!isBrowsing"
<div
v-if="!isBrowsing"
class="my-2"
>
<KButton
class="mb-3"
:text="$tr('savedSearchesLabel')"
:disabled="!savedSearchesExist"
appearance="basic-link"
@click="showSavedSearches = true"
/>
<ActionLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@
})
}}
</span>
<ActionLink
<KButton
class="mx-2"
:disabled="currentSearchSaved"
:text="currentSearchSaved ? $tr('searchSavedSnackbar') : $tr('saveSearchAction')"
appearance="basic-link"
@click="handleClickSaveSearch"
/>
</VFlex>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>

<VLayout
:key="fileId"
:class="{ fullscreen }"
<div
class="renderer"
:aria-busy="isSupported && loading"
>
<div
class="renderer"
:aria-busy="isSupported && loading"
<VLayout
:key="fileId"
:class="{ fullscreen }"
>
<div
v-show="isSupported && loading"
Expand Down Expand Up @@ -139,8 +139,8 @@
</VTooltip>
</VLayout>
</VCard>
</div>
</VLayout>
</VLayout>
</div>

</template>

Expand Down Expand Up @@ -201,27 +201,30 @@
f => f.language.id,
);
},
fileFormat() {
return this.file?.file_format || '';
},
isVideo() {
return this.file.file_format === 'mp4' || this.file.file_format === 'webm';
return this.fileFormat === 'mp4' || this.fileFormat === 'webm';
},
isAudio() {
return this.file.file_format === 'mp3';
return this.fileFormat === 'mp3';
},
isHTML() {
return this.file.file_format === 'zip';
return this.fileFormat === 'zip';
},
isPDF() {
return this.file.file_format === 'pdf';
return this.fileFormat === 'pdf';
},
isEpub() {
return this.file.file_format === 'epub';
return this.fileFormat === 'epub';
},
isSupported() {
return this.isVideo || this.isAudio || this.isHTML || this.isPDF || this.isEpub;
},
htmlPath() {
const entry = get(this.contentNode, ['extra_fields', 'options', 'entry'], 'index.html');
return `/zipcontent/${this.file.checksum}.${this.file.file_format}/${entry}`;
return `/zipcontent/${this.file.checksum}.${this.fileFormat}/${entry}`;
},
src() {
return this.file && this.file.url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import messages from '../../translator';
import { parseNode } from './utils';
import { getNodeDetailsErrors, getNodeFilesErrors } from 'shared/utils/validation';
import { ContentKindsNames } from 'shared/leUtils/ContentKinds';
import { NEW_OBJECT } from 'shared/constants';
import { NEW_OBJECT, ValidationErrors } from 'shared/constants';
import { COPYING_STATUS, COPYING_STATUS_VALUES } from 'shared/data/constants';

function sorted(nodes) {
Expand Down Expand Up @@ -158,14 +158,22 @@ export function getContentNodeIsValid(state, getters, rootState, rootGetters) {

export function getContentNodeDetailsAreValid(state) {
return function (contentNodeId) {
const contentNode = state.contentNodesMap[contentNodeId];
return contentNode && (contentNode[NEW_OBJECT] || !getNodeDetailsErrors(contentNode).length);
return !getNodeDetailsErrorsList(state)(contentNodeId).length;
};
}

export function getNodeDetailsErrorsList(state) {
return function (contentNodeId) {
const contentNode = state.contentNodesMap[contentNodeId];

if (!contentNode) {
return [ValidationErrors.MISSING_NODE];
}

if (contentNode[NEW_OBJECT]) {
return [];
}

return getNodeDetailsErrors(contentNode);
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export const ValidationErrors = {
ACTIVITY_DURATION_MAX_FOR_LONG_ACTIVITY: 'ACTIVITY_DURATION_MAX_FOR_LONG_ACTIVITY',
ACTIVITY_DURATION_MIN_REQUIREMENT: 'ACTIVITY_DURATION_MIN_REQUIREMENT',
ACTIVITY_DURATION_TOO_LONG: 'ACTIVITY_DURATION_TOO_LONG',
MISSING_NODE: 'MISSING_NODE',
...fileErrors,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export const FeedbackTypeOptions = {
flagged: 'FLAGGED',
};

export const FLAG_FEEDBACK_EVENT_ENDPOINT = 'flagged';
export const RECOMMENDATION_EVENT_ENDPOINT = 'recommendations';
export const RECOMMENDATION_INTERACTION_EVENT_ENDPOINT = 'recommendations-interaction';
export const FLAG_FEEDBACK_EVENT_ENDPOINT = 'flagged-events';
export const RECOMMENDATION_EVENT_ENDPOINT = 'recommendations-events';
export const RECOMMENDATION_INTERACTION_EVENT_ENDPOINT = 'recommendations-interaction-events';

/**
* @typedef {Object} BaseFeedbackParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ body {
text-align: center;
}

.button:focus-visible,
.v-btn:focus-visible {
outline: 2px solid var(--v-secondary-base) !important;
// ensures that until KDS migration is complete,
// Vuetify-based buttons have a visible focus style
// consistent with KDS buttons and links
outline: 3px solid #33acf5 !important;
outline-offset: 4px !important;
}

> .v-dialog__content,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@
</template>
</DropdownWrapper>
</VLayout>
<VBtn
color="primary"
<KButton
type="submit"
:disabled="sharing"
primary
>
{{ $tr('inviteButton') }}
</VBtn>
</KButton>
</VForm>

<ChannelSharingTable
Expand Down
Loading