- Major refactoring that makes Doc a class with properties - Data made only shallow reactive, for a good speedup of initial load - Minor bugfixes and UX improvements along the way - Fixed handling of hash and question marks in URLs (was confusing Vue Router) - Search made stricter to find good results (not ignore all punctuation) Reviewed-on: #5
23 lines
495 B
Vue
23 lines
495 B
Vue
<template>
|
|
<td class="modified right">
|
|
<time :data-tooltip=tooltip :datetime=datetime>{{ doc.modified }}</time>
|
|
</td>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { Doc } from '@/repositories/Document'
|
|
import { computed } from 'vue'
|
|
|
|
const datetime = computed(() =>
|
|
new Date(1000 * props.doc.mtime).toISOString().replace('.000Z', 'Z')
|
|
)
|
|
|
|
const tooltip = computed(() =>
|
|
datetime.value.replace('T', '\n').replace('Z', ' UTC')
|
|
)
|
|
|
|
const props = defineProps<{
|
|
doc: Doc
|
|
}>()
|
|
</script>
|