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}