上线update

This commit is contained in:
caishi 2021-10-29 17:01:55 +08:00
parent 743dabd553
commit 30c61f0a7d
19 changed files with 60 additions and 32 deletions

View File

@ -3980,9 +3980,6 @@ html>body #ajax-indicator {
color: #fff;
font-size: 16px;
}
.head-right i{
color: #fff!important;
}
.head-nav ul#header-nav li a:hover,.head-nav ul#header-nav li.active a {
color: #5091FF;

View File

@ -32,7 +32,7 @@ export default ({history}) => {
/>
</div>
:
<i className="iconfont icon-sousuo font-18 ml30" onClick={() => {
<i className="iconfont icon-sousuo font-18 ml30" style={{color:"#a5a5a5"}} onClick={() => {
setOpenSearch(true)
}} />
}

View File

@ -3,25 +3,40 @@ import { Modal , Button } from 'antd';
import './Index.scss';
import '../../css/index.scss';
import RenderHtml from '../../../components/render-html';
import cookie from 'react-cookies';
// import cookie from 'react-cookies';
import axios from 'axios';
function SystemNotice({system_notification,history}){
function SystemNotice({showNotice,system_notification,history,login,hideSystemNotice}){
const [ visible , setVisible ] = useState(false);
useEffect(()=>{
if(system_notification && !cookie.load('notice_stage')){
if(system_notification && !system_notification.is_read && showNotice && login){
setVisible(true);
}
},[system_notification,history.location])
},[system_notification])
function sureContinue() {
cookie.remove('notice_stage');
if(login && ( system_notification && system_notification.id )){
const url = `/users/${login}/system_notification_histories.json`;
axios.post(url,{
system_notification_id:system_notification.id
}).then(result=>{
if(result){
setVisible(false);
hideSystemNotice();
}
}).catch(error=>{})
}else{
setVisible(false);
hideSystemNotice();
}
// cookie.remove('notice_stage');
let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//
// let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//
cookie.save('notice_stage', true,{ expires: inFifteenMinutes,path:"/" });
// let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//
// // let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//
// cookie.save('notice_stage', true,{ expires: inFifteenMinutes,path:"/" });
setVisible(false);
// setVisible(false);
}
return (

View File

@ -433,7 +433,8 @@ class NewHeader extends Component {
{
current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)?
<Dropdown overlay={this.addMenu(settings && settings.add)} placement="bottomRight">
<i className="iconfont icon-tianjiafangda ml30 mr15"></i>
{/* <i className="iconfont icon-tianjiafangda ml30 mr15"></i> */}
<img src={require(`./img/add.png`)} alt="" width="16px" className="mr15 ml30"/>
</Dropdown>:""
}
@ -448,7 +449,8 @@ class NewHeader extends Component {
>
<Link to={"/settings/notice"} className="message-icon">
{current_user && <Badge count={current_user.message_unread_total}>
<i className="iconfont icon-xiaoxilingdang ml15 mr15"></i>
{/* <i className="iconfont icon-xiaoxilingdang ml15 mr15"></i> */}
<img src={require(`./img/ring.png`)} alt="" width="16px" className="ml15 mr15"/>
</Badge>}
</Link>
</Popover>

View File

@ -326,13 +326,16 @@
}
}
}
.copyrightDesc{
font-size: 12px;
font-weight: 400;
color: #BDC2D1;
line-height: 28px;
padding:15px 0px;
text-align: center;
background-color: #1B212C;
}
.copyrightDesc{
font-size: 12px;
font-weight: 400;
color: #BDC2D1;
line-height: 28px;
padding:15px 0px;
text-align: center;
background-color: #1B212C;
a{
color: #BDC2D1!important;
}
}

BIN
src/forge/Head/img/add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

BIN
src/forge/Head/img/ring.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

View File

@ -328,7 +328,7 @@ function CoderDepot(props){
function okUpdate(d,w,l){
const url = `/${owner}/${projectsId}.json`;
axios.put(url,{
description:d,website:w,lesson_url:l
description:d,website:w || "",lesson_url:l||""
}).then(result=>{
if(result && result.data && result.data.id){
setDesc(result.data.description);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 769 KiB

After

Width:  |  Height:  |  Size: 730 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 KiB

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 KiB

After

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 914 KiB

After

Width:  |  Height:  |  Size: 877 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

@ -1,6 +1,5 @@
import React , { useEffect , useState } from 'react';
import "./Index.scss";
import HeadNav from './Headnav';
import TopEdition from './TopEdition';
import ThirdEdition from './ThirdEdition';
import { Anchor } from 'antd';
@ -10,7 +9,6 @@ import F43 from './Img/4-3.png';
import F44 from './Img/4-4.png';
import SecondEdition from './SecondEdition';
import FifthEdition from './FifthEdition';
import Footnav from './Footnav';
import { TPMIndexHOC } from '../modules/tpm/TPMIndexHOC';
function Index(props) {
@ -20,6 +18,7 @@ function Index(props) {
const [ isloginCancel , setIsloginCancel ] = useState(false);
const register = props && props.mygetHelmetapi && props.mygetHelmetapi.common && props.mygetHelmetapi.common.register;
const { current_user } = props;
useEffect(()=>{
window.addEventListener("scroll",scrollListener);
},[])
@ -51,7 +50,7 @@ function Index(props) {
<div className="homePage">
<div className="topEdition">
{/* <HeadNav {...props}/> */}
<TopEdition register={register}/>
<TopEdition register={register} current_user={current_user}/>
<ul className="topEditionUl">
<a href="https://forum.trustie.net/forums/4666/detail" target="_blank" className="font-18">
<li>
@ -91,7 +90,9 @@ function Index(props) {
<div className="forthEdition">
<p className="theTitle">加入GitLink和社区伙伴们一起踏上开源创新的辉煌旅程</p>
<a className="qulikyreg" href={register}>快速注册</a>
<div style={{marginBottom:"80px"}}>
{ !(current_user && current_user.login) && <a className="qulikyreg" href={register}>立即注册</a> }
</div>
<ul className="forthUl">
<li>
<img src={F41} alt="" width={"100px"}/>

View File

@ -824,7 +824,6 @@ body{
background-color: #466AFF;
border-radius: 6px;
font-size: 18px;
margin-bottom: 80px;
}
.forthUl{
display: flex;
@ -1035,4 +1034,7 @@ body{
padding:15px 0px;
text-align: center;
background-color: #1B212C;
a{
color: #BDC2D1!important;
}
}

View File

@ -14,7 +14,7 @@ let setting={
prevArrow:<button type='button' class='slick-prev slick-arrow'><i className="iconfont icon-xiangzuojiantou"></i></button>,
nextArrow:<button type='button' class='slick-prev slick-arrow'><i className="iconfont icon-xiangyoujiantou"></i></button>
}
function TopEdition({register}) {
function TopEdition({register,current_user}) {
return(
<Slider {...setting}>
<div className="regform1"></div>
@ -22,7 +22,7 @@ function TopEdition({register}) {
<div className="regform3">
</div>
<div className="regform4">
<p className="regPrg"><a href={register}>注册</a></p>
{ !(current_user && current_user.login) && <p className="regPrg"><a href={register}>注册</a></p> }
</div>
</Slider>
)

View File

@ -29,6 +29,7 @@ export function TPMIndexHOC(WrappedComponent) {
email:undefined,
completeProfile:false,
showCP:false,
showNotice:true
}
}
@ -223,6 +224,11 @@ export function TPMIndexHOC(WrappedComponent) {
}
}).catch(error=>{})
}
hideSystemNotice=()=>{
this.setState({
showNotice:false
})
}
showCompeleteDialog=()=>{
this.setState({
@ -231,7 +237,7 @@ export function TPMIndexHOC(WrappedComponent) {
}
render() {
let { isRender , current_user , giteaVisible , email , completeProfile , showCP , publicNav , mygetHelmetapi } = this.state;
let { isRender , current_user , giteaVisible , email , completeProfile , showCP , showNotice , publicNav , mygetHelmetapi } = this.state;
const common = {
showLoginDialog: this.showLoginDialog,
checkIfLogin: this.checkIfLogin,
@ -241,9 +247,11 @@ export function TPMIndexHOC(WrappedComponent) {
return (
<div className="indexHOC">
<SystemNotice
showNotice={showNotice}
system_notification={mygetHelmetapi && mygetHelmetapi.system_notification}
history={this.props.history}
login={current_user && current_user.login}
hideSystemNotice={this.hideSystemNotice}
/>
<EducoderAccount visible={giteaVisible} email={email} onOk={this.onOk}/>
<ProfileModal