Add follow button to header

This commit is contained in:
Freeplay 2023-05-21 16:30:35 -04:00
parent 9c1c001f25
commit 0f82c4250b
2 changed files with 24 additions and 10 deletions

View File

@ -85,6 +85,18 @@
</nav> </nav>
</template> </template>
<div class="buttons right"> <div class="buttons right">
<template v-if="metadata.avatar">
<MkFollowButton
v-if="narrow"
:user="metadata.avatar"
:full="false"
></MkFollowButton>
<MkFollowButton
v-else
:user="metadata.avatar"
:full="true"
></MkFollowButton>
</template>
<template v-for="action in actions"> <template v-for="action in actions">
<button <button
v-tooltip.noDelay="action.text" v-tooltip.noDelay="action.text"
@ -113,6 +125,7 @@ import {
reactive, reactive,
} from "vue"; } from "vue";
import tinycolor from "tinycolor2"; import tinycolor from "tinycolor2";
import MkFollowButton from "@/components/MkFollowButton.vue";
import { popupMenu } from "@/os"; import { popupMenu } from "@/os";
import { scrollToTop } from "@/scripts/scroll"; import { scrollToTop } from "@/scripts/scroll";
import { globalEvents } from "@/events"; import { globalEvents } from "@/events";
@ -379,6 +392,9 @@ onUnmounted(() => {
&.right { &.right {
margin-left: auto; margin-left: auto;
:deep(.follow-button) {
margin-right: 6px;
}
} }
&:empty { &:empty {

View File

@ -27,11 +27,10 @@
v-if="!showNext && hasNext" v-if="!showNext && hasNext"
class="load next" class="load next"
@click="showNext = true" @click="showNext = true"
v-tooltip=" >
`${i18n.ts.loadMore} (${i18n.ts.newer})` <i class="ph-caret-up ph-bold ph-lg"></i>
" {{ `${i18n.ts.loadMore} (${i18n.ts.newer})` }}
><i class="ph-caret-up ph-bold ph-lg"></i </MkButton>
></MkButton>
<div class="note _gap"> <div class="note _gap">
<MkRemoteCaution <MkRemoteCaution
v-if="note.user.host != null" v-if="note.user.host != null"
@ -47,11 +46,10 @@
v-if="!showPrev && hasPrev" v-if="!showPrev && hasPrev"
class="load prev" class="load prev"
@click="showPrev = true" @click="showPrev = true"
v-tooltip=" >
`${i18n.ts.loadMore} (${i18n.ts.older})` <i class="ph-caret-down ph-bold ph-lg"></i>
" {{ `${i18n.ts.loadMore} (${i18n.ts.older})` }}
><i class="ph-caret-down ph-bold ph-lg"></i </MkButton>
></MkButton>
</div> </div>
<div v-if="showPrev" class="_gap"> <div v-if="showPrev" class="_gap">