add pwa promotion bar
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start_url": "/?src=pwa",
|
"start_url": "/?app",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"theme_color": "#112244",
|
"theme_color": "#112244",
|
||||||
"background_color": "#112244"
|
"background_color": "#112244"
|
||||||
|
|||||||
@@ -95,3 +95,14 @@ export class SafeTextarea extends Component {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function PromotionBar(props) {
|
||||||
|
const is_ios=/iPhone|iPad|iPod/i.test(window.navigator.userAgent);
|
||||||
|
// noinspection JSConstructorReturnsPrimitive
|
||||||
|
return is_ios ? (
|
||||||
|
<div className="box promotion-bar">
|
||||||
|
<span className="icon icon-about" />
|
||||||
|
在 Safari 中将本网站 <b>添加到主屏幕</b> 更好用哦
|
||||||
|
</div>
|
||||||
|
) : null;
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, {Component, PureComponent} from 'react';
|
import React, {Component, PureComponent} from 'react';
|
||||||
import {LoginForm, PostForm} from './UserAction';
|
import {LoginForm, PostForm} from './UserAction';
|
||||||
import {TokenCtx} from './UserAction';
|
import {TokenCtx} from './UserAction';
|
||||||
|
import {PromotionBar} from './Common';
|
||||||
|
|
||||||
import './Title.css';
|
import './Title.css';
|
||||||
|
|
||||||
@@ -114,6 +115,7 @@ class ControlBar extends PureComponent {
|
|||||||
this.props.show_sidebar(
|
this.props.show_sidebar(
|
||||||
'P大树洞(非官方)网页版',
|
'P大树洞(非官方)网页版',
|
||||||
<div>
|
<div>
|
||||||
|
<PromotionBar />
|
||||||
<LoginForm />
|
<LoginForm />
|
||||||
{HELP_TEXT}
|
{HELP_TEXT}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user