From c289de5d2ed274b20449d77b2c8a4b378d4b0e6d Mon Sep 17 00:00:00 2001 From: Alireza Hassani Date: Sun, 23 Aug 2026 16:46:13 +0330 Subject: [PATCH] Add portfolio website link field and card open-link control. Stay on the current list page after move-to-top; only toast success. Co-authored-by: Cursor --- .../business/src/components/PortfolioCard.tsx | 20 +++++++++++++++++-- .../src/components/ProductCard.module.css | 18 +++++++++++++++++ apps/business/src/i18n/messages.ts | 6 ++++++ .../src/pages/AddNewPortfolioPage.tsx | 20 +++++++++++++++++++ apps/business/src/pages/PortfolioListPage.tsx | 6 +----- .../business/src/services/portfolioService.ts | 12 +++++++++++ apps/business/src/types/portfolio.ts | 1 + 7 files changed, 76 insertions(+), 7 deletions(-) diff --git a/apps/business/src/components/PortfolioCard.tsx b/apps/business/src/components/PortfolioCard.tsx index 451a3f0..5fa2393 100644 --- a/apps/business/src/components/PortfolioCard.tsx +++ b/apps/business/src/components/PortfolioCard.tsx @@ -1,8 +1,11 @@ import { Link } from 'react-router-dom' -import { ChevronUp, Pencil, MessageSquare, Trash2 } from 'lucide-react' +import { ChevronUp, Link2, Pencil, MessageSquare, Trash2 } from 'lucide-react' import { useLocale } from '@meshkee/dashboard-ui' import type { Portfolio } from '../types/portfolio' -import { formatPortfolioCardDate } from '../services/portfolioService' +import { + formatPortfolioCardDate, + resolvePortfolioExternalUrl, +} from '../services/portfolioService' import { useT } from '../i18n/useT' import { textLocaleAttrs } from '../utils/textLocale' import { Tooltip } from './Tooltip' @@ -45,6 +48,7 @@ export function PortfolioCard({ const hasAbstract = Boolean(portfolio.abstract?.trim()) // In FA UI, keep cards RTL even when EN titles/abstracts are shown. const abstractDir = isFa ? 'rtl' : abstractLocale.dir + const externalUrl = resolvePortfolioExternalUrl(portfolio.projectUrl) return (
@@ -129,6 +133,18 @@ export function PortfolioCard({ + {externalUrl ? ( + + + + + + ) : null}