|
|
|
@ -4,9 +4,10 @@ |
|
|
|
|
:aria-labelledby="`course-tool-${tool.ctool.iid}`" |
|
|
|
|
:href="goToCourseTool(course, tool)" |
|
|
|
|
class="course-tool__link" |
|
|
|
|
:class="cardCustomClass" |
|
|
|
|
> |
|
|
|
|
<span |
|
|
|
|
:class="tool.tool.icon" |
|
|
|
|
:class="tool.tool.icon + ' ' + iconCustomClass" |
|
|
|
|
aria-hidden="true" |
|
|
|
|
class="course-tool__icon mdi" |
|
|
|
|
/> |
|
|
|
@ -17,6 +18,7 @@ |
|
|
|
|
v-t="tool.tool.nameToShow" |
|
|
|
|
:href="goToCourseTool(course, tool)" |
|
|
|
|
class="course-tool__title" |
|
|
|
|
:class="titleCustomClass" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<div class="course-tool__options"> |
|
|
|
@ -25,14 +27,13 @@ |
|
|
|
|
@click="changeVisibility(course, tool)" |
|
|
|
|
> |
|
|
|
|
<BaseIcon |
|
|
|
|
v-if="tool.ctool.resourceNode.resourceLinks[0].visibility === 2" |
|
|
|
|
v-if="isVisible" |
|
|
|
|
icon="eye-on" |
|
|
|
|
size="small" |
|
|
|
|
/> |
|
|
|
|
<BaseIcon |
|
|
|
|
v-else |
|
|
|
|
icon="eye-off" |
|
|
|
|
size="small" |
|
|
|
|
class="text-gray-50" |
|
|
|
|
/> |
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
@ -67,7 +68,7 @@ const isSorting = inject("isSorting"); |
|
|
|
|
const isCustomizing = inject("isCustomizing"); |
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line no-undef |
|
|
|
|
defineProps({ |
|
|
|
|
const props = defineProps({ |
|
|
|
|
course: { |
|
|
|
|
type: Object, |
|
|
|
|
required: true |
|
|
|
@ -91,4 +92,23 @@ defineProps({ |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const isCurrentTeacher = computed(() => store.getters["security/isCurrentTeacher"]); |
|
|
|
|
const cardCustomClass = computed(() => { |
|
|
|
|
if (isVisible.value) { |
|
|
|
|
return ''; |
|
|
|
|
} |
|
|
|
|
return 'bg-primary-bgdisabled border-primary-borderdisabled shadow-none '; |
|
|
|
|
}) |
|
|
|
|
const iconCustomClass = computed(() => { |
|
|
|
|
if (isVisible.value) { |
|
|
|
|
return 'bg-primary-bgdisabled '; |
|
|
|
|
} |
|
|
|
|
return 'bg-gradient-to-b from-gray-50 to-gray-25 '; |
|
|
|
|
}) |
|
|
|
|
const titleCustomClass = computed(() => { |
|
|
|
|
if (isVisible.value) { |
|
|
|
|
return ''; |
|
|
|
|
} |
|
|
|
|
return 'text-gray-90 '; |
|
|
|
|
}) |
|
|
|
|
const isVisible = computed(() => props.tool.ctool.resourceNode.resourceLinks[0].visibility === 2); |
|
|
|
|
</script> |