mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 19:37:34 -07:00
Fix mini follow button label + its position in user cards
This commit is contained in:
parent
89c95d969f
commit
16d77e6e37
2 changed files with 19 additions and 13 deletions
|
@ -20,16 +20,17 @@
|
||||||
:disabled="wait"
|
:disabled="wait"
|
||||||
@click.stop="onClick"
|
@click.stop="onClick"
|
||||||
:aria-label="`${state} ${user.name || user.username}`"
|
:aria-label="`${state} ${user.name || user.username}`"
|
||||||
|
v-tooltip="full ? null : `${state} ${user.name || user.username}`"
|
||||||
>
|
>
|
||||||
<template v-if="!wait">
|
<template v-if="!wait">
|
||||||
<template v-if="isBlocking">
|
<template v-if="isBlocking">
|
||||||
<span v-if="full">{{ (state = i18n.ts.blocked) }}</span
|
<span>{{ (state = i18n.ts.blocked) }}</span
|
||||||
><i class="ph-prohibit ph-bold ph-lg"></i>
|
><i class="ph-prohibit ph-bold ph-lg"></i>
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-else-if="hasPendingFollowRequestFromYou && user.isLocked"
|
v-else-if="hasPendingFollowRequestFromYou && user.isLocked"
|
||||||
>
|
>
|
||||||
<span v-if="full">{{
|
<span>{{
|
||||||
(state = i18n.ts.followRequestPending)
|
(state = i18n.ts.followRequestPending)
|
||||||
}}</span
|
}}</span
|
||||||
><i class="ph-hourglass-medium ph-bold ph-lg"></i>
|
><i class="ph-hourglass-medium ph-bold ph-lg"></i>
|
||||||
|
@ -38,24 +39,24 @@
|
||||||
v-else-if="hasPendingFollowRequestFromYou && !user.isLocked"
|
v-else-if="hasPendingFollowRequestFromYou && !user.isLocked"
|
||||||
>
|
>
|
||||||
<!-- つまりリモートフォローの場合。 -->
|
<!-- つまりリモートフォローの場合。 -->
|
||||||
<span v-if="full">{{ (state = i18n.ts.processing) }}</span
|
<span>{{ (state = i18n.ts.processing) }}</span
|
||||||
><i class="ph-circle-notch ph-bold ph-lg fa-pulse"></i>
|
><i class="ph-circle-notch ph-bold ph-lg fa-pulse"></i>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="isFollowing">
|
<template v-else-if="isFollowing">
|
||||||
<span v-if="full">{{ (state = i18n.ts.unfollow) }}</span
|
<span>{{ (state = i18n.ts.unfollow) }}</span
|
||||||
><i class="ph-minus ph-bold ph-lg"></i>
|
><i class="ph-minus ph-bold ph-lg"></i>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!isFollowing && user.isLocked">
|
<template v-else-if="!isFollowing && user.isLocked">
|
||||||
<span v-if="full">{{ (state = i18n.ts.followRequest) }}</span
|
<span>{{ (state = i18n.ts.followRequest) }}</span
|
||||||
><i class="ph-plus ph-bold ph-lg"></i>
|
><i class="ph-plus ph-bold ph-lg"></i>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!isFollowing && !user.isLocked">
|
<template v-else-if="!isFollowing && !user.isLocked">
|
||||||
<span v-if="full">{{ (state = i18n.ts.follow) }}</span
|
<span>{{ (state = i18n.ts.follow) }}</span
|
||||||
><i class="ph-plus ph-bold ph-lg"></i>
|
><i class="ph-plus ph-bold ph-lg"></i>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span v-if="full">{{ (state = i18n.ts.processing) }}</span
|
<span>{{ (state = i18n.ts.processing) }}</span
|
||||||
><i class="ph-circle-notch ph-bold ph-lg fa-pulse ph-fw ph-lg"></i>
|
><i class="ph-circle-notch ph-bold ph-lg fa-pulse ph-fw ph-lg"></i>
|
||||||
</template>
|
</template>
|
||||||
</button>
|
</button>
|
||||||
|
@ -185,6 +186,7 @@ onBeforeUnmount(() => {
|
||||||
.menu {
|
.menu {
|
||||||
width: 3em;
|
width: 3em;
|
||||||
height: 2em;
|
height: 2em;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.follow-button {
|
.follow-button {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -200,6 +202,7 @@ onBeforeUnmount(() => {
|
||||||
height: 2em;
|
height: 2em;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
|
vertical-align: middle;
|
||||||
|
|
||||||
&.full {
|
&.full {
|
||||||
padding: 0.2em 0.7em;
|
padding: 0.2em 0.7em;
|
||||||
|
@ -215,6 +218,9 @@ onBeforeUnmount(() => {
|
||||||
|
|
||||||
&:not(.full) {
|
&:not(.full) {
|
||||||
width: 31px;
|
width: 31px;
|
||||||
|
span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus-visible {
|
&:focus-visible {
|
||||||
|
|
|
@ -45,12 +45,12 @@
|
||||||
<MkNumber :value="user.followersCount" />
|
<MkNumber :value="user.followersCount" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MkFollowButton
|
<div class="koudoku-button">
|
||||||
v-if="$i && user.id != $i.id"
|
<MkFollowButton
|
||||||
class="koudoku-button"
|
v-if="$i && user.id != $i.id"
|
||||||
:user="user"
|
:user="user"
|
||||||
full
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue