diff --git a/components/RepoBox.vue b/components/RepoBox.vue index 621c330e..195e814a 100644 --- a/components/RepoBox.vue +++ b/components/RepoBox.vue @@ -17,35 +17,69 @@ rel="noopener noreferrer" class="text-lg font-semibold group-hover:text-juniper" :class="{ 'text-juniper': isCardOpen }" - >{{ repo.owner }} / {{ repo.name }} + {{ repo.owner }} / {{ repo.name }} + + + + {{ issuesDisplay }} + +
{{ repo.description }}
+
-
lang: {{ repo.language }}
-
stars: {{ repo.stars_display }}
- last activity: {{ lastModifiedDisplay }} + lang: {{ repo.language }} +
+ +
+ stars: {{ repo.stars_display }} +
+ +
+ last activity: + {{ lastModifiedDisplay }} + + + Inactive +
-
    -
  1. - #{{ issue.number }} + +
      +
    1. + + #{{ issue.number }} + +
      {{ issue.title }} + {{ issue.title }} + +
      - {{ issue.comments_count }} + + {{ issue.comments_count }} +
    2. @@ -94,6 +132,14 @@ const lastModifiedDisplay = computed(() => { return dayjs(props.repo.last_modified).fromNow() }) +const isInactive = computed(() => { + const lastModified = dayjs(props.repo.last_modified) + const now = dayjs() + + const diffYears = now.diff(lastModified, 'year') + return diffYears >= 2 +}) + const isCardOpen = computed(() => { return openRepoId.value === props.repo.id }) @@ -111,6 +157,8 @@ function getIssueCommentsCounterTooltip(issue) { if (numComments === 0) { return `There are no comments on this issue` } - return numComments > 1 ? `There are ${numComments} comments on this issue` : `There is one comment on this issue` + return numComments > 1 + ? `There are ${numComments} comments on this issue` + : `There is one comment on this issue` } - + \ No newline at end of file