From 758600e4d008330d3774576d38cdc982fe301223 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 3 Dec 2021 10:47:47 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E9=A1=B5=E7=BF=BB?= =?UTF-8?q?=E9=A1=B5=E8=B7=9D=E7=A6=BB=E5=BA=95=E9=83=A8=E7=9A=84=E8=B7=9D?= =?UTF-8?q?=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Head/Header.js | 78 ------------------------------------ src/modules/search/index.jsx | 13 +++--- 2 files changed, 6 insertions(+), 85 deletions(-) diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index 4eb52b00..28b20640 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -17,7 +17,6 @@ import './header.scss'; import NoticeContent from './NoticeContent'; import MainLogo from './img/logo.png'; // TODO 这部分脚本从公共脚本中直接调用 -let old_url; window._header_componentHandler = null; // 非trustie链接则新开页跳转 @@ -279,82 +278,6 @@ class NewHeader extends Component { settings, visible, } = this.state; - /*用户名称 用户头像url*/ - // let activeIndex = false; - // let activeForums = false; - // let activeShixuns = false; - // let activePaths = false; - // let coursestype = false; - // let activePackages = false; - // let activeMoopCases = false; - // let activeCompetitions = false; - - // if (match.path === '/forums') { - // activeForums = true; - // } else if (match.path.startsWith('/shixuns')) { - // activeShixuns = true; - // } else if (match.path.startsWith('/paths')) { - // activePaths = true; - // } else if (match.path.startsWith('/courses')) { - // coursestype = true; - // } else if (match.path.startsWith('/crowdsourcing')) { - // activePackages = true; - // } else if (match.path.startsWith('/moop_cases')) { - // activeMoopCases = true; - // } else if (match.path.startsWith('/competitions')) { - // activeCompetitions = true; - // } else { - // activeIndex = true; - // } - - // let headtypes = '/'; - // if (settings) { - // if (settings.navbar) { - // if (settings.navbar.length > 0) { - // if (match.path === '/') { - // if (headtypesonClickbool === false) { - // headtypes = undefined; - // } else { - // headtypes = headtypess; - // } - // } else { - // for (var i = 0; i < settings.navbar.length; i++) { - // if (match.path === settings.navbar[i].link) { - // headtypes = settings.navbar[i].link; - // break; - // } - // } - // } - // } - // } - // } - // let shixuntype = false; - // let pathstype = false; - // let coursestypes = false; - // if (this.props && this.props.mygetHelmetapi != null) { - // let shixun = "/shixuns"; - // let paths = "/paths"; - // let courses = "/courses"; - // this.props.mygetHelmetapi && this.props.mygetHelmetapi.navbar && this.props.mygetHelmetapi.navbar.map((item, key) => { - // var reg = RegExp(item.link); - // if (shixun.match(reg)) { - // if (item.hidden === true) { - // shixuntype = true - // } - // } - // if (paths.match(reg)) { - // if (item.hidden === true) { - // pathstype = true - // } - // } - // if (courses.match(reg)) { - // if (item.hidden === true) { - // coursestypes = true - // } - // } - // }) - // } - let search_url = settings && settings.common && settings.common.search; return (
开发语言
- {truncateCommitId(`${item.sha}`)}
+ {
+ platform ?
+ {truncateCommitId(`${item.sha}`)}
+ :
+ {truncateCommitId(`${item.sha}`)}
+ }