Skip to content

Commit b59482b

Browse files
feat(tutor): Adds download button (#12)
* feat(tutor): adds download * feat(tutor): adds lis to convert md to docx * copy package instead of importing
1 parent ab124b9 commit b59482b

File tree

13 files changed

+1983
-555
lines changed

13 files changed

+1983
-555
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
},
1919
"dependencies": {
2020
"axios": "^1.8.2",
21+
"docx": "^9.3.0",
22+
"file-saver": "^2.0.5",
2123
"marked": "^12.0.2",
2224
"pinia": "^2.1.4",
2325
"vue": "^3.3.4",

src/components/CardSimpleComponent.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ defineProps<{
1717
hideRefIndicator?: boolean;
1818
shouldDisplayScore?: boolean;
1919
score?: number;
20-
toggleBookmark: () => void;
21-
isBookmarked: boolean;
20+
toggleBookmark?: () => void;
21+
isBookmarked?: boolean;
2222
}>();
2323
2424
const isModalActive = ref(false);
@@ -73,7 +73,11 @@ const handleModalOpen = () => {
7373
<TooltipComponent class="tltip" :tooltipText="$t('cardArticle.seeDetails')" isLeft />
7474
</div>
7575

76-
<BookmarkComponent :isBookmarked="isBookmarked" :toggleBookmark="toggleBookmark" />
76+
<BookmarkComponent
77+
v-if="toggleBookmark"
78+
:isBookmarked="isBookmarked"
79+
:toggleBookmark="toggleBookmark"
80+
/>
7781
<a class="icon-wrapper" target="_blank" :href="url">
7882
<OpenUrlIcon class="icon is-small" />
7983
<TooltipComponent class="tltip" :tooltipText="$t('cardArticle.openArticle')" isLeft />

src/components/tutor/SecondStep.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ defineProps<{
1818
:corpus="source.payload.document_corpus"
1919
:url="source.payload.document_url"
2020
:details="source.payload.document_details"
21+
:sdg="source.payload.document_sdg"
2122
/>
2223
</div>
2324
</div>

src/components/tutor/ThirdStep.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ defineProps<{
1212
<!-- syllabus -->
1313
<p
1414
contenteditable="true"
15+
id="syllabus"
1516
class="syllabus content"
1617
v-if="syllabus.length"
1718
v-html="marked.parse(syllabus)"

0 commit comments

Comments
 (0)