From 4776206bb84b4f00a473591fe7ff2c7d78576b4b Mon Sep 17 00:00:00 2001 From: Reto Aebersold Date: Wed, 1 Nov 2023 14:27:53 +0100 Subject: [PATCH] feat: Rich-text component for ext. link handling --- .../components/mediaLibrary/OverviewCard.vue | 5 +-- client/src/components/ui/RichText.vue | 32 +++++++++++++++++++ .../EvaluationSummary.vue | 20 +++++++----- .../EvaluationTask.vue | 8 ++--- .../circlePage/CircleOverview.vue | 9 ++---- .../LearningContentPage.vue | 20 +----------- .../assignment/AssignmentIntroductionView.vue | 20 ++++++------ .../AssignmentSubmissionResponses.vue | 11 ++++--- .../assignment/AssignmentTaskView.vue | 7 +++- .../blocks/PlaceholderBlock.vue | 10 +++--- .../blocks/RichTextBlock.vue | 15 ++++----- .../mediaLibrary/MediaLibraryContentPage.vue | 21 ++++++------ client/src/utils/dom.ts | 14 ++++++++ 13 files changed, 113 insertions(+), 79 deletions(-) create mode 100644 client/src/components/ui/RichText.vue create mode 100644 client/src/utils/dom.ts diff --git a/client/src/components/mediaLibrary/OverviewCard.vue b/client/src/components/mediaLibrary/OverviewCard.vue index fe592f57..0edda822 100644 --- a/client/src/components/mediaLibrary/OverviewCard.vue +++ b/client/src/components/mediaLibrary/OverviewCard.vue @@ -1,4 +1,6 @@ + + diff --git a/client/src/pages/cockpit/assignmentEvaluationPage/EvaluationSummary.vue b/client/src/pages/cockpit/assignmentEvaluationPage/EvaluationSummary.vue index e0de6449..52e20e80 100644 --- a/client/src/pages/cockpit/assignmentEvaluationPage/EvaluationSummary.vue +++ b/client/src/pages/cockpit/assignmentEvaluationPage/EvaluationSummary.vue @@ -16,6 +16,7 @@ import { useMutation } from "@urql/vue"; import dayjs, { Dayjs } from "dayjs"; import * as log from "loglevel"; import { computed, reactive } from "vue"; +import RichText from "@/components/ui/RichText.vue"; const props = defineProps<{ assignmentUser: CourseSessionUser; @@ -188,10 +189,11 @@ const evaluationUser = computed(() => { -
+
{ subTaskByPoints(task, evaluationForTask(task).points)?.value.title " >
-

+ open-links-in-new-tab + /> +
{{ evaluationForTask(task).points }} Punkte
diff --git a/client/src/pages/cockpit/assignmentEvaluationPage/EvaluationTask.vue b/client/src/pages/cockpit/assignmentEvaluationPage/EvaluationTask.vue index f2c273dc..7beda376 100644 --- a/client/src/pages/cockpit/assignmentEvaluationPage/EvaluationTask.vue +++ b/client/src/pages/cockpit/assignmentEvaluationPage/EvaluationTask.vue @@ -13,6 +13,7 @@ import { useMutation } from "@urql/vue"; import { useDebounceFn } from "@vueuse/core"; import * as log from "loglevel"; import { computed } from "vue"; +import RichText from "@/components/ui/RichText.vue"; const props = defineProps<{ assignmentUser: CourseSessionUser; @@ -114,11 +115,10 @@ const evaluateAssignmentCompletionDebounced = useDebounceFn( /> diff --git a/client/src/pages/learningPath/circlePage/CircleOverview.vue b/client/src/pages/learningPath/circlePage/CircleOverview.vue index fe468913..b822194e 100644 --- a/client/src/pages/learningPath/circlePage/CircleOverview.vue +++ b/client/src/pages/learningPath/circlePage/CircleOverview.vue @@ -1,6 +1,7 @@