Skip to content

Commit

Permalink
Fix display date in TimelineLinear tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Nov 10, 2022
1 parent 3ea179c commit 18acc93
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 deletions.
32 changes: 7 additions & 25 deletions pywb/static/vue/vueui.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion pywb/vueui/src/components/TimelineLinear.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="timeline-linear">
<div class="title">
<div>{{ period.getFullReadableId() }}</div>
<div>{{ displayDate }}</div>
<div>{{ $root._(period.snapshotCount !== 1 ? '{count} captures':'{count} capture', {count: period.snapshotCount}) }}</div>
</div>

Expand All @@ -21,6 +21,8 @@
</template>

<script>
import { PywbI18N } from "../i18n";
export default {
name: "TimelineLinear",
props: ['period', 'currentSnapshot'],
Expand All @@ -31,6 +33,9 @@ export default {
containsCurrentSnapshot() {
return this.currentSnapshot &&
this.period.contains(this.currentSnapshot);
},
displayDate() {
return new Date(this.period.fullId).toLocaleDateString(PywbI18N.getLocale());
}
},
methods: {
Expand Down

0 comments on commit 18acc93

Please sign in to comment.