Browse Source

add SyncAgo because it's very useful thing to know...

master
Gaëtan Renaudeau 7 years ago
parent
commit
7ba5b93079
  1. 16
      src/components/SyncAgo.js
  2. 3
      src/components/modals/AccountSettingRenderBody.js
  3. 1
      static/i18n/en/app.yml

16
src/components/SyncAgo.js

@ -0,0 +1,16 @@
// @flow
import React, { PureComponent } from 'react'
import moment from 'moment'
import { translate } from 'react-i18next'
import type { T } from 'types/common'
import Box from './base/Box'
class SyncAgo extends PureComponent<{ t: T, date: Date }> {
render() {
const { t, date } = this.props
return <Box p={4}>{t('app:common.sync.ago', { time: moment(date).fromNow() })}</Box>
}
}
export default translate()(SyncAgo)

3
src/components/modals/AccountSettingRenderBody.js

@ -22,6 +22,7 @@ import Box from 'components/base/Box'
import Button from 'components/base/Button'
import Input from 'components/base/Input'
import Select from 'components/base/Select'
import SyncAgo from 'components/SyncAgo'
import {
ModalBody,
@ -258,12 +259,12 @@ class HelperComp extends PureComponent<Props, State> {
</Container>
) : null}
<Spoiler title={t('app:account.settings.advancedLogs')}>
<SyncAgo date={account.lastSyncDate} />
<textarea
readOnly
style={{
userSelect: 'text',
border: '1px dashed #f9f9f9',
marginTop: '20px',
backgroundColor: '#f9f9f9',
color: '#000',
fontFamily: 'monospace',

1
static/i18n/en/app.yml

@ -42,6 +42,7 @@ common:
upToDate: Up to date
error: Sync error.
refresh: Refresh
ago: Synced {{time}}
error:
load: Unable to load
noResults: No results

Loading…
Cancel
Save