Skip to content

Commit 8fad46f

Browse files
committed
Update workflow
feat: enhance ServerCard component with URL opening functionality - Added a button to the ServerCard that opens the app's source URL when clicked. - Improved layout and styling of the ServerCard footer for better visual consistency. - Refactored JSX structure for clarity and maintainability.
1 parent df7e097 commit 8fad46f

File tree

3 files changed

+37
-12
lines changed

3 files changed

+37
-12
lines changed

.github/workflows/tauri-ci-win.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,12 @@ jobs:
5656
run: bun tauri --version
5757

5858
- name: Build Rust app with bun
59-
run: bun tauri build
59+
run: bun tauri build
60+
61+
- name: Upload build artifacts
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: MCP-Linker-Windows-CI
65+
path: |
66+
src-tauri/target/release/bundle/**/*.exe
67+
src-tauri/target/release/bundle/**/*.msi

.github/workflows/tauri-release-win.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Tauri Release Windows
22

33
on:
44
push:
5-
branches:
5+
tags:
66
- 'v*'
77
paths:
88
- '.github/workflows/tauri-release-win.yml'

src/components/server/server-card.tsx

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
CardTitle,
99
} from "@/components/ui/card";
1010
import type { ServerType } from "@/types";
11+
import { openUrl } from "@/utils/urlHelper";
1112
import { Flame, Github, Star, StarOff } from "lucide-react";
1213
import { useTranslation } from "react-i18next";
1314

@@ -33,22 +34,32 @@ export function ServerCard({
3334
<CardHeader className="px-2 py-2 pb-0">
3435
<div className="flex justify-between items-start">
3536
<div className="flex gap-3 items-start">
36-
<div className="p-2 bg-gray-100 rounded-full">
37-
<Github size={18} />
38-
</div>
37+
<div className="p-2 bg-gray-100 rounded-full">
38+
<Github size={18} />
39+
</div>
3940
<div>
40-
<CardTitle className="text-base">{app.name}</CardTitle>
41+
<CardTitle className="text-base">
42+
<button
43+
onClick={(e) => {
44+
e.stopPropagation();
45+
openUrl(app.source);
46+
}}
47+
className="hover:underline text-left"
48+
title="open home page"
49+
>
50+
{app.name}
51+
</button>
52+
</CardTitle>
4153
<CardDescription className="text-xs text-muted-foreground">
4254
by {app.developer}
4355
</CardDescription>
4456
</div>
4557
</div>
4658
<div className="flex gap-2 items-center">
47-
{app.is_hot && (
48-
<Flame size={16} className="text-orange-500" />
49-
)}
59+
{app.is_hot && <Flame size={16} className="text-orange-500" />}
5060
<button
51-
className="text-yellow-500 hover:text-yellow-600 active:scale-110 transition-transform z-20"
61+
// className="text-yellow-500 hover:text-yellow-600 active:scale-110 transition-transform z-20"
62+
className="absolute top-3 right-3 bg-white/70 rounded-full p-1 hover:bg-yellow-100 transition"
5263
onClick={(e) => {
5364
e.stopPropagation();
5465
onToggleFavorite(app.source);
@@ -69,9 +80,15 @@ export function ServerCard({
6980
{app.description || ""}
7081
</CardContent>
7182

72-
<CardFooter className="px-4 pb-4">
83+
<CardFooter className="flex justify-between px-4 pb-4">
84+
<span className="flex">
85+
{app.is_official && (
86+
<span className="text-blue-600">
87+
88+
</span>
89+
)}
90+
</span>
7391
<Button
74-
className="w-full"
7592
onClick={() => onOpenDialog(app)}
7693
variant="default"
7794
>

0 commit comments

Comments
 (0)