@@ -3,7 +3,7 @@ import { computed } from 'vue'
33import { useI18n } from ' vue-i18n'
44import { Info , Download } from ' lucide-vue-next'
55import { Button } from ' @/components/ui/button'
6- import CategoryDisplay from ' @/components/mcp-server/CategoryDisplay .vue'
6+ import Card from ' @/components/ui/card/Card .vue'
77
88const { t } = useI18n ()
99
@@ -22,16 +22,14 @@ interface Props {
2222 showDetailsButton? : boolean
2323 installButtonText? : string
2424 detailsButtonText? : string
25- containerClass? : string
2625}
2726
2827const props = withDefaults (defineProps <Props >(), {
2928 selectedServerId: null ,
3029 showInstallButton: true ,
3130 showDetailsButton: true ,
3231 installButtonText: ' ' ,
33- detailsButtonText: ' ' ,
34- containerClass: ' bg-muted/50 px-4 py-6 sm:rounded-lg sm:p-6 md:flex md:items-center md:justify-between md:space-x-6 lg:space-x-8'
32+ detailsButtonText: ' '
3533})
3634
3735const emit = defineEmits <{
@@ -62,12 +60,28 @@ const handleInstallClick = () => {
6260const handleDetailsClick = () => {
6361 emit (' details' , props .server )
6462}
63+
64+ const getGitHubAvatarUrl = (server : typeof props .server ) => {
65+ if (! server .github_account_id ) return null
66+ return ` https://avatars.githubusercontent.com/u/${server .github_account_id }?v=4&s=64 `
67+ }
6568 </script >
6669
6770<template >
68- <div :class =" containerClass" >
71+ <Card variant =" white" >
72+ <div class =" px-6 md:flex md:items-center md:justify-between md:space-x-6 lg:space-x-8" >
73+ <!-- Avatar Image -->
74+ <div v-if =" getGitHubAvatarUrl(server)" class =" flex-shrink-0 mb-4 md:mb-0" >
75+ <img
76+ :src =" getGitHubAvatarUrl(server)!"
77+ :alt =" `${server.name} GitHub avatar`"
78+ class =" h-18 w-18 rounded-lg"
79+ @error =" ($event.target as HTMLImageElement).style.display = 'none'"
80+ />
81+ </div >
82+
6983 <!-- Server Information Grid -->
70- <dl class =" flex-auto divide-y divide-gray-200 text-sm text-gray-600 md:grid md:grid-cols-3 md:gap-x-6 md:divide-y-0 lg :w-1/2 lg :flex-none lg:gap-x-8" >
84+ <dl class =" flex-auto divide-y divide-gray-200 text-sm text-gray-600 md:grid md:grid-cols-2 md:gap-x-6 md:divide-y-0 md :w-80 md :flex-none lg:gap-x-8" >
7185 <!-- Server Name -->
7286 <div class =" max-md:flex max-md:justify-between max-md:py-4 max-md:first:pt-0 max-md:last:pb-0" >
7387 <dt class =" font-medium text-gray-900" >{{ t('mcpInstallations.wizard.server.name') }}</dt >
@@ -79,23 +93,10 @@ const handleDetailsClick = () => {
7993 <dt class =" font-medium text-gray-900" >{{ t('mcpInstallations.wizard.server.author') }}</dt >
8094 <dd class =" md:mt-1" >{{ server.author_name || t('mcpInstallations.wizard.server.unknownAuthor') }}</dd >
8195 </div >
82-
83- <!-- Category -->
84- <div class =" max-md:flex max-md:justify-between max-md:py-4 max-md:first:pt-0 max-md:last:pb-0" >
85- <dt class =" font-medium text-gray-900" >{{ t('mcpInstallations.wizard.server.category') }}</dt >
86- <dd class =" md:mt-1" >
87- <CategoryDisplay
88- :category-id =" server.category_id"
89- :show-not-provided =" true"
90- text-class =" text-sm"
91- icon-class =" h-4 w-4 text-gray-600"
92- />
93- </dd >
94- </div >
9596 </dl >
9697
97- <!-- Description (if provided) -->
98- <div v-if =" server.description" class =" mt-4 md:mt-0 md:ml-6 lg:w-1/2 " >
98+ <!-- Description -->
99+ <div v-if =" server.description" class =" mt-4 md:mt-0 md:ml-6 lg:flex-1 " >
99100 <p class =" text-sm text-gray-600" >{{ server.description }}</p >
100101 </div >
101102
@@ -130,5 +131,6 @@ const handleDetailsClick = () => {
130131 <span class =" sr-only" >{{ server.name }}</span >
131132 </Button >
132133 </div >
133- </div >
134+ </div >
135+ </Card >
134136</template >
0 commit comments