diff --git a/package.json b/package.json index e448f3c03..cfa8ad5bd 100644 --- a/package.json +++ b/package.json @@ -204,7 +204,7 @@ "eslintConfig": { "extends": "react-app" }, - "proxy": "http://172.20.32.203:4000/", + "proxy": "https://testforgeplus.trustie.net/", "port": "3007", "devDependencies": { "@babel/core": "^7.23.6", diff --git a/src/App.js b/src/App.js index 7fab316f0..6b2be3e42 100644 --- a/src/App.js +++ b/src/App.js @@ -734,7 +734,7 @@ class App extends Component { ( - + ) } /> diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx index 19ebc7b7b..a45d71f10 100644 --- a/src/forge/Main/sub/DetailBanner.jsx +++ b/src/forge/Main/sub/DetailBanner.jsx @@ -70,7 +70,16 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur } - {/* { + { + owner === "gh_mirrors" && item.menu_name === "issues" && +
  • + + + 供应链 + +
  • + } + { owner === "gh_mirrors" && item.menu_name === "issues" &&
  • @@ -81,8 +90,8 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur {projectDetail && projectDetail.issues_count ? {numFormat(projectDetail.issues_count)} : ""}
  • - } */} - {/* { + } + { item.menu_name === "pulls" && projectDetail && parseInt(projectDetail.type) !== 2 && platform ?
  • @@ -91,7 +100,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur {projectDetail && projectDetail.pull_requests_count ? {numFormat(projectDetail.pull_requests_count)} : ""}
  • :"" - } */} + } {/* 引擎仅对当前仓库管理员可见 */} {/* { item.menu_name === "devops" ? @@ -123,7 +132,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur } */} - {/* { + { item.menu_name === "versions" &&
  • @@ -132,8 +141,8 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur {projectDetail && projectDetail.versions_count ? {numFormat(projectDetail.versions_count)} :""}
  • - } */} - {/* { + } + { item.menu_name === "wiki" &&
  • @@ -141,17 +150,8 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur 维基(Wiki)
  • - } */} - { - owner === "gh_mirrors" && item.menu_name === "issues" && -
  • - - - 供应链 - -
  • } - {/* { + { item.menu_name === "activity" &&
  • @@ -159,7 +159,7 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur 动态
  • - } */} + } { item.menu_name === "settings" && platform &&
  • diff --git a/src/forums/image/img1.png b/src/forums/image/img1.png new file mode 100644 index 000000000..903753a9f Binary files /dev/null and b/src/forums/image/img1.png differ diff --git a/src/forums/image/img2.png b/src/forums/image/img2.png new file mode 100644 index 000000000..b2c99a998 Binary files /dev/null and b/src/forums/image/img2.png differ diff --git a/src/forums/image/img3.png b/src/forums/image/img3.png new file mode 100644 index 000000000..a40ef77f9 Binary files /dev/null and b/src/forums/image/img3.png differ diff --git a/src/forums/image/img4.png b/src/forums/image/img4.png new file mode 100644 index 000000000..1898d7143 Binary files /dev/null and b/src/forums/image/img4.png differ diff --git a/src/forums/list/index.jsx b/src/forums/list/index.jsx index b80cd9227..5235667e1 100644 --- a/src/forums/list/index.jsx +++ b/src/forums/list/index.jsx @@ -7,6 +7,10 @@ import { Link } from "react-router-dom"; import icon5 from '../image/icon5.png'; import icon6 from '../image/icon6.png'; import icon10 from '../image/icon10.png'; +import img1 from '../image/img1.png'; +import img2 from '../image/img2.png'; +import img3 from '../image/img3.png'; +import img4 from '../image/img4.png'; import Nodata from "../../forge/Nodata"; import { forumSectionId } from "../static"; import { rollingButton } from "../../components/button"; @@ -42,6 +46,12 @@ function List(props) { 1: require('../image/icon3.png'), 2: require('../image/icon4.png'), } + const forumsImg = { + 0: img1, + 1: img2, + 2: img3, + 3: img4 + } function init(updatedTags){ const tagByState = updatedTags.filter(i=>i.title.includes(tagNameByState)) @@ -73,57 +83,59 @@ function List(props) { if (res && res.recommend_forum_sections) { // 获取所有子板块 const childrenTags = res.recommend_forum_sections; + setForumTag(childrenTags); + init(childrenTags) // 并发请求所有板块的精华帖子 - const fetchEssencePosts = async (tag) => { - try { - const essenceRes = await getForumsById(tag.id, { - page: 1, - limit: 1, - sort: 'published_at', - select_type: 'is_fine', - }); + // const fetchEssencePosts = async (tag) => { + // try { + // const essenceRes = await getForumsById(tag.id, { + // page: 1, + // limit: 1, + // sort: 'published_at', + // select_type: 'is_fine', + // }); - return { - ...tag, - essencePosts: essenceRes?.memos || [] - }; - } catch (err) { - return { - ...tag, - essencePosts: [] - }; - } - }; + // return { + // ...tag, + // essencePosts: essenceRes?.memos || [] + // }; + // } catch (err) { + // return { + // ...tag, + // essencePosts: [] + // }; + // } + // }; - // 使用 Promise.all 并发处理所有请求 - Promise.all(childrenTags.map(fetchEssencePosts)) - .then(updatedTags => { - setForumTag(updatedTags); - if (updatedTags.length > 0) { - init(updatedTags) - } - }) - .catch(error => { - // 降级处理 - setForumTag(childrenTags); - if (childrenTags.length > 0) { - init(childrenTags) - } - }); + // // 使用 Promise.all 并发处理所有请求 + // Promise.all(childrenTags.map(fetchEssencePosts)) + // .then(updatedTags => { + // setForumTag(updatedTags); + // if (updatedTags.length > 0) { + // init(updatedTags) + // } + // }) + // .catch(error => { + // // 降级处理 + // setForumTag(childrenTags); + // if (childrenTags.length > 0) { + // init(childrenTags) + // } + // }); } }) }, []) useEffect(() => { if (forumTagDetail && forumTagDetail.id) { - const forums = forumTagDetail.essencePosts[0] || {} + // const forums = forumTagDetail.essencePosts[0] || {} getForumsById(forumTagDetail.id, { page: page, limit: LIMIT, sort: 'published_at', select_type: 'all', - hide_id: forums.id + // hide_id: forums.id }).then(res => { if (res) { setForumListByTag(res.memos || []); @@ -178,7 +190,7 @@ function List(props) {
    -
    精华论坛
    +
    精华论坛
    {/* 四个板块 */}
    @@ -188,9 +200,12 @@ function List(props) { return (
    {setForumTagDetail(item)}}>
    -
    {item.title}
    +
    {item.title}
    - {forums.memo_image_info && } +
    + +
    + {/* {forums.memo_image_info && }
    {forums.subject}
    @@ -207,7 +222,7 @@ function List(props) { {forums.replies_count} {forums.published_time}
    -
    +
    */}
    @@ -215,7 +230,7 @@ function List(props) { })}
    {/* 板块对应的帖子列表 */} -
    +
    {forumListByTag.map((item, index) => { const orderIndex = index+LIMIT*(page-1) return
    diff --git a/src/forums/list/index.scss b/src/forums/list/index.scss index 1dfcb2601..31534dd53 100644 --- a/src/forums/list/index.scss +++ b/src/forums/list/index.scss @@ -166,7 +166,7 @@ } .forums-list3-box { - padding: 80px 0 60px; + padding: 60px 0 60px; background-image: linear-gradient(179.88deg, #ffffff 0%, rgba(255, 255, 255, 0.62) 16.1%, rgba(255, 255, 255, 0) 100%); border-radius: 40px; position: relative; @@ -190,15 +190,25 @@ &.active{ border-color: #2149d4; &::before{ - width: 104%; - height: 104%; + width: 106%; + height: 110%; content: ''; position: absolute; background-color: rgb(33 72 212 / 20%); - top: -2%; - left: -2%; + top: -5%; + left: -3%; border-radius:15px; } + &::after{ + content: ""; + position: absolute; + top: 105%; + left: 50%; + transform: translateX(-50%); + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-top: 10px solid rgb(33 72 212 / 20%); + } } &:nth-of-type(3) .forums-section-item{ background-image:linear-gradient(90deg,#D7DEFF 0% 49.37%,#C7CFFF 100%); @@ -218,13 +228,18 @@ .memo_image_info{ width: 100%; - height: 160px; + height: auto; object-fit: cover; border-radius: 15px 15px 0 0; transition: transform .4s cubic-bezier(.25, .46, .45, .94); } + .memo_image_info_box{ + margin: 15px; + overflow: hidden; + border-radius:15px; + } .forums-section-item-content{ - background-color: white; + // background-color: white; border-radius:15px; overflow: hidden; }