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:
Christian Meffert 2020-05-15 07:55:16 +02:00 committed by GitHub
commit aaadc28001
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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>