头部导航栏-搜索小改

This commit is contained in:
caishi 2021-06-11 11:01:46 +08:00
parent 63e9cfe394
commit 3dffbce8d9
4 changed files with 7 additions and 5 deletions

View File

@ -3912,7 +3912,6 @@ html>body #ajax-indicator {
text-align: center; text-align: center;
height: 70px; height: 70px;
box-sizing: border-box; box-sizing: border-box;
min-width: 780px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;

View File

@ -25,7 +25,7 @@ if (isDev) {
} }
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' : window.location.search.indexOf('debug=s') !== -1 ? 'student' :
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
} }
window._debugType = debugType; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {

View File

@ -88,10 +88,11 @@ class NewHeader extends Component {
}, 300) }, 300)
}} }}
> >
<Search placeholder="实践课程/教学课堂/实践项目/交流问答" <Search placeholder="请输入搜索关键字"
className={`search-input mr20`} className={`search-input mr20`}
onSearch={(value)=>this.onGlobalSearch(value,item)} onSearch={(value)=>this.onGlobalSearch(value,item)}
autoFocus={true} autoFocus={true}
style={{width:"190px"}}
/> />
</div> </div>
) )

View File

@ -239,10 +239,12 @@ function CoderDepot(props){
} }
}) })
} }
let n = fileInfo && fileInfo.name; let n = fileInfo && fileInfo.name;
const mdFlag = n && n.substring(n.length-3,n.length) === ".md"; const mdFlag = n && n.substring(n.length-3,n.length) === ".md";
const { current_user } = props;
const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && (projectDetail.permission !=="Reporter" || (current_user && current_user.admin));
return( return(
<WhiteBack> <WhiteBack>
<UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/> <UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>
@ -311,7 +313,7 @@ function CoderDepot(props){
} }
<a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/issues/new`)} >+ 任务</a> <a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/issues/new`)} >+ 任务</a>
</div> </div>
{ type === "dir" && projectDetail.type !== 2 && { fileOperate &&
<Dropdown overlay={fileMenu} className="mr20" trigger={['click']}> <Dropdown overlay={fileMenu} className="mr20" trigger={['click']}>
<Button type="default">文件 <i className="iconfont icon-sanjiaoxing-down ml3 font-14 color-grey-9"></i></Button> <Button type="default">文件 <i className="iconfont icon-sanjiaoxing-down ml3 font-14 color-grey-9"></i></Button>
</Dropdown> </Dropdown>