Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 5x 3x 5x 2x 3x 3x 3x | <template>
<WidgetPanel
:title="$t('projectIssuesTab.title')"
:meta="read ? $t('projectIssuesTab.meta', { area }) : $t('projectIssuesTab.reading')"
:count="read ? issues.length : '—'"
>
<EmptyState v-if="issues.length === 0">
{{
read ? $t("projectIssuesTab.none", { area }) : $t("projectIssuesTab.readingIssues")
}}
</EmptyState>
<ul v-else class="divide-y divide-default">
<li v-for="issue in issues" :key="issue.number">
<a
:href="issue.url"
target="_blank"
class="flex items-baseline gap-3 px-4 py-2 hover:bg-elevated"
>
<span class="w-14 shrink-0 font-mono text-xs text-muted">
#{{ issue.number }}
</span>
<span class="min-w-0 flex-1 truncate text-sm text-highlighted">
{{ issue.title }}
</span>
<span class="shrink-0 font-mono text-xs text-muted">{{ issue.age }}</span>
</a>
</li>
</ul>
</WidgetPanel>
</template>
<script setup lang="ts">
import type { Issue } from "#layers/github/app/utils/issues.ts";
interface Props {
issues: (Issue & { age: string })[];
/** Whether GitHub has answered yet, so "none" isn't said before it has. */
read: boolean;
/** The label the project's issues are filed under. */
area: string;
}
const { issues, read, area } = defineProps<Props>();
</script>
|