-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14597bd
commit 919fd16
Showing
4 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script setup lang="ts"> | ||
interface Issue { | ||
id: number | ||
dateTime: string | ||
title: string | ||
repository: string | ||
similarityPercentage: number | ||
description?: string | ||
} | ||
defineProps<{ | ||
issue: Issue | ||
}>() | ||
function generateIssueUrl(issue: Issue): string { | ||
return new URL(`/${issue.repository}/issues/${issue.id}`, 'https://github.com').toString() | ||
} | ||
function generateUnsightDotDevUrl(issue: Issue): string { | ||
return new URL(`/${issue.repository}/issue/${issue.id}`, 'https://unsight.dev').toString() | ||
} | ||
</script> | ||
|
||
<template> | ||
<article class="flex flex-row gap-2 leading-tightest"> | ||
<span class="flex-shrink-0 inline-block w-5 h-5 i-tabler-circle-dot text-green-500" /> | ||
<div class="flex flex-row gap-2 flex-wrap md:flex-nowrap md:pb-6 flex-grow"> | ||
<a | ||
:href="generateIssueUrl(issue)" target="_blank" | ||
class="line-clamp-1 flex-grow text-sm md:text-base lg:flex-grow-0 no-underline color-current hover:underline" | ||
>{{ | ||
issue.title | ||
}}</a> | ||
<div class="text-xs relative md:absolute md:mt-6 text-gray-400 mb-1"> | ||
<a aria-current="page" :href="generateIssueUrl(issue)" class="no-underline hover:underline color-current">{{ | ||
issue.repository }}</a> | ||
· updated <time :datetime="issue.dateTime">{{ issue.dateTime }}</time> · <a | ||
:href="generateUnsightDotDevUrl(issue)" class="no-underline hover:underline color-current" | ||
>{{ | ||
issue.similarityPercentage }}% similar </a> | ||
</div> | ||
<div class="flex flex-row gap-1 items-baseline flex-wrap md:flex-nowrap" /> | ||
</div> | ||
</article> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<script setup lang="ts"> | ||
import 'uno.css' | ||
import SimilarIssue from '~/components/SimilarIssue.vue' | ||
const issues = [ | ||
{ id: 1, repository: 'nickytonline/yoyo', title: 'First Issue', description: 'This is the first issue', similarityPercentage: 90, dateTime: '2021-10-01T00:00:00Z' }, | ||
{ id: 2, repository: 'bobbyt/amazer', title: 'Second Issue', description: 'This is the second issue', similarityPercentage: 80, dateTime: '2024-07-08T00:00:00Z' }, | ||
{ id: 3, repository: 'jam/booya', title: 'Third Issue', description: 'This is the third issue', similarityPercentage: 70, dateTime: '2024-12-10T00:00:00Z' }, | ||
] | ||
</script> | ||
|
||
<!-- This is hard-coded mock data for the time being. Just figuring my way around Vue and unsight.dev still --> | ||
<template> | ||
<details class="grid gap-2"> | ||
<summary>Similar issues</summary> | ||
<article class="flex flex-row gap-2 leading-tightest" data-v-acbad306="" data-v-9a90de38=""> | ||
<span class="flex-shrink-0 inline-block w-5 h-5 i-tabler-circle-dot text-green-500" data-v-9a90de38="" /><div class="flex flex-row gap-2 flex-wrap md:flex-nowrap md:pb-6 flex-grow" data-v-9a90de38=""> | ||
<a href="https://github.com/nickytonline/test-repo-for-unsight-dev/issues/1" rel="noopener noreferrer" target="_blank" class="line-clamp-1 flex-grow text-sm md:text-base lg:flex-grow-0 no-underline color-current hover:underline" data-v-9a90de38="">CI Fails</a><div class="text-xs relative md:absolute md:mt-6 text-gray-400 mb-1" data-v-9a90de38=""> | ||
<a aria-current="page" href="/nickytonline/test-repo-for-unsight-dev" class="router-link-active router-link-exact-active no-underline hover:underline color-current" data-v-9a90de38="">nickytonline/test-repo-for-unsight-dev</a> · updated <time data-relative="true" datetime="2024-12-12T20:05:26.000Z" data-prehydrate-id=":J6wLYSE7Rv:" data-v-9a90de38="">56 hours ago</time> · <a href="/nickytonline/test-repo-for-unsight-dev/1" class="no-underline hover:underline color-current" data-v-9a90de38="">79% similar </a> | ||
</div><div class="flex flex-row gap-1 items-baseline flex-wrap md:flex-nowrap" /> | ||
</div> | ||
</article> | ||
<SimilarIssue v-for="issue in issues" :key="issue.id" :issue="issue" /> | ||
</details> | ||
</template> |