diff --git a/src/animations.scss b/src/animations.scss
index a7ac1c8ee..b569c8c00 100644
--- a/src/animations.scss
+++ b/src/animations.scss
@@ -4,7 +4,7 @@
}
to {
- top: 0
+ top: var(--top, 0px)
}
}
diff --git a/src/components/button/index.jsx b/src/components/button/index.jsx
index eccfcd7bf..16c36fc6a 100644
--- a/src/components/button/index.jsx
+++ b/src/components/button/index.jsx
@@ -4,16 +4,16 @@ import arrowIcon from '../../images/icon_arrow.png'
import './index.scss';
// 鼠标悬停箭头往右上角走的效果
-export const slidingArrowButton = ({href="/", name="探索更多内容", classname="font-16 font-bd", imageSrc}) =>{
- return
+export const slidingArrowButton = ({href="/", name="探索更多内容", classname="font-16 font-bd", imageSrc, target="_self"}) =>{
+ return
{name}
}
// 鼠标悬停文本往上翻滚,再加背景光从左往右
-export const rollingButton = ({href="/", name="了解更多", hoverName="了解更多", classname="mt20"}) =>{
- return
+export const rollingButton = ({href="/", name="了解更多", hoverName="了解更多", classname="mt20", target="_self"}) =>{
+ return
{name}
{hoverName}
diff --git a/src/forge/Images/loading.gif b/src/forge/Images/loading.gif
new file mode 100644
index 000000000..c287abcf1
Binary files /dev/null and b/src/forge/Images/loading.gif differ
diff --git a/src/forge/Main/projecthome/v2/components/banner.jsx b/src/forge/Main/projecthome/v2/components/banner.jsx
index 5ee47f12a..a3dd59720 100644
--- a/src/forge/Main/projecthome/v2/components/banner.jsx
+++ b/src/forge/Main/projecthome/v2/components/banner.jsx
@@ -9,6 +9,7 @@ import './index.scss';
function Banner({isVisible}) {
const [active, setActive] = useState(0);
const [active1, setActive1] = useState(0);
+ const [intervalId, setIntervalId] = useState(null);
const lines1 = [
'if(!isVisible)',
@@ -77,6 +78,7 @@ function Banner({isVisible}) {
});
}, 400);
}, 3000);
+ setIntervalId(interval);
// 清理定时器
return () => {
@@ -84,6 +86,29 @@ function Banner({isVisible}) {
};
}, []);
+ const pauseInterval = () => {
+ if (intervalId) {
+ clearInterval(intervalId);
+ setIntervalId(null);
+ }
+ };
+
+ const resumeInterval = () => {
+ if (!intervalId) {
+ const interval = setInterval(() => {
+ setActive(prevActive => {
+ return prevActive < 3 ? prevActive+1 : 0;
+ });
+ setTimeout(() => {
+ setActive1(prevActive => {
+ return prevActive < 3 ? prevActive+1 : 0;
+ });
+ }, 400);
+ }, 3000);
+ setIntervalId(interval);
+ }
+ };
+
return (
{/* 主要内容区域 */}
@@ -114,22 +139,24 @@ function Banner({isVisible}) {
{/*
*/}
-
+
{bannerList[active].desc1}
{/* 四张banner轮播 */}
{bannerList.map((item, index) => {
- return
{item.title}
+ return
{
+ setActive(index);
+ setTimeout(() => {
+ setActive1(index);
+ }, 200);
+ }}>{item.title}
})}
{bannerList[active].desc}

- {/*
*/}
diff --git a/src/forge/Main/projecthome/v2/components/communityDynamic.jsx b/src/forge/Main/projecthome/v2/components/communityDynamic.jsx
index e5f4f4e45..5ad8a6bc2 100644
--- a/src/forge/Main/projecthome/v2/components/communityDynamic.jsx
+++ b/src/forge/Main/projecthome/v2/components/communityDynamic.jsx
@@ -58,7 +58,7 @@ const CommunityDynamic = ({isVisible}) => {
{firstByList1.summary}
- {rollingButton({href: `/news/${firstByList1.id}`})}
+ {rollingButton({href: `/news/${firstByList1.id}`, target:"_blank"})}
{/* 新闻列表 */}
@@ -66,7 +66,7 @@ const CommunityDynamic = ({isVisible}) => {
{list1.slice(1,5).map((item, index) => (
-
+
{item.name}
@@ -90,7 +90,7 @@ const CommunityDynamic = ({isVisible}) => {
{list2_home.map((item, index) => (
- {item.summary}
+ {item.summary}
{index === 1 && HOT}
{/* {moment(item.publishTime).format('MM月DD日')} */}
@@ -126,7 +126,7 @@ const CommunityDynamic = ({isVisible}) => {
- {slidingArrowButton({ href: '/news' })}
+ {slidingArrowButton({ href: '/news', target: "_blank" })}
);
diff --git a/src/forge/Main/projecthome/v2/components/forum.jsx b/src/forge/Main/projecthome/v2/components/forum.jsx
index 5bd67288d..611ea79b3 100644
--- a/src/forge/Main/projecthome/v2/components/forum.jsx
+++ b/src/forge/Main/projecthome/v2/components/forum.jsx
@@ -86,7 +86,7 @@ const ForumExchange = () => {
))}
- {slidingArrowButton({href:"/forums", classname:"font-16 font-bd color-white", imageSrc: icon_arrow1})}
+ {slidingArrowButton({href:"/forums", classname:"font-16 font-bd color-white", imageSrc: icon_arrow1, target: "_blank"})}
diff --git a/src/forge/Main/projecthome/v2/components/openSourceCollaboration.jsx b/src/forge/Main/projecthome/v2/components/openSourceCollaboration.jsx
index b74e92d94..a3aba64d1 100644
--- a/src/forge/Main/projecthome/v2/components/openSourceCollaboration.jsx
+++ b/src/forge/Main/projecthome/v2/components/openSourceCollaboration.jsx
@@ -70,7 +70,7 @@ const OpenSourceCollaboration = ({isVisible}) => {
))}
- {rollingButton({href: `/projects`, classname: 'mt10 white'})}
+ {rollingButton({href: `/projects`, classname: 'mt10 white', target:"_blank"})}
diff --git a/src/forge/Main/projecthome/v2/components/project.jsx b/src/forge/Main/projecthome/v2/components/project.jsx
index 605cc5ba8..c35351eb3 100644
--- a/src/forge/Main/projecthome/v2/components/project.jsx
+++ b/src/forge/Main/projecthome/v2/components/project.jsx
@@ -43,14 +43,21 @@ const RepositoryV2 = () => {
{/* 导航标签 */}
-
- {tabs.map((tab) => (
-
-

-
{tab.label}
-
- ))}
+
+
+
菌用开源资源可信服务平台
+ 菌用开源软件仓库是国防领域专业化开源服务平台,聚焦可信引入、安全存储、可控访问、高效分发核心能力,
遵循菌用标准,为菌用软件研发提供合规、安全、高效的开源资源支撑
+
+
+ {tabs.map((tab) => (
+
+

+
{tab.label}
+
+ ))}
+
+
{/* 主要内容区域 */}
@@ -75,7 +82,7 @@ const RepositoryV2 = () => {
))}
- {rollingButton({href: `/explore`})}
+ {rollingButton({href: `/explore`, target:"_blank"})}
{/* 右侧架构图 - 使用图片 */}
diff --git a/src/forge/Main/projecthome/v2/components/softwareFactory.jsx b/src/forge/Main/projecthome/v2/components/softwareFactory.jsx
index 7689bf4d3..a60a40cc3 100644
--- a/src/forge/Main/projecthome/v2/components/softwareFactory.jsx
+++ b/src/forge/Main/projecthome/v2/components/softwareFactory.jsx
@@ -41,7 +41,7 @@ function SoftwareFactory() {
极速模式聚焦任务 - 代码 - 制品,助力软件研发快速响应、
实现极致效率
- {rollingButton({href: `/sf`, classname: 'mt70'})}
+ {rollingButton({href: `/sf`, classname: 'mt70', target:"_blank"})}

diff --git a/src/forge/Main/projecthome/v2/components/supplyChainGovernance.jsx b/src/forge/Main/projecthome/v2/components/supplyChainGovernance.jsx
index db2b2f2f1..12d17d787 100644
--- a/src/forge/Main/projecthome/v2/components/supplyChainGovernance.jsx
+++ b/src/forge/Main/projecthome/v2/components/supplyChainGovernance.jsx
@@ -81,7 +81,7 @@ const SupplyChainGovernance = () => {
- {slidingArrowButton({href:"/governance"})}
+ {slidingArrowButton({href:"/governance", target: "_blank"})}
);
diff --git a/src/forge/Main/projecthome/v2/components/terminalAnimation2.jsx b/src/forge/Main/projecthome/v2/components/terminalAnimation2.jsx
index 54964645c..81b52992e 100644
--- a/src/forge/Main/projecthome/v2/components/terminalAnimation2.jsx
+++ b/src/forge/Main/projecthome/v2/components/terminalAnimation2.jsx
@@ -10,18 +10,11 @@ const TerminalAnimation = ({ startAnimation = true, lines, width, height, class_
const animationRef = useRef(null);
const keyColor = {
- 'git clone': '#fff700',
- 'git commit': '#fff700',
- 'git log': '#fff700',
- 'git merge': '#fff700',
- 'git remote': '#fff700',
- 'git pull': '#d24a6f',
- 'git push': '#d24a6f',
- 'git status': '#2977ff',
- 'git fetch': '#2977ff',
- 'git add': '#9aff41',
- 'cd forgeplus': '#9aff41',
- 'git checkout': '#9aff41'
+ 'if(!isVisible)': '#e5caff6a',
+ 'setInterval': '#e5caff6a',
+ 'clearInterval': '#e5caff6a',
+ 'const params': '#e5caff6a',
+ 'addComment': '#e5caff6a'
};
const fontSize = 12;
diff --git a/src/forge/Main/projecthome/v2/index.scss b/src/forge/Main/projecthome/v2/index.scss
index 801ce1e1b..76bbd81c1 100644
--- a/src/forge/Main/projecthome/v2/index.scss
+++ b/src/forge/Main/projecthome/v2/index.scss
@@ -496,13 +496,18 @@
.nav-tabs-v2 {
display: flex;
justify-content: center;
- gap: 60px;
- margin-bottom: 50px;
+ flex-wrap: wrap;
+ gap: 20px;
+ width: 710px;
.tab-item-v2 {
- padding: 9px 35px;
- background-color: #f6f7fa;
- border-radius: 27px;
+ width:223px;
+ height:74px;
+ background-color:#f6f7fa;
+ border-radius:10px;
+ text-align: center;
+ line-height: 74px;
+
// transition: all 0.3s ease;
// &.active {
// background-color: #091221;
@@ -541,7 +546,7 @@
}
.supply-chain-governance {
- padding: 30px 20px 50px;
+ padding: 70px 20px 50px;
.governance-grid {
display: flex;
diff --git a/src/forge/Server/sbom/index.jsx b/src/forge/Server/sbom/index.jsx
index 23232d657..ba28e905d 100644
--- a/src/forge/Server/sbom/index.jsx
+++ b/src/forge/Server/sbom/index.jsx
@@ -1,49 +1,24 @@
-import React, { useEffect } from "react";
+import React, { useEffect, useState } from "react";
+import loadingGIf from "../../Images/loading.gif";
function Sbom(props) {
const {mygetHelmetapi, current_user} = props;
const {common} = mygetHelmetapi || {};
const {governance="http://172.16.6.252:10010"} = common || {};
const {user_id} = current_user || {}
+ const [loading, setLoading] = useState(true);
const { projectsId, owner } = props.match.params;
const str = projectsId.replace(/\./g, "_")
// const url = `http://localhost:3007/gagaga/accepts_1.3.8/sbom`
const url = `${governance}/governancePortal/sbom/${str}?uid=${user_id}`
- // useEffect(() => {
- // window.addEventListener("message", iframeHeight, false);
- // return () => {
- // window.removeEventListener("message", iframeHeight, false);
- // }
- // })
-
- // function iframeHeight(e) {
- // try {
- // if (e && e.data && typeof (e.data) === "string") {
- // let myHeight = JSON.parse(e.data);
- // if (document.querySelector("#sbomIframe")) {
- // document.querySelector("#sbomIframe").height = myHeight.height;
- // }
- // }
- // } catch (error) {
- // console.error(err);
- // }
- // }
-
- // function iframeLoad() {
- // try {
- // let myIframe = document.getElementById("sbomIframe");
- // if (myIframe.contentDocument) {
- // myIframe.height = myIframe.contentDocument.querySelector('.jyh-card').clientHeight + 260;
- // }
- // } catch (err) {
- // console.error(err);
- // }
- // }
-
- return
-
+ return
+ {loading &&
+

+
加载中,请耐心等待
+
}
+
}
diff --git a/src/forge/governanceIframe.jsx b/src/forge/governanceIframe.jsx
index 833ad1d80..ad81af470 100644
--- a/src/forge/governanceIframe.jsx
+++ b/src/forge/governanceIframe.jsx
@@ -1,10 +1,13 @@
-import React, { useEffect } from "react";
+import React, { useEffect, useState } from "react";
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
+import loadingGIf from "./Images/loading.gif";
function Sbom(props) {
const {current_user, mygetHelmetapi} = props;
const {admin, user_id} = current_user || {}
const {common} = mygetHelmetapi || {};
const {governance="http://172.16.6.252:10010"} = common || {};
+ const [loading, setLoading] = useState(true);
+
useEffect(()=>{
document.title = '供应链监测预警平台';
}, [])
@@ -13,7 +16,11 @@ function Sbom(props) {
// const url = "http://localhost:3007/"
return
-
+ {loading &&
+

+
加载中,请耐心等待
+
}
+
}
diff --git a/src/forge/projectHome/explore/index.jsx b/src/forge/projectHome/explore/index.jsx
index 37a3fc14c..65db83625 100644
--- a/src/forge/projectHome/explore/index.jsx
+++ b/src/forge/projectHome/explore/index.jsx
@@ -246,7 +246,7 @@ function ProjectHomePage(props) {
{projectsList && !!projectsList.length ?
{projectsList.map(i => {
- const url = i.author ? `/${i.author.login}/${i.identifier}${i.author.login === "gh_mirrors" ? "/about" : "/about"}` : ``
+ const url = i.author ? `/${i.author.login}/${i.identifier}` : ``
return
{i.lesson_url &&
})
}
diff --git a/src/forge/projectHome/projectList/index.jsx b/src/forge/projectHome/projectList/index.jsx
index 505b60970..443365e96 100644
--- a/src/forge/projectHome/projectList/index.jsx
+++ b/src/forge/projectHome/projectList/index.jsx
@@ -108,7 +108,7 @@ function ProjectList() {
开源协作·共建生态
- {setSearchValue(e.target.value)}} suffix={{setSearch(searchValue)}}>
+ {setSearchValue(e.target.value)}} suffix={{setSearch(searchValue)}}>
} onSearch={(value)=>{
setSearch(value)
@@ -254,7 +254,7 @@ function ProjectList() {
{projectsListByHot.map(project => {
- return
+ return {project.name}} key={project.id}>
{project.description || '暂无数据'}
})}
diff --git a/src/news/detail/index.jsx b/src/news/detail/index.jsx
index 5c8d93efb..61f50eff9 100644
--- a/src/news/detail/index.jsx
+++ b/src/news/detail/index.jsx
@@ -14,6 +14,7 @@ function detail(props) {
const [detail, setDetail] = useState({});
const [list1, setList1] = useState([]);
const [commentReload, setCommentReload] = useState(undefined);
+ const dirId = detail.cmsDir && detail.cmsDir.id;
useEffect(() => {
id && getNewsDetail(id).then(res => {
@@ -42,19 +43,19 @@ function detail(props) {
新闻资讯
-
关注社区最新动态,了解XXX最新成果
+
锁定新闻资讯,关注社区最新动态
社区动态
- {detail.name}
+ {dirId === 34 ? detail.summary : detail.name}
{/* 正文 */}
- {detail.name}
+ {dirId === 34 ? detail.summary : detail.name}

@@ -85,7 +86,7 @@ function detail(props) {
{index + 1}
-
{item.name}
+
{dirId === 34 ? item.summary : item.name}
{index === 0 &&
new}