From 5e15f69a9535ae1ea75caf136195fdac830f012f Mon Sep 17 00:00:00 2001 From: laixingyou Date: Thu, 26 Oct 2023 10:01:02 +0800 Subject: [PATCH] feat:hidden Event Preview (#254) Signed-off-by: laixingyou --- .../analyze/DataView/OverviewSummary/CommunityRepos.tsx | 6 +++++- .../modules/analyze/DataView/OverviewSummary/TableList.tsx | 5 ++++- apps/web/src/modules/explore/CollectionCard.tsx | 1 + apps/web/src/modules/explore/CollectionFullCard.tsx | 1 + apps/web/src/modules/explore/RepoCard.tsx | 4 +++- apps/web/src/modules/home/Banner/SearchDropdown.tsx | 5 ++--- apps/web/src/modules/home/HotFields/ProjectItem.tsx | 1 + apps/web/src/modules/home/Trending/ListPanel.tsx | 1 + apps/web/src/pages/index.tsx | 2 +- 9 files changed, 19 insertions(+), 7 deletions(-) diff --git a/apps/web/src/modules/analyze/DataView/OverviewSummary/CommunityRepos.tsx b/apps/web/src/modules/analyze/DataView/OverviewSummary/CommunityRepos.tsx index f00eab71..beecae56 100644 --- a/apps/web/src/modules/analyze/DataView/OverviewSummary/CommunityRepos.tsx +++ b/apps/web/src/modules/analyze/DataView/OverviewSummary/CommunityRepos.tsx @@ -29,7 +29,11 @@ const RepoItem: React.FC<{ return (
- +

{name}

{getFirstPathSegment(path)}

diff --git a/apps/web/src/modules/analyze/DataView/OverviewSummary/TableList.tsx b/apps/web/src/modules/analyze/DataView/OverviewSummary/TableList.tsx index 535b9a69..9aad57e7 100644 --- a/apps/web/src/modules/analyze/DataView/OverviewSummary/TableList.tsx +++ b/apps/web/src/modules/analyze/DataView/OverviewSummary/TableList.tsx @@ -147,7 +147,10 @@ const TrendsList: React.FC = () => { return ( - +

{r.name} {item?.level === Level.COMMUNITY ? ( diff --git a/apps/web/src/modules/explore/CollectionCard.tsx b/apps/web/src/modules/explore/CollectionCard.tsx index 2303a197..0e571e7a 100644 --- a/apps/web/src/modules/explore/CollectionCard.tsx +++ b/apps/web/src/modules/explore/CollectionCard.tsx @@ -66,6 +66,7 @@ const CollectionCard = (props: { collection: Collection }) => { diff --git a/apps/web/src/modules/explore/CollectionFullCard.tsx b/apps/web/src/modules/explore/CollectionFullCard.tsx index 8350f424..6ed002f9 100644 --- a/apps/web/src/modules/explore/CollectionFullCard.tsx +++ b/apps/web/src/modules/explore/CollectionFullCard.tsx @@ -74,6 +74,7 @@ const CollectionFullCard = (props: { collection: Collection }) => { diff --git a/apps/web/src/modules/explore/RepoCard.tsx b/apps/web/src/modules/explore/RepoCard.tsx index f5443543..7543ff12 100644 --- a/apps/web/src/modules/explore/RepoCard.tsx +++ b/apps/web/src/modules/explore/RepoCard.tsx @@ -54,7 +54,9 @@ const RepoCard = (props: { {compareMode ? ( repo ) : ( - {repo} + + {repo} + )}

{nameSpace}

diff --git a/apps/web/src/modules/home/Banner/SearchDropdown.tsx b/apps/web/src/modules/home/Banner/SearchDropdown.tsx index 84fd276a..5c37182f 100644 --- a/apps/web/src/modules/home/Banner/SearchDropdown.tsx +++ b/apps/web/src/modules/home/Banner/SearchDropdown.tsx @@ -1,7 +1,6 @@ import React, { useState } from 'react'; import Link from 'next/link'; import classnames from 'classnames'; -import { useRouter } from 'next/router'; import { useTranslation, Trans } from 'next-i18next'; import { AiOutlineRightCircle } from 'react-icons/ai'; import useDropDown from '@common/hooks/useDropDown'; @@ -94,6 +93,7 @@ const LinkItem: React.FC<{ = ({ result, }) => { const { t } = useTranslation(); - const router = useRouter(); const { active } = useDropDown({ totalLength: result.length, onPressEnter: () => { const activeItem = result[active]; - router.push(getShortAnalyzeLink(activeItem)); + window.open(getShortAnalyzeLink(activeItem), '_blank'); }, }); diff --git a/apps/web/src/modules/home/HotFields/ProjectItem.tsx b/apps/web/src/modules/home/HotFields/ProjectItem.tsx index b1a3eafb..a83f0cbd 100644 --- a/apps/web/src/modules/home/HotFields/ProjectItem.tsx +++ b/apps/web/src/modules/home/HotFields/ProjectItem.tsx @@ -17,6 +17,7 @@ const ProjectItem = ({ shortCode, url }) => {
diff --git a/apps/web/src/modules/home/Trending/ListPanel.tsx b/apps/web/src/modules/home/Trending/ListPanel.tsx index 467b279d..a5f70eb5 100644 --- a/apps/web/src/modules/home/Trending/ListPanel.tsx +++ b/apps/web/src/modules/home/Trending/ListPanel.tsx @@ -30,6 +30,7 @@ const ListPanel = (props: { key={item.label} href={getShortAnalyzeLink(item.shortCode)} className="grid cursor-pointer grid-cols-6 gap-2 border-b py-3 last:border-0" + target="_blank" >
diff --git a/apps/web/src/pages/index.tsx b/apps/web/src/pages/index.tsx index 007f5eb4..0d6061e2 100644 --- a/apps/web/src/pages/index.tsx +++ b/apps/web/src/pages/index.tsx @@ -40,7 +40,7 @@ const Home: React.FC = (props) => { - + {/* */}