Skip to content

Commit

Permalink
feat: show base name is owners are shown
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlienard committed May 22, 2024
1 parent 91112a3 commit a30d533
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ onUnmounted(() => {
<span v-if="settings.showOwners" class="text-slate-500">
{{ repo.ownerName }}/
</span>
<span>{{ repo.name }}</span>
<span v-if="settings.showOwners">{{ repo.name }}</span>
<span v-else>{{ repo.displayName }}</span>
</h3>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion server/api/repositories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function getDisplayName(name: string) {
export type Repository = {
rank: number;
name: string;
displayName: string;
ownerName: string;
image: string;
description: string;
Expand Down Expand Up @@ -67,7 +68,8 @@ export default defineEventHandler(async (event) => {

const result: Repository[] = data.search.edges.map(({ node }: any, index: number) => ({
rank: index + 1,
name: getDisplayName(node.name),
name: node.name,
displayName: getDisplayName(node.name),
ownerName: node.owner.login,
image: node.owner.avatarUrl,
description: emojify(node.description),
Expand Down

0 comments on commit a30d533

Please sign in to comment.