Using time distance for content updated on stats page.
This commit is contained in:
@@ -14,7 +14,10 @@
|
||||
<dl class="stat-table">
|
||||
<div class="stat-row">
|
||||
<dt class="stat-label">Content updated</dt>
|
||||
<dd class="stat-value">{{ formatDate(lastScrape, 'YYYY-MM-DD HH:mm') }}</dd>
|
||||
<dd
|
||||
class="stat-value"
|
||||
:title="format(lastScrape, 'yyyy-MM-dd HH:mm')"
|
||||
>{{ formatDistance(lastScrape, new Date(), { includeSeconds: true }) }} ago</dd>
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
@@ -56,6 +59,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useStore } from 'vuex';
|
||||
import { format, formatDistance } from 'date-fns';
|
||||
|
||||
import Ellipsis from '../loading/ellipsis.vue';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user