diff --git a/public/css/edu-main.css b/public/css/edu-main.css index 1d9959033..220057e13 100644 --- a/public/css/edu-main.css +++ b/public/css/edu-main.css @@ -3268,6 +3268,7 @@ a.user_greybg_btn { .markdown-body ul>li { list-style-type: disc !important; margin-bottom: 0 !important; + } .new_li .markdown-body ol>li, diff --git a/src/forge/Newfile/cloudIDE.jsx b/src/forge/Newfile/cloudIDE.jsx index 00fa2b54c..33457e109 100644 --- a/src/forge/Newfile/cloudIDE.jsx +++ b/src/forge/Newfile/cloudIDE.jsx @@ -16,7 +16,7 @@ import IDEPlugin, { ExtensionCommand } from './plugins/idePlugin'; import { repoService } from './codeReview/mock/repo.service'; -function CloudIDE({ download_url, params: { owner, projectsId, branchName }, filepath }) { +function CloudIDE({ download_url, params: { owner, projectsId, branchName }, filepath , value }) { function FileContentStore() { const [loading, setLoading] = useState(true); const [showIde, setShowIde] = useState(false); @@ -35,8 +35,7 @@ function CloudIDE({ download_url, params: { owner, projectsId, branchName }, fil }; } - const { fileSize, fileName } = - FileContentStore(); + const { fileSize, fileName } = FileContentStore(); const fileCache = new Map(); const copyFile = () => { @@ -92,12 +91,11 @@ function CloudIDE({ download_url, params: { owner, projectsId, branchName }, fil // blame const onBlame = async (e) => { setBlameChecked(e.target.checked); - console.log('onBlame:', e.target.checked); - if (!e.target.checked) { - plugin.current.commands.executeCommand(ExtensionCommand.toggleBlame); + if (!e.target.checked ) { + plugin.current.commands && plugin.current.commands.executeCommand(ExtensionCommand.toggleBlame); } else { const res = await repoService.getCodeBlame(projectsId, owner, { sha:decodeURIComponent(branchName), filepath }) - plugin.current.commands.executeCommand(ExtensionCommand.toggleBlame, res); + plugin.current.commands && plugin.current.commands.executeCommand(ExtensionCommand.toggleBlame, res); } }; const [wordWrap, setWordWrap] = useState(false); @@ -194,89 +192,92 @@ function CloudIDE({ download_url, params: { owner, projectsId, branchName }, fil wordWrap={wordWrap} setWordWrap={onWordWrapChange} /> */} - - - { - if (!filepath) { - return; - } - // 请求接口 - // const res = await fetch('https://gist.githubusercontent.com/gaearon/0b180827c190fe4fd98b4c7f570ea4a8/raw/b9157ce933c79a4559d2aa9ff3372668cce48de7/LikeButton.js'); - const res = await fetch(`${getUrl()}/attachments/entries/get_file?download_url=${download_url}`); - setTimeout(()=>{ - onWordWrapChange(localStorage.getItem('code.file.viewer.worlWrap') === 'on'); - },5000) - return res.arrayBuffer(); - }, - // 文件编码,和标准工作空间支持编码类型一致,简单场景只传 utf8 或 gbk 即可 - // encoding: 'utf8', - encoding, - onFilepathChange: (changedFilepath) => { - if (changedFilepath) { - console.log(`路由跳转到 ${changedFilepath}`) - } - }, - // 指定当前选中多少行 - // lineNumber: [0, 1], - onLineNumberChange: line => { - if (typeof line === 'number') { - console.log(`#L${line}`) - } else { - console.log(`#L${line[0]}-${line[1]}`) - } - }, - }} - /> + { + value ? + { + if (!filepath) { + return; + } + // 请求接口 + // const res = await fetch('https://gist.githubusercontent.com/gaearon/0b180827c190fe4fd98b4c7f570ea4a8/raw/b9157ce933c79a4559d2aa9ff3372668cce48de7/LikeButton.js'); + const res = await fetch(`${getUrl()}/attachments/entries/get_file?download_url=${download_url}`); + setTimeout(()=>{ + onWordWrapChange(localStorage.getItem('code.file.viewer.worlWrap') === 'on'); + },5000) + return res.arrayBuffer(); + }, + // 文件编码,和标准工作空间支持编码类型一致,简单场景只传 utf8 或 gbk 即可 + // encoding: 'utf8', + encoding, + onFilepathChange: (changedFilepath) => { + if (changedFilepath) { + console.log(`路由跳转到 ${changedFilepath}`) + } + }, + // 指定当前选中多少行 + // lineNumber: [0, 1], + onLineNumberChange: line => { + if (typeof line === 'number') { + console.log(`#L${line}`) + } else { + console.log(`#L${line[0]}-${line[1]}`) + } + }, + }} + />: +
空文件
+ } + ) } diff --git a/src/forge/Newfile/m_editor.js b/src/forge/Newfile/m_editor.js index bfd5d7be3..125d7c362 100644 --- a/src/forge/Newfile/m_editor.js +++ b/src/forge/Newfile/m_editor.js @@ -34,6 +34,7 @@ class m_editor extends Component { render() { const { editorValue, changeValue } = this.state; + console.log("editorValue:",editorValue) const { readOnly, editorType,onEmpty,filename,empty, currentBranch, descName, checkName, detail, match: { params },filepath,ideTheme } = this.props; const editor_options = { lineNumbers: "on", @@ -68,7 +69,7 @@ class m_editor extends Component { options={editor_options} onChange={this.changeEditor} /> : - + } {!readOnly && ( diff --git a/src/forge/Team/Index.scss b/src/forge/Team/Index.scss index 789197fcb..5b21e05d7 100644 --- a/src/forge/Team/Index.scss +++ b/src/forge/Team/Index.scss @@ -101,22 +101,22 @@ width: 72%; margin-bottom: 30px; padding:30px; - .newstatus{ + .teamnewstatus{ padding-bottom: 20px; border-bottom: 1px dashed rgba(170, 175, 190, 1); - .desc{ + .teamdesc{ color:#4c5876; font-size:14px; line-height:26px; } - .title{ + .teamtitle{ height:22px; line-height:22px; color:#1f2329; font-size:16px; margin:20px auto 14px!important; } - .name{ + .teamname{ height:24px; span{ font-weight:700; @@ -130,7 +130,6 @@ } } .sepment{ - text-align: center; margin:30px auto 20px; .ant-radio-group{ .ant-radio-button-wrapper{ @@ -138,6 +137,7 @@ line-height: 42px; border:none; border:1px solid #cccfd2; + text-align: center; &:first-child{ border-right: none; } @@ -551,11 +551,14 @@ } } .overviewcontent{ - .ConcentrateTip{ - margin:20px 0px 0px 0px!important; - } .concentrateUl li{ border-color:#cddbeb!important; border-radius:4px; } + .ConcentrateTipImg{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + } } \ No newline at end of file diff --git a/src/forge/Team/List.jsx b/src/forge/Team/List.jsx index b5bb26de4..339d204aa 100644 --- a/src/forge/Team/List.jsx +++ b/src/forge/Team/List.jsx @@ -10,6 +10,7 @@ import CheckProfile from '../Component/ProfileModal/Profile'; import { Menu , Pagination , Dropdown , Spin , Tabs , Radio } from 'antd'; import ConcentrateProject from '../users/GeneralView/ConcentrateProject'; import { getImageUrl } from 'educoder'; +import EmptyImg from '../Images/nodata.png'; import axios from 'axios'; const limit = 15; @@ -123,12 +124,12 @@ function List(props){
{ organizeDetail.news_title && -
-

新闻动态

-

+

+

新闻动态

+

{organizeDetail.news_title}

-
+
{organizeDetail.news_content}
@@ -153,18 +154,24 @@ function List(props){ btn={ 自定义 } + emptyContent={ + + } typeFlag={true} userLogin={OIdentifier} type="organizations" current={organizeDetail.is_admin} /> -
-

- - 组织介绍 -

-
{organizeDetail.memo}
-
+ { + organizeDetail.memo && +
+

+ + 组织介绍 +

+
{organizeDetail.memo}
+
+ }
} { diff --git a/src/forge/Team/Setting/TeamSettingPage.jsx b/src/forge/Team/Setting/TeamSettingPage.jsx index 84463e332..b2600d16f 100644 --- a/src/forge/Team/Setting/TeamSettingPage.jsx +++ b/src/forge/Team/Setting/TeamSettingPage.jsx @@ -14,10 +14,10 @@ export default Form.create()(forwardRef((props)=>{ const [ imageUrl , setImageUrl ] = useState(""); const [ imageId , setImageId ] = useState(undefined); - useEffect(()=>{ - let url = imageId ? getImageUrl(`/api/attachments/${imageId}`) :""; - setImageUrl(url); - },[imageId]) + // useEffect(()=>{ + // let url = imageId ? getImageUrl(`/api/attachments/${imageId}`) :""; + // setImageUrl(url); + // },[imageId]) useEffect(()=>{ if(organizeDetail){ @@ -41,7 +41,7 @@ export default Form.create()(forwardRef((props)=>{ axios.post(url,{ ...values, memo:content, - news_banner_id:imageId + // news_banner_id:imageId }).then(result=>{ if(result){ props.showNotification("组织首页更新成功!"); @@ -57,9 +57,9 @@ export default Form.create()(forwardRef((props)=>{
-

新闻动态图片

+ {/*

新闻动态图片

{setImageId(id);}}/> -

setImageId("")}>删除

+

setImageId("")}>删除

*/} {getFieldDecorator("news_url",{ rules:[] diff --git a/src/forge/users/GeneralView/ConcentrateBox.jsx b/src/forge/users/GeneralView/ConcentrateBox.jsx index 2478c6528..25a1e08ad 100644 --- a/src/forge/users/GeneralView/ConcentrateBox.jsx +++ b/src/forge/users/GeneralView/ConcentrateBox.jsx @@ -147,8 +147,8 @@ function ConcentrateBox({ visible , onCancel , onSure , type , username , choose onChange={(e)=>setSearch(e.target.value)} />
-
- +
+ { copyList && copyList.length >0 && copyList.map((i,k)=>{ return( diff --git a/src/forge/users/GeneralView/ConcentrateProject.jsx b/src/forge/users/GeneralView/ConcentrateProject.jsx index d0d863fe4..9affebca3 100644 --- a/src/forge/users/GeneralView/ConcentrateProject.jsx +++ b/src/forge/users/GeneralView/ConcentrateProject.jsx @@ -14,7 +14,8 @@ function ConcentrateProject({ type, title, typeFlag, - btn + btn, + emptyContent }) { const [ list , setList ] = useState(undefined); const [ visible , setVisible ] = useState(false); @@ -106,7 +107,19 @@ function ConcentrateProject({ }
{ - list && list.length === 0 && current &&
你还没有设置精选项目,setVisible(true)}>点击设置
+ (!emptyContent && list && list.length === 0 && current) && +
+ + 你还没有设置精选项目,setVisible(true)}>点击设置 +
+ } + { + emptyContent && list && list.length === 0 ? +
+ {emptyContent} + 暂无数据{current && setVisible(true)}>点击设置} +
+ :"" } ) diff --git a/src/forge/users/GeneralView/Index.scss b/src/forge/users/GeneralView/Index.scss index 5a3879e91..38fb479fd 100644 --- a/src/forge/users/GeneralView/Index.scss +++ b/src/forge/users/GeneralView/Index.scss @@ -74,10 +74,27 @@ padding:0px; padding-bottom: 15px; } - .listbox{ + .conbox{ max-height: 210px; overflow-y: auto; padding-left: 30px; + .ant-checkbox-group{ + display: flex; + flex-wrap: wrap; + width: 100%; + .ant-checkbox-wrapper{ + width: 48%; + margin-left: 0px!important; + display: flex; + align-items: center; + span:last-child{ + flex:1; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } + } } .operateDiv{ padding:20px 30px @@ -87,24 +104,6 @@ padding-top:15px; cursor: pointer; } - .ant-checkbox-group{ - display: flex; - flex-wrap: wrap; - .ant-checkbox-wrapper{ - width: 50%; - margin-left: 0px!important; - display: flex; - .ant-checkbox{ - padding-top: 3px; - } - span:last-child{ - flex:1; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - } - } } .recentStatic{ padding: 30px 0px; diff --git a/src/modules/courses/css/Courses.css b/src/modules/courses/css/Courses.css index 6204dd91f..d46ec88e9 100644 --- a/src/modules/courses/css/Courses.css +++ b/src/modules/courses/css/Courses.css @@ -2139,9 +2139,10 @@ input.ant-input-number-input:focus { } /* md代码类样式渲染 */ -.new_li .markdown-body ul>li { +.new_li .markdown-body ul>li ,.markdown-body ul>li { list-style-type: disc !important; margin-bottom: 0 !important; + white-space: pre-wrap; } .new_li .markdown-body ol>li {