move global title to infrastructure

This commit is contained in:
xmcp
2019-06-19 20:38:27 +08:00
parent e97c939831
commit 03068f68e5
4 changed files with 3 additions and 31 deletions

View File

@@ -1,4 +1,5 @@
import React, {Component, PureComponent} from 'react';
import {AppSwitcher} from './infrastructure/widgets';
import {LoginForm, PostForm} from './UserAction';
import {TokenCtx} from './UserAction';
import {PromotionBar} from './Common';
@@ -153,22 +154,14 @@ class ControlBar extends PureComponent {
}
export function Title(props) {
let date=new Date();
let final_exam_egg=(1+date.getMonth())===6 && date.getDate()>=8 && date.getDate()<=21;
return (
<div className="title-bar">
<AppSwitcher appid="hole" />
<div className="aux-margin">
<div className="title">
<p className="centered-line">
P大树洞
</p>
<p className="title-small">
{ final_exam_egg && window.config.easter_egg ?
<span style={{backgroundColor: 'yellow'}}>期末加油</span> :
"官方网页版"
}
</p>
</div>
<ControlBar show_sidebar={props.show_sidebar} set_mode={props.set_mode} />
</div>