11<script setup>
2- import { ref } from " vue" ;
2+ import { ref , computed } from " vue" ;
33import Dialog from " ../Dialog.vue" ;
44import { VPTeamMembers , VPButton } from " vitepress/theme" ;
5+ import { Repository } from " ../../data/repositories" ;
56
6- defineProps ([" repo" , " internalRepo" ]);
7+ const props = defineProps ([" repo" ]);
8+ const internalRepo = computed (() => new Repository (props .repo .url ));
9+
10+ console .log (internalRepo .value .members );
711
812const showModal = ref (false );
913
@@ -20,17 +24,33 @@ const closeModal = () => {
2024
2125<template >
2226 <div :class =" $style.repoMetaContainer" >
23- <img v-if =" repo.cover" :class =" $style.repoCover" :src =" repo.cover" />
24- <span :class =" $style.repoTitle" >{{ repo.name }}</span >
25- <span v-if =" repo.description" :class =" $style.repoDetails" >{{ repo.description }}</span >
26- <div v-if =" repo.submission || repo.support || repo.donate" :class =" $style.repoActions" >
27- <VPButton tag =" a" v-if =" repo.submission" text =" Submit Module" size =" medium" theme =" brand" :href =" repo.submission" />
28- <VPButton tag =" a" v-if =" repo.support" text =" Support" size =" medium" theme =" alt" :href =" repo.support" />
29- <VPButton v-if =" internalRepo.members" text =" Team" size =" medium" theme =" alt" @click =" openModal" />
30- <VPButton tag =" a" v-if =" repo.donate" text =" Donate" size =" medium" theme =" sponsor" :href =" repo.donate" />
27+ <img v-if =" props. repo.cover" :class =" $style.repoCover" :src =" props. repo.cover" />
28+ <span :class =" $style.repoTitle" >{{ props. repo.name }}</span >
29+ <span v-if =" props. repo.description" :class =" $style.repoDetails" >{{ props. repo.description }}</span >
30+ <div v-if =" props. repo.submission || props. repo.support || props. repo.donate || props.repo.memebers " :class =" $style.repoActions" >
31+ <VPButton tag =" a" v-if =" props. repo.submission" text =" Submit Module" size =" medium" theme =" brand" :href =" props. repo.submission" />
32+ <VPButton tag =" a" v-if =" props. repo.support" text =" Support" size =" medium" theme =" alt" :href =" props. repo.support" />
33+ <VPButton v-if =" internalRepo.members.length !== 0 " text =" Team" size =" medium" theme =" alt" @click =" openModal" />
34+ <VPButton tag =" a" v-if =" props. repo.donate" text =" Donate" size =" medium" theme =" sponsor" :href =" props. repo.donate" />
3135 </div >
36+ <details class =" details custom-block" >
37+ <summary >Repository URL to add it to MMRL</summary >
38+
39+ <div class =" language-text vp-adaptive-theme line-numbers-mode" >
40+ <button title =" Copy Code" class =" copy" ></button >
41+ <span class =" lang" >ts</span >
42+ <pre
43+ class =" shiki shiki-themes github-light github-dark vp-code"
44+ tabindex =" 0"
45+ ><code ><span class =" line" >{{ internalRepo.mmrlUrl }}</span ></code ></pre >
46+ <div class =" line-numbers-wrapper" aria-hidden =" true" >
47+ <span class =" line-number" >1</span >
48+ <br />
49+ </div >
50+ </div >
51+ </details >
3252 </div >
33- <Dialog :open =" showModal" :onClose =" closeModal" :onOpen =" openModal" :contentStyle =" { padding: '16px 26px' }" title =" Repository Member " >
53+ <Dialog :open =" showModal" :onClose =" closeModal" :onOpen =" openModal" :contentStyle =" { padding: '16px 26px' }" title =" Repository Members " >
3454 <VPTeamMembers size =" small" :members =" internalRepo.members" />
3555 </Dialog >
3656</template >
0 commit comments