From 8ec860eec8efccc40b00c58836af9e344f301fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Thu, 8 Jan 2026 17:32:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=8F=88=E8=A6=81=E7=BB=A7?= =?UTF-8?q?=E7=BB=AD=E6=94=AF=E6=8C=81=E8=B7=B3=E8=BD=AC=E6=85=95=E8=AF=BE?= =?UTF-8?q?=E3=80=81=E7=A7=BB=E9=99=A4ssh=E3=80=81=E6=8B=BC=E6=8E=A5clone?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E3=80=81=E9=A6=96=E9=A1=B5=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/factory/components/Resource2/index.jsx | 4 ++- src/factory/components/Resource2/index.scss | 8 ++++- src/factory/lessons/detail/index.jsx | 32 ++++++++++++-------- src/factory/lessons/detail/index.scss | 9 ++++++ src/factory/lessons/index.scss | 2 +- src/forge/Branch/CloneAddress.js | 33 ++++++++++++++++----- 6 files changed, 64 insertions(+), 24 deletions(-) diff --git a/src/factory/components/Resource2/index.jsx b/src/factory/components/Resource2/index.jsx index dabc535bf..e51655148 100644 --- a/src/factory/components/Resource2/index.jsx +++ b/src/factory/components/Resource2/index.jsx @@ -130,7 +130,9 @@ const Resource2 = forwardRef(({ zoneId }, ref) => {

{item.name}

{item.summary}

- + + +
}) diff --git a/src/factory/components/Resource2/index.scss b/src/factory/components/Resource2/index.scss index c9c89b79b..994f00627 100644 --- a/src/factory/components/Resource2/index.scss +++ b/src/factory/components/Resource2/index.scss @@ -102,6 +102,10 @@ font-weight: 700; color: #091221; font-size: 22px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding-right: 30px; } p { @@ -111,6 +115,9 @@ overflow: hidden; color: #091221; } + a { + margin-top: auto; + } button { cursor: pointer; @@ -125,7 +132,6 @@ color: #091221; font-size: 14px; text-align: center; - margin-top: auto; // background: #ffffff !important; background-image: linear-gradient(#ffffff, #ffffff); diff --git a/src/factory/lessons/detail/index.jsx b/src/factory/lessons/detail/index.jsx index b958b641f..003d96361 100644 --- a/src/factory/lessons/detail/index.jsx +++ b/src/factory/lessons/detail/index.jsx @@ -62,23 +62,29 @@ function Index(props) {

{detail.summary}

{ detail.keywords === docId && - + } { - detail.url && - } + { + detail.keywords !== docId && detail.url2 && + + } + +
@@ -96,7 +102,7 @@ function Index(props) { } { detail.url &&
- +
}
diff --git a/src/factory/lessons/detail/index.scss b/src/factory/lessons/detail/index.scss index 89376b792..8a157cb7d 100644 --- a/src/factory/lessons/detail/index.scss +++ b/src/factory/lessons/detail/index.scss @@ -128,6 +128,15 @@ text-align: center; background-color: #091221; } + .button2 { + margin-left: 20px; + border: 1px solid #091221; + font-family: alibaba; + font-weight: 500; + color: #091221; + font-size: 14px; + background-color: unset; + } h6 { margin-top: 34px; diff --git a/src/factory/lessons/index.scss b/src/factory/lessons/index.scss index bb6151d2d..32e53837f 100644 --- a/src/factory/lessons/index.scss +++ b/src/factory/lessons/index.scss @@ -148,7 +148,7 @@ text-overflow: ellipsis; overflow: hidden; padding-right: 30px; - + width: 600px; } &::before { diff --git a/src/forge/Branch/CloneAddress.js b/src/forge/Branch/CloneAddress.js index b3e31cccb..f2ee94bea 100644 --- a/src/forge/Branch/CloneAddress.js +++ b/src/forge/Branch/CloneAddress.js @@ -1,24 +1,41 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { Menu } from 'antd'; import "./branch.scss"; import CopyTool from '../Component/CopyTool'; -function CloneAddress({http_url , ssh_url , zip_url , tar_url}) { - const [ key , setKey ] = useState("HTTP"); +function CloneAddress({ http_url, ssh_url, zip_url, tar_url }) { + const [key, setKey] = useState("HTTP"); + const [cloneUrl, setCloneUrl] = useState(""); + + useEffect(() => { + if (!http_url) { + setCloneUrl(''); + return; + } + + const match = http_url.match(/:3000\/(.+)/); + + if (match && match[1]) { + const path = match[1]; + setCloneUrl(`${window.location.hostname}:3000/${path}`); + } else { + setCloneUrl(http_url); + } + }, [http_url]); return (
- {setKey(e.key)}}>HTTP - {ssh_url && {setKey(e.key)}}>SSH} + { setKey(e.key) }}>HTTP + {/* {ssh_url && {setKey(e.key)}}>SSH} */}
- - + +
- {zip_url && 下载 ZIP} + {zip_url && 下载 ZIP} {tar_url && 下载 TAR.GZ}