|
2 | 2 | import { ref, computed, onMounted } from 'vue' |
3 | 3 | import { useI18n } from 'vue-i18n' |
4 | 4 | import { useRouter } from 'vue-router' |
5 | | -import { Loader2, ChevronDown, PackagePlus, AlertTriangle } from 'lucide-vue-next' |
| 5 | +import { ChevronDown, PackagePlus, AlertTriangle } from 'lucide-vue-next' |
6 | 6 | import { Button } from '@/components/ui/button' |
7 | 7 | import { Alert, AlertDescription } from '@/components/ui/alert' |
| 8 | +import { Skeleton } from '@/components/ui/skeleton' |
8 | 9 | import McpServerSquareCard from '@/components/mcp-server/McpServerSquareCard.vue' |
9 | 10 | import FeaturedMcpServers from '@/components/mcp-server/FeaturedMcpServers.vue' |
10 | 11 | import PaginationControls from '@/components/ui/pagination/PaginationControls.vue' |
@@ -256,9 +257,40 @@ onMounted(() => { |
256 | 257 | </div> |
257 | 258 |
|
258 | 259 | <!-- Loading State --> |
259 | | - <div v-if="isLoading" class="mt-14 flex items-center justify-center py-8"> |
260 | | - <Loader2 class="h-6 w-6 animate-spin mr-2 text-gray-400" /> |
261 | | - <span class="text-gray-600">{{ t('messages.loading') }}</span> |
| 260 | + <div v-if="isLoading" class="mt-14 space-y-6"> |
| 261 | + <!-- Skeleton grid with 6 cards (2 rows x 3 columns) --> |
| 262 | + <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> |
| 263 | + <div v-for="i in 6" :key="i" class="rounded-lg bg-gray-50 border-[6px] border-gray-200 p-6"> |
| 264 | + <div class="space-y-4"> |
| 265 | + <!-- Header with avatar and title --> |
| 266 | + <div class="flex items-center gap-2"> |
| 267 | + <Skeleton class="h-8 w-8 rounded-md" /> |
| 268 | + <Skeleton class="h-5 w-32" /> |
| 269 | + </div> |
| 270 | + <!-- GitHub repo line --> |
| 271 | + <div class="flex items-center gap-2 pt-4 border-t border-gray-900/5"> |
| 272 | + <Skeleton class="h-4 w-4 rounded" /> |
| 273 | + <Skeleton class="h-4 flex-1" /> |
| 274 | + </div> |
| 275 | + <!-- Description --> |
| 276 | + <div class="space-y-2"> |
| 277 | + <Skeleton class="h-4 w-full" /> |
| 278 | + <Skeleton class="h-4 w-full" /> |
| 279 | + <Skeleton class="h-4 w-3/4" /> |
| 280 | + </div> |
| 281 | + <!-- Tags area --> |
| 282 | + <div class="flex gap-1.5 flex-wrap min-h-[3rem]"> |
| 283 | + <Skeleton class="h-6 w-16 rounded-md" /> |
| 284 | + <Skeleton class="h-6 w-20 rounded-md" /> |
| 285 | + <Skeleton class="h-6 w-14 rounded-md" /> |
| 286 | + </div> |
| 287 | + <!-- Install button --> |
| 288 | + <div class="pt-4 border-t border-gray-900/5"> |
| 289 | + <Skeleton class="h-10 w-full rounded-md" /> |
| 290 | + </div> |
| 291 | + </div> |
| 292 | + </div> |
| 293 | + </div> |
262 | 294 | </div> |
263 | 295 |
|
264 | 296 | <!-- Server Grid (only show when there's a search query and results) --> |
|
0 commit comments