silly update
This commit is contained in:
13
src/App.js
13
src/App.js
@@ -48,6 +48,9 @@ class App extends Component {
|
||||
this.show_sidebar_bound=this.show_sidebar.bind(this);
|
||||
this.set_mode_bound=this.set_mode.bind(this);
|
||||
this.on_pressure_bound=this.on_pressure.bind(this);
|
||||
// a silly self-deceptive approach to ban guests, enough to fool those muggles
|
||||
// document cookie 'pku_ip_flag=yes'
|
||||
this.inpku_flag=window[atob('ZG9jdW1lbnQ')][atob('Y29va2ll')].indexOf(atob('cGt1X2lwX2ZsYWc9eWVz'))!==-1;
|
||||
}
|
||||
|
||||
on_pressure() {
|
||||
@@ -94,9 +97,17 @@ class App extends Component {
|
||||
<TokenCtx.Consumer>{(token)=>(
|
||||
<div className="left-container">
|
||||
<DeprecatedAlert token={token.value} />
|
||||
{this.inpku_flag||token.value ?
|
||||
<Flow key={this.state.flow_render_key} show_sidebar={this.show_sidebar_bound}
|
||||
mode={this.state.mode} search_text={this.state.search_text} token={token.value}
|
||||
/>
|
||||
/> :
|
||||
<div className="flow-item-row">
|
||||
<div className="box box-tip aux-margin">
|
||||
<p>本网站仅限校内用户使用</p>
|
||||
<p>请点击右上角的 <span className="icon icon-login" /> 按钮登录</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<br />
|
||||
</div>
|
||||
)}</TokenCtx.Consumer>
|
||||
|
||||
@@ -159,7 +159,7 @@ class ControlBar extends PureComponent {
|
||||
|
||||
export function Title(props) {
|
||||
let date=new Date();
|
||||
let is_eriri_birthday=(1+date.getMonth())===3 && date.getDate()===20;
|
||||
let eriri_easteregg=(1+date.getMonth())===3 && date.getDate()===20 && !localStorage['REPLACE_ERIRI_WITH_URL'];
|
||||
|
||||
return (
|
||||
<div className="title-bar">
|
||||
@@ -169,7 +169,7 @@ export function Title(props) {
|
||||
P大树洞
|
||||
</p>
|
||||
<p className="title-small">
|
||||
{ is_eriri_birthday ?
|
||||
{ eriri_easteregg ?
|
||||
<span style={{backgroundColor: 'yellow'}}>3月20日是看板娘<a href="https://zh.moegirl.org/%E6%B3%BD%E6%9D%91%C2%B7%E6%96%AF%E5%AE%BE%E5%A1%9E%C2%B7%E8%8B%B1%E6%A2%A8%E6%A2%A8" target="_blank">英梨梨</a>的生日</span> :
|
||||
"官方网页版"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user