Show actor address in repost action tooltip

This commit is contained in:
silverpill 2023-01-18 01:22:45 +00:00
parent e53a70c672
commit f605c120c4
2 changed files with 10 additions and 1 deletions

View file

@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Show error message if moving of followers fails. - Show error message if moving of followers fails.
- Added "Import Follows" page. - Added "Import Follows" page.
- Display custom emojis. - Display custom emojis.
- Show actor address in repost action tooltip.
### Changed ### Changed

View file

@ -2,7 +2,10 @@
<template v-if="post.reblog"> <template v-if="post.reblog">
<div class="action"> <div class="action">
<img :src="require('@/assets/feather/repeat.svg')"> <img :src="require('@/assets/feather/repeat.svg')">
<router-link :to="{ name: 'profile', params: { profileId: post.account.id }}"> <router-link
:to="{ name: 'profile', params: { profileId: post.account.id }}"
:title="getActorAddress(post.account)"
>
{{ post.account.display_name || post.account.username }} {{ post.account.display_name || post.account.username }}
</router-link> </router-link>
<span>reposted</span> <span>reposted</span>
@ -24,8 +27,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { $ } from "vue/macros"
import type { Post as PostObject } from "@/api/posts" import type { Post as PostObject } from "@/api/posts"
import Post from "@/components/Post.vue" import Post from "@/components/Post.vue"
import { useInstanceInfo } from "@/store/instance"
/* eslint-disable-next-line no-undef */ /* eslint-disable-next-line no-undef */
defineProps<{ defineProps<{
@ -34,6 +40,8 @@ defineProps<{
/* eslint-disable-next-line no-undef */ /* eslint-disable-next-line no-undef */
const emit = defineEmits<{(event: "post-deleted", postId: string): void}>() const emit = defineEmits<{(event: "post-deleted", postId: string): void}>()
const { getActorAddress } = $(useInstanceInfo())
function onPostDeleted(postId: string) { function onPostDeleted(postId: string) {
emit("post-deleted", postId) emit("post-deleted", postId)
} }