Use label button for profile page

It's less confusing than figuring out what the icons represent.
This commit is contained in:
Nick Colley 2023-02-01 11:57:28 +00:00
parent a521f253a0
commit f447393be7
1 changed files with 9 additions and 22 deletions

View File

@ -6,17 +6,9 @@
- If a follow is requested, then the button is pressed but shows as "follow requested" with
a different icon.
-->
<IconButton
className="account-profile-follow-icon-button"
{label}
{pressedLabel}
{href}
{pressable}
{pressed}
big={!$isVeryTinyMobileSize}
on:click="onFollowButtonClick(event)"
ref:icon
/>
<button class="account-profile-follow-button" on:click="onFollowButtonClick(event)">
{pressed ? pressedLabel : label}
</button>
</div>
<style>
.account-profile-follow {
@ -33,6 +25,12 @@
justify-self: flex-end;
}
}
.account-profile-follow-button {
padding: 0.6em;
font-size: 1.1em;
min-width: 10ch;
}
</style>
<script>
import IconButton from '../IconButton.html'
@ -99,17 +97,6 @@
pressedLabel: ({ requested }) => {
return formatIntl('intl.unfollowLabel', { requested })
},
href: ({ blocking, following, followRequested }) => {
if (blocking) {
return '#fa-unlock'
} else if (following) {
return '#fa-user-times'
} else if (followRequested) {
return '#fa-hourglass'
} else {
return '#fa-user-plus'
}
},
shown: ({ verifyCredentials, relationship }) => (
verifyCredentials && relationship && verifyCredentials.id !== relationship.id
),