forked from Gitlink/forgeplus-react
红山开源通知以及样式调整
This commit is contained in:
parent
d26b304a17
commit
b3745d5b3a
|
@ -1,8 +1,8 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2340181 */
|
||||
src: url('iconfont.woff2?t=1642391410353') format('woff2'),
|
||||
url('iconfont.woff?t=1642391410353') format('woff'),
|
||||
url('iconfont.ttf?t=1642391410353') format('truetype');
|
||||
src: url('iconfont.woff2?t=1644907653340') format('woff2'),
|
||||
url('iconfont.woff?t=1644907653340') format('woff'),
|
||||
url('iconfont.ttf?t=1644907653340') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
@ -13,6 +13,14 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-icon2:before {
|
||||
content: "\e912";
|
||||
}
|
||||
|
||||
.icon-a-21:before {
|
||||
content: "\e913";
|
||||
}
|
||||
|
||||
.icon-a-2:before {
|
||||
content: "\e90f";
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,6 +5,20 @@
|
|||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "27299393",
|
||||
"name": "icon",
|
||||
"font_class": "icon2",
|
||||
"unicode": "e912",
|
||||
"unicode_decimal": 59666
|
||||
},
|
||||
{
|
||||
"icon_id": "27299394",
|
||||
"name": "2",
|
||||
"font_class": "a-21",
|
||||
"unicode": "e913",
|
||||
"unicode_decimal": 59667
|
||||
},
|
||||
{
|
||||
"icon_id": "27200759",
|
||||
"name": "2",
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -33,7 +33,8 @@ export function initAxiosInterceptors(props) {
|
|||
initOnlineOfflineListener();
|
||||
|
||||
// var proxy = "http://192.168.1.40:3000";
|
||||
var proxy = "http://117.50.100.12:49999";
|
||||
// var proxy = "http://117.50.100.12:49999";
|
||||
var proxy = "http://111.8.36.180:8000";
|
||||
//响应前的设置
|
||||
axios.interceptors.request.use(
|
||||
config => {
|
||||
|
|
|
@ -83,11 +83,11 @@ function Index(props){
|
|||
<div className="userDetail">
|
||||
<div className="userHeadPhoto">
|
||||
<img src={getImageUrl(`/${current_user && current_user.image_url}`)} alt=""/>
|
||||
<span className="userUpdateBox"onClick={()=>setAvatarVisible(true)}>修改头像</span>
|
||||
{/* <span className="userUpdateBox"onClick={()=>setAvatarVisible(true)}>修改头像</span> */}
|
||||
</div>
|
||||
<span>{current_user && current_user.username}</span>
|
||||
</div>
|
||||
<ul className="securityUl ul-border-buttom">
|
||||
{/* <ul className="securityUl ul-border-buttom">
|
||||
<li>个人信息</li>
|
||||
<li className={pathname.indexOf("/settings/profile")>-1 ?"active":""}><Link to={`/settings/profile`}><i className="iconfont icon-gerenziliao mr5 font-14"></i><span className="text-shodow-bold">基本资料</span></Link></li>
|
||||
<li className={pathname.indexOf("/settings/password")>-1 ?"active":""}><Link to={`/settings/password`}><i className="iconfont icon-xuanzhonganquanshezhi_icon mr5 font-14"></i><span className="text-shodow-bold">密码管理</span></Link></li>
|
||||
|
@ -100,6 +100,10 @@ function Index(props){
|
|||
<ul className="securityUl">
|
||||
<li>安全设置</li>
|
||||
<li className={pathname.indexOf("/settings/SSH")>-1 ?"active":""}><Link to={`/settings/SSH`}><i className="iconfont icon-xuanzhongssh_icon mr5 font-14"></i><span className="text-shodow-bold">SSH密钥</span></Link></li>
|
||||
</ul> */}
|
||||
<ul className="securityUl ul-border-buttom">
|
||||
<li>消息通知</li>
|
||||
<li className={(pathname.indexOf("/settings/notice")>-1 && pathname.indexOf("/settings/notice/config") == -1) || pathname.indexOf("/settings/notice/privateLetter")>-1 ?"active":""}><Link to={"/settings/notice"}><i className="iconfont icon-wodetongzhi"></i><span className="text-shodow-bold">我的通知</span></Link></li>
|
||||
</ul>
|
||||
</div>
|
||||
<LongWidth>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
padding:30px 0px 10px;
|
||||
.shortW{
|
||||
width: 198px;
|
||||
height: 300px;
|
||||
border: 1px solid rgba(153, 153, 153, 0.22);
|
||||
border-radius: 4px;
|
||||
// min-height: 400px;
|
||||
|
@ -77,7 +78,7 @@
|
|||
}
|
||||
}
|
||||
.ul-border-buttom{
|
||||
border-bottom: 1px solid rgba(153, 153, 153, 0.22);
|
||||
// border-bottom: 1px solid rgba(153, 153, 153, 0.22);
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,11 +32,11 @@ function MyNotice(props) {
|
|||
useEffect(()=>{
|
||||
let notice = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice;
|
||||
let login = current_user && current_user.login;
|
||||
if(!login){
|
||||
history.push(`/explore`);
|
||||
}else if(!notice){
|
||||
history.push(`/settings/profile`);
|
||||
}
|
||||
// if(!login){
|
||||
// history.push(`/explore`);
|
||||
// }else if(!notice){
|
||||
// history.push(`/settings/profile`);
|
||||
// }
|
||||
},[mygetHelmetapi])
|
||||
|
||||
useEffect(()=>{
|
||||
|
|
|
@ -218,7 +218,7 @@ class Infos extends Component {
|
|||
const { username } = this.props.match.params;
|
||||
const { user, isSpin, route_type , undo_events , menuKey , avatarVisible } = this.state;
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
<div className="newMain clearfix whiteMain">
|
||||
{
|
||||
avatarVisible &&
|
||||
<Avatar
|
||||
|
@ -244,11 +244,11 @@ class Infos extends Component {
|
|||
}
|
||||
</span>
|
||||
</span>
|
||||
{
|
||||
{/* {
|
||||
current_user && current_user.login && current_user.login === username ?
|
||||
<span className="updateAvatar" onClick={()=>{this.setState({avatarVisible:true})}}>修改头像</span>
|
||||
:""
|
||||
}
|
||||
} */}
|
||||
</div>
|
||||
<div className="text-center mt15 font-24 task-hide" title={user && user.username}>
|
||||
{user && user.username}
|
||||
|
@ -328,11 +328,11 @@ class Infos extends Component {
|
|||
</Menu.Item>
|
||||
:""
|
||||
}
|
||||
{
|
||||
{/* {
|
||||
current_user && current_user.login && current_user.login === username ?
|
||||
<Menu.Item key="4"><Link to={`/${user && user.login}/devops/CIService`}><i className="iconfont icon-gongzuoliu1"></i>DevOps引擎</Link></Menu.Item>
|
||||
:""
|
||||
}
|
||||
} */}
|
||||
<Menu.Item key="5">
|
||||
<Link to={`/${user && user.login}/organizes`}>
|
||||
<i className="iconfont icon-zuzhi"></i>组织
|
||||
|
|
|
@ -54,3 +54,6 @@ a.text-button-grey{
|
|||
}
|
||||
.text-right{text-align: right;}
|
||||
.bbt{border-bottom: 1px solid #e0e0e0;}
|
||||
.whiteMain{
|
||||
background-color: #fff;
|
||||
}
|
|
@ -518,7 +518,7 @@ class LoginDialog extends Component {
|
|||
}
|
||||
value={this.state.loginValue}
|
||||
name="username"
|
||||
placeholder="请输入邮箱地址/用户名" ></input>
|
||||
placeholder="请输入有效的手机号/邮箱号" ></input>
|
||||
|
||||
<div style={{ height: '25px' }}><p className="color-orange edu-txt-left none" id="username_error_notice"
|
||||
style={{ display: Phonenumberisnotco === undefined ? 'none' : 'block' }}>{Phonenumberisnotco}</p></div>
|
||||
|
@ -562,9 +562,9 @@ class LoginDialog extends Component {
|
|||
<label htmlFor="p_autolog" style={{ top: '0px' }}>下次自动登录</label>
|
||||
</span>
|
||||
<span className="fr">
|
||||
<a href="/resetPassword" className="mr3 color-grey-9">找回密码</a>
|
||||
<a href="https://osredm.com/account/lost_password" className="mr3 color-grey-9">找回密码</a>
|
||||
<em className="vertical-line"></em>
|
||||
<a href="/register" className="color-grey-9">注册</a>
|
||||
<a href={settings && settings.new_course && settings.new_course.register_url} className="color-grey-9">注册</a>
|
||||
</span>
|
||||
</p>
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ import AccountProfile from "../user/AccountProfile";
|
|||
import { getImageUrl,getLogoImageUrl } from 'educoder';
|
||||
import { getUserInfo } from 'src/military/expert/api';
|
||||
import axios from 'axios';
|
||||
import { Modal, Input, message, notification, Button } from 'antd';
|
||||
import { Modal, Input, message, notification, Button, Popover, Badge } from 'antd';
|
||||
|
||||
import LoginDialog from '../login/LoginDialog';
|
||||
import GotoQQgroup from '../../modal/GotoQQgroup'
|
||||
|
@ -15,6 +15,7 @@ import 'antd/lib/input/style/index.css';
|
|||
import './TPMIndex.css';
|
||||
import './css/headerExcess.css';
|
||||
import logo from './images/hskylogo.png';
|
||||
import NoticeContent from 'src/forge/Head/NoticeContent';
|
||||
|
||||
const $ = window.$
|
||||
// TODO 这部分脚本从公共脚本中直接调用
|
||||
|
@ -49,11 +50,11 @@ class NewHeader extends Component {
|
|||
mydisplay: false,
|
||||
headtypesonClickbool: false,
|
||||
headtypess: "/",
|
||||
mygetHelmetapi2: null,
|
||||
settings: null,
|
||||
goshowqqgtounp: false,
|
||||
visiblemyss: false,
|
||||
isExpert: false,
|
||||
visible:false, //浮动消息框展示控制
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
|
@ -589,6 +590,9 @@ class NewHeader extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
handleVisibleChange = visible => {
|
||||
this.setState({ visible });
|
||||
};
|
||||
|
||||
// 处理弹框
|
||||
setgoshowqqgtounp = (bool) => {
|
||||
|
@ -597,7 +601,7 @@ class NewHeader extends Component {
|
|||
})
|
||||
}
|
||||
render() {
|
||||
const { match,current_user } = this.props;
|
||||
const { resetUserInfo , showNotification, match, current_user } = this.props;
|
||||
|
||||
let { Addcoursestypes,
|
||||
tojoinitemtype,
|
||||
|
@ -614,7 +618,7 @@ class NewHeader extends Component {
|
|||
headtypess,
|
||||
settings,
|
||||
goshowqqgtounp,
|
||||
mygetHelmetapi2,
|
||||
visible,
|
||||
} = this.state;
|
||||
let activeIndex =match.path === '/'?true: '';
|
||||
let headtypes = '/';
|
||||
|
@ -759,16 +763,23 @@ class NewHeader extends Component {
|
|||
</div>
|
||||
</div>
|
||||
}
|
||||
{this.props.user && this.props.user.login &&
|
||||
<div className="ml30 edu-menu-panel">
|
||||
{user && user.login &&
|
||||
<a href={`${settings && settings.new_course && settings.new_course.tiding_url}`} style={{ position: 'relative' }} target="_blank">
|
||||
<i className={`iconfont icon-xiaoxilingdang ${activeIndex?'color-home':'color-grey-6'}`}></i>
|
||||
<span className="newslight" style={{ display: this.props.Headertop === undefined ? "none" : this.props.Headertop.new_message === true ? "block" : "none" }}>
|
||||
</span>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
{ (settings && settings.common && settings.common.notice) && (current_user && current_user.login)?
|
||||
<Popover
|
||||
overlayClassName="notice-popover"
|
||||
placement={`bottomRight`}
|
||||
content={<NoticeContent visible={visible} current_user={current_user} showNotification={showNotification} resetUserInfo={resetUserInfo}/>}
|
||||
visible={visible}
|
||||
onVisibleChange={this.handleVisibleChange}
|
||||
destroyTooltipOnHide
|
||||
>
|
||||
<Link to={"/settings/notice"} className="message-icon mt3">
|
||||
{current_user && <Badge count={current_user.message_unread_total}>
|
||||
{/* <img src={require(`./img/ring.png`)} alt="" width="16px" className="ml15 mr15"/> */}
|
||||
<i className={`iconfont icon-xiaoxilingdang ml20 ${activeIndex?'color-home':'color-grey-6'}`}></i>
|
||||
</Badge>}
|
||||
</Link>
|
||||
</Popover>
|
||||
: ""
|
||||
}
|
||||
<Modal
|
||||
keyboard={false}
|
||||
|
@ -801,10 +812,10 @@ class NewHeader extends Component {
|
|||
<span className="login-box">
|
||||
<a onClick={() => this.educoderlogin()} className={`mr5 ${activeIndex ? 'color-home' : 'color-grey-6'}`}>登录</a>
|
||||
{
|
||||
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url && (
|
||||
settings && settings.new_course && settings.new_course.register_url && (
|
||||
activeIndex ?
|
||||
<Button className="register-button" type="primary" size="large" ><a href={`${mygetHelmetapi2.new_course.register_url}`}>免费注册</a></Button> :
|
||||
<span><em className="vertical-line"></em><a className={`ml5 ${activeIndex ? 'color-home' : 'color-grey-6'}`} href={`${mygetHelmetapi2.new_course.register_url}`} target="_blank">注册</a></span>
|
||||
<Button className="register-button" type="primary" size="large" ><a href={`${settings.new_course.register_url}`}>免费注册</a></Button> :
|
||||
<span><em className="vertical-line"></em><a className={`ml5 ${activeIndex ? 'color-home' : 'color-grey-6'}`} href={`${settings.new_course.register_url}`} target="_blank">注册</a></span>
|
||||
)
|
||||
}
|
||||
</span>
|
||||
|
|
|
@ -42,7 +42,6 @@ body>.-task-title {
|
|||
width:100%;
|
||||
padding:0px 70px;
|
||||
margin:0px auto;
|
||||
padding:0px 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
|
|
|
@ -301,7 +301,7 @@ export function TPMIndexHOC(WrappedComponent, headFoot) {
|
|||
{...this.state}
|
||||
/> : ""}
|
||||
{/* <Header {...this.state} {...this.props} {...common} publicNav={publicNav}></Header> */}
|
||||
<NewHeader {...this.state} {...this.props}></NewHeader>
|
||||
<NewHeader {...this.state} {...this.props} {...common}></NewHeader>
|
||||
<Spin spinning={this.state.globalLoading} delay={0} className="globalSpin"
|
||||
size="large" tip={this._gLoadingTip || "加载中..."}
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue