summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-10-15 11:24:28 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-10-15 11:24:28 +0200
commitd76cde6dfc5da5b6a4d7dde640f7645800185cf5 (patch)
tree5c247ac9b171d77fe7b85d7ec859817c97129b52
parent52319c1ac452bff10b66d60bab3affbe0381f297 (diff)
Link to user for user avatars
-rw-r--r--components/VTable.vue6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/VTable.vue b/components/VTable.vue
index ad772a6..595a385 100644
--- a/components/VTable.vue
+++ b/components/VTable.vue
@@ -22,9 +22,11 @@
svg(v-else xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 text-red-500")
path(stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12")
span(v-else-if="name == 'avatar'")
- user-avatar(:data="field")
+ a(:href="'/user/'+field.id" target="_blank")
+ user-avatar(:data="field")
span(v-else-if="['author', 'user', 'resolved'].includes(name)")
- user-avatar(:data="field[name]" v-if="field[name].username")
+ a(:href="'/user/'+field[name].id" target="_blank")
+ user-avatar(:data="field[name]" v-if="field[name].username")
span(v-else-if="name == 'created' || name == 'updated'")
| {{ field[name]|moment("DD/MM/YYYY HH:mm") }}
span(v-else-if="name == 'likes'")