From bbdc48948444a59f063ba509fd3a94366e898042 Mon Sep 17 00:00:00 2001 From: Shelex <11396724+Shelex@users.noreply.github.com> Date: Sat, 8 Nov 2025 17:03:20 +0200 Subject: [PATCH] fix: icon colors --- app/api/report/trend/route.ts | 4 +--- app/components/header-links.tsx | 11 ++++++++++- app/components/icons.tsx | 23 ++++++++++++++++++++--- app/components/trend-chart.tsx | 9 +++++++-- app/styles/globals.css | 4 ++-- readme.md | 2 +- 6 files changed, 41 insertions(+), 12 deletions(-) diff --git a/app/api/report/trend/route.ts b/app/api/report/trend/route.ts index 1bda6a47..ea367aa5 100644 --- a/app/api/report/trend/route.ts +++ b/app/api/report/trend/route.ts @@ -7,9 +7,7 @@ export const dynamic = 'force-dynamic'; // defaults to auto export async function GET(request: NextRequest) { const { searchParams } = new URL(request.url); const project = searchParams.get('project') ?? ''; - const { reports } = await service.getReports({ project }); - - const latestReports = reports.slice(0, 20); + const { reports: latestReports } = await service.getReports({ project, pagination: { offset: 0, limit: 20 } }); return Response.json(latestReports); } diff --git a/app/components/header-links.tsx b/app/components/header-links.tsx index 382a1cd0..3386e636 100644 --- a/app/components/header-links.tsx +++ b/app/components/header-links.tsx @@ -1,6 +1,14 @@ import { Link } from '@heroui/link'; -import { GithubIcon, DiscordIcon, TelegramIcon, LinkIcon, BitbucketIcon, CyborgTestIcon } from '@/app/components/icons'; +import { + GithubIcon, + DiscordIcon, + TelegramIcon, + LinkIcon, + BitbucketIcon, + CyborgTestIcon, + SlackIcon, +} from '@/app/components/icons'; import { SiteWhiteLabelConfig } from '@/app/types'; interface HeaderLinksProps { @@ -17,6 +25,7 @@ export const HeaderLinks: React.FC = ({ config, withTitle = fa { name: 'github', Icon: GithubIcon, title: 'GitHub' }, { name: 'cyborgTest', Icon: CyborgTestIcon, title: 'Cyborg Test' }, { name: 'bitbucket', Icon: BitbucketIcon, title: 'Bitbucket' }, + { name: 'slack', Icon: SlackIcon, title: 'Slack' }, ]; const socialLinks = Object.entries(links).map(([name, href]) => { diff --git a/app/components/icons.tsx b/app/components/icons.tsx index fe8af021..825768f5 100644 --- a/app/components/icons.tsx +++ b/app/components/icons.tsx @@ -26,6 +26,23 @@ export const GithubIcon: FC = ({ size = 40, width, height, ...prop ); }; +export const SlackIcon: FC = ({ size = 40, width, height, ...props }) => ( + + + + + + +); + export const BitbucketIcon: FC = ({ size = 40, width, height, ...props }) => { return ( = ({ size = 40, width, height, ...prop export const TrendIcon: FC = ({ size = 40, width, height, ...props }) => { return ( = ({ size = 24, width, height, ...pr return ( ) { flaky: getPercentage(r.stats.flaky, r.stats.total), flakyCount: r.stats.flaky, total: r.stats.total, - reportUrl: r.reportUrl, + reportUrl: `/report/${r.reportID}`, })); return ( {reportHistory.length <= 1 ? ( - Not enough data for trend chart +
+
+ +
+
) : (