Add refresh button on phone
This commit is contained in:
parent
fa79de60e2
commit
8dfd23b4cd
4 changed files with 11 additions and 2 deletions
|
@ -24,6 +24,7 @@ const Account = connect(state => ({
|
|||
|
||||
const messages = defineMessages({
|
||||
search: { id: 'navigation_bar.search', defaultMessage: 'Search' },
|
||||
reload: { id: 'navigation_bar.reload', defaultMessage: 'Reload' },
|
||||
});
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
|
@ -58,6 +59,11 @@ class Header extends PureComponent {
|
|||
dispatchServer();
|
||||
}
|
||||
|
||||
handleReload (e) {
|
||||
e.preventDefault();
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
render () {
|
||||
const { signedIn } = this.context.identity;
|
||||
const { location, openClosedRegistrationsModal, signupUrl, intl } = this.props;
|
||||
|
@ -67,6 +73,7 @@ class Header extends PureComponent {
|
|||
if (signedIn) {
|
||||
content = (
|
||||
<>
|
||||
{<button onClick={this.handleReload} className='button button-secondary' aria-label={intl.formatMessage(messages.reload)}><Icon id='refresh' /></button>}
|
||||
{location.pathname !== '/search' && <Link to='/search' className='button button-secondary' aria-label={intl.formatMessage(messages.search)}><Icon id='search' /></Link>}
|
||||
{location.pathname !== '/publish' && <Link to='/publish' className='button button-secondary'><FormattedMessage id='compose_form.publish_form' defaultMessage='New post' /></Link>}
|
||||
<Account />
|
||||
|
|
|
@ -431,6 +431,7 @@
|
|||
"navigation_bar.preferences": "Preferences",
|
||||
"navigation_bar.public_timeline": "Federated timeline",
|
||||
"navigation_bar.reaction_deck": "Reaction deck",
|
||||
"navigation_bar.refresh": "Refresh",
|
||||
"navigation_bar.search": "Search",
|
||||
"navigation_bar.security": "Security",
|
||||
"not_signed_in_indicator.not_signed_in": "You need to login to access this resource.",
|
||||
|
|
|
@ -508,6 +508,7 @@
|
|||
"navigation_bar.preferences": "ユーザー設定",
|
||||
"navigation_bar.public_timeline": "連合タイムライン",
|
||||
"navigation_bar.reaction_deck": "絵文字デッキ",
|
||||
"navigation_bar.refresh": "画面をリロード",
|
||||
"navigation_bar.search": "検索",
|
||||
"navigation_bar.security": "セキュリティ",
|
||||
"not_signed_in_indicator.not_signed_in": "この機能を使うにはログインする必要があります。",
|
||||
|
|
|
@ -2243,8 +2243,8 @@ $ui-header-height: 55px;
|
|||
&__links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 0 10px;
|
||||
gap: 8px;
|
||||
padding: 0 9px;
|
||||
overflow: hidden;
|
||||
|
||||
.button {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue