Merge pull request #1000 from whatdoineed2do/web-localised-time-filter
[web-src] use browser locale for 'time' filter for display
This commit is contained in:
commit
aaadc28001
|
@ -23,6 +23,7 @@ import ModalDialogRemotePairing from '@/components/ModalDialogRemotePairing'
|
|||
import webapi from '@/webapi'
|
||||
import * as types from '@/store/mutation_types'
|
||||
import ReconnectingWebSocket from 'reconnectingwebsocket'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
|
@ -57,6 +58,7 @@ export default {
|
|||
},
|
||||
|
||||
created: function () {
|
||||
moment.locale(navigator.language)
|
||||
this.connect()
|
||||
|
||||
// Start the progress bar on app start
|
||||
|
|
|
@ -76,11 +76,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th>Library updated</th>
|
||||
<td class="has-text-right">{{ library.updated_at | timeFromNow }} <span class="has-text-grey">({{ library.updated_at | time('MMM Do, h:mm') }})</span></td>
|
||||
<td class="has-text-right">{{ library.updated_at | timeFromNow }} <span class="has-text-grey">({{ library.updated_at | time('lll') }})</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Uptime</th>
|
||||
<td class="has-text-right">{{ library.started_at | timeFromNow(true) }} <span class="has-text-grey">({{ library.started_at | time('MMM Do, h:mm') }})</span></td>
|
||||
<td class="has-text-right">{{ library.started_at | timeFromNow(true) }} <span class="has-text-grey">({{ library.started_at | time('ll') }})</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue