File tree Expand file tree Collapse file tree 4 files changed +58
-11
lines changed
Expand file tree Collapse file tree 4 files changed +58
-11
lines changed Original file line number Diff line number Diff line change 1+ <template >
2+ <div id =" torrent-comment" class =" flex flex-col gap-6" >
3+ <div class =" flex flex-row items-center justify-between" >
4+ <h2 class =" mr-1 text-2xl font-medium text-left text-neutral-content/50" >
5+ Comment
6+ </h2 >
7+ <button
8+ class =" flex flex-col items-center justify-center w-10 h-10 duration-200 bg-transparent text-base-content/50 hover:text-base-content rounded-xl"
9+ @click =" collapsed = !collapsed"
10+ >
11+ <ChevronDownIcon class =" w-6" :class =" { 'rotate-90': collapsed }" />
12+ </button >
13+ </div >
14+ <template v-if =" ! collapsed " >
15+ <div class =" flex flex-col w-full h-full p-6 grow bg-base-100 rounded-2xl" >
16+ <template v-if =" torrent .comment " >
17+ <Markdown :source =" torrent.comment" />
18+ </template >
19+ <template v-else >
20+ <span class =" italic text-neutral-content" >No comment provided.</span >
21+ </template >
22+ </div >
23+ </template >
24+ </div >
25+ </template >
26+
27+ <script setup lang="ts">
28+ import { ChevronDownIcon } from " @heroicons/vue/24/solid" ;
29+ import { TorrentResponse } from " torrust-index-types-lib" ;
30+ import { PropType } from " vue" ;
31+ import { ref } from " #imports" ;
32+ import Markdown from " ~/components/Markdown.vue" ;
33+
34+ const collapsed = ref (false );
35+
36+ const props = defineProps ({
37+ torrent: {
38+ type: Object as PropType <TorrentResponse >,
39+ required: true
40+ }
41+ });
42+ </script >
43+
44+ <style scoped>
45+
46+ </style >
Original file line number Diff line number Diff line change 1616 </div >
1717 <div v-if =" torrent" class =" flex flex-col flex-auto w-full gap-6" >
1818 <TorrentDescriptionTab :torrent =" torrent" @updated =" reloadTorrent" />
19+ <TorrentCommentTab :torrent =" torrent" @updated =" reloadTorrent" />
1920 <TorrentFilesTab :torrent =" torrent" @updated =" reloadTorrent" />
2021 <TorrentTrackersTab :torrent =" torrent" @updated =" reloadTorrent" />
2122 </div >
Original file line number Diff line number Diff line change 3939 "dompurify" : " ^3.0.5" ,
4040 "marked" : " ^7.0.2" ,
4141 "notiwind-ts" : " ^2.0.2" ,
42- "torrust-index-api-lib" : " ^1.0.0-alpha.1 " ,
43- "torrust-index-types-lib" : " ^1.0.0-alpha.1 " ,
42+ "torrust-index-api-lib" : " ^1.0.0-alpha.3 " ,
43+ "torrust-index-types-lib" : " ^1.0.0-alpha.3 " ,
4444 "uuid" : " ^9.0.0"
4545 }
4646}
You can’t perform that action at this time.
0 commit comments