diff --git a/src/forge/Main/CoderDepotReadme.jsx b/src/forge/Main/CoderDepotReadme.jsx index c1ca3ab9d..7a88377da 100644 --- a/src/forge/Main/CoderDepotReadme.jsx +++ b/src/forge/Main/CoderDepotReadme.jsx @@ -41,34 +41,37 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){ return(
- -
-
- - - - 目录 - - - - {readme.name} - +
+
+ {/* + + + 目录 + + */} + + {readme.name} + +
+ { + operate ? + ChangeFile(readme && readme.path, false)}> + + + :"" + } +
+
+ + {menu()} + + { + content && +
+
- { - operate ? - ChangeFile(readme && readme.path, false)}> - - - :"" - } -
- - { - content && -
- -
- } + } +
) } diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index 1e5e40243..4aac54687 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import React, { Component, Fragment } from "react"; import { Popconfirm , Select , Dropdown , Spin , Anchor } from "antd"; import "./list.scss"; import axios from "axios"; @@ -227,8 +227,6 @@ class CoderRootFileDetail extends Component { return( ) - }else{ - return } } @@ -303,7 +301,7 @@ class CoderRootFileDetail extends Component { />
- { + {/* { md && readOnly && @@ -311,7 +309,7 @@ class CoderRootFileDetail extends Component { 目录 - } + } */} {bytesToSize(detail && detail.size)} @@ -324,7 +322,8 @@ class CoderRootFileDetail extends Component { { !detail.direct_download? - this.DownLoadFile(detail.download_url)} className="ml20"> + {/* onClick={() => this.DownLoadFile(detail.download_url)} */} + { @@ -383,14 +382,14 @@ class CoderRootFileDetail extends Component { )}

-
+
{detail.image_type ? (
) : detail.direct_download ? (
- this.DownLoadFile(detail.download_url)} className="color-blue font-15"> + 下载原始文件 { @@ -400,24 +399,36 @@ class CoderRootFileDetail extends Component { }
) : ( - md && readOnly ? -
- + md && readOnly ? +
+ + {this.menu()} + +
+ +
+
: - - )} + +
+ +
+ +
+ )}
); diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index b894b6484..80ea8f306 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -339,6 +339,16 @@ .listtablebody{ border-radius:0px 0px 4px 4px ; border: 1px solid #D0D0D0; + .ant-affix{ + z-index: 8; + } + .readmeMenu{ + width: 300px; + padding: 20px 10px; + .ant-anchor-link{ + padding: 8px 10px 8px 0px; + } + } li{ a{ color: #05101a; @@ -577,4 +587,14 @@ img{ margin-bottom: 35px; } +} +.mdFileBox{ + display: flex; + &>div>div, & .ant-anchor-wrapper, & .ant-anchor, & .readmeMenu{ + height: 100%; + } + .mdFile{ + padding: 20px; + border-left: 1px solid #D0D0D0; + } } \ No newline at end of file diff --git a/src/forge/Main/list.scss b/src/forge/Main/list.scss index b040add95..58c122d28 100644 --- a/src/forge/Main/list.scss +++ b/src/forge/Main/list.scss @@ -324,6 +324,8 @@ } .files-md{ padding:20px; + flex: 1; + width: 0; h1,h2, h3, h4, h5, h6{ margin-bottom: .5em !important; } @@ -618,11 +620,26 @@ } .readBox{ border:none; + .ant-affix{ + z-index: 8; + } + .readmeMenu{ + width: 240px; + padding: 20px 10px; + border:1px solid #D0D0D0; + border-top: none; + border-right: none; + .ant-anchor-link{ + padding: 8px 10px 8px 0px; + } + } &.commonBox .commonBox-info{ border:1px solid #D0D0D0; border-top: none; - border-radius: 0px 0px 4px 4px; - padding:20px 38px; + border-radius: 0px 0px 4px 0px; + padding:20px 18px; + flex: 1; + width: 0; } } .commonBox .commonBox-title.boxTitle{ diff --git a/src/forge/Main/sub/ReadmeCatelogue.jsx b/src/forge/Main/sub/ReadmeCatelogue.jsx index c84bae112..571512466 100644 --- a/src/forge/Main/sub/ReadmeCatelogue.jsx +++ b/src/forge/Main/sub/ReadmeCatelogue.jsx @@ -24,8 +24,8 @@ function ReadmeCatelogue({ menuList , hash }) { } } return( -
-
+
+
{ return( -
+
) diff --git a/src/forge/Wiki/page/preview.jsx b/src/forge/Wiki/page/preview.jsx index a41d43003..5d0dd43a6 100644 --- a/src/forge/Wiki/page/preview.jsx +++ b/src/forge/Wiki/page/preview.jsx @@ -54,10 +54,11 @@ export default (props) => { useEffect(() => { document.title = `${checkItem && checkItem.titleStr || wikiBySearch}-维基预览` + if(!(str || checkItem.title_sub)) return const func = sha ? getPreviousWiki : getWiki func({ ...wikiParams, - pageName: str, + pageName: str || checkItem.title_sub, sha }).then(res => { if(res && res.code === 200){