mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 00:55:25 +00:00
fix: pre-release shared instances fixes (#6856)
* fix: dedupe notifications * fix: notifs + members btn robustness * fix: temp fix for external file wrongly showing updated * fix: fmt
This commit is contained in:
@@ -90,6 +90,7 @@
|
||||
:requested-label="requestedButtonLabel"
|
||||
:requested-tooltip="requestedTooltip(friend.username)"
|
||||
:user-profile-link="userProfileLink"
|
||||
:disabled="!canInvite"
|
||||
@invite="inviteFriend"
|
||||
@cancel="cancelInvite"
|
||||
/>
|
||||
@@ -348,6 +349,7 @@ const {
|
||||
})
|
||||
|
||||
function inviteFriend(friend: InvitePlayersUser) {
|
||||
if (!props.canInvite) return
|
||||
emit('invite', {
|
||||
user: friend,
|
||||
source: 'friend',
|
||||
@@ -355,6 +357,7 @@ function inviteFriend(friend: InvitePlayersUser) {
|
||||
}
|
||||
|
||||
function cancelInvite(friend: InvitePlayersUser) {
|
||||
if (!props.canInvite) return
|
||||
emit('cancel', friend)
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -37,7 +37,7 @@
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
<ButtonStyled v-else-if="status === 'pending'" type="outlined">
|
||||
<button @click="$emit('cancel', user)">
|
||||
<button :disabled="disabled" @click="$emit('cancel', user)">
|
||||
{{ cancelLabel }}
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
@@ -49,7 +49,7 @@
|
||||
</ButtonStyled>
|
||||
</span>
|
||||
<ButtonStyled v-else color-fill="none">
|
||||
<button @click="$emit('invite', user)">
|
||||
<button :disabled="disabled" @click="$emit('invite', user)">
|
||||
{{ inviteLabel }}
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
@@ -74,9 +74,11 @@ const props = withDefaults(
|
||||
inviteLabel: string
|
||||
requestedLabel: string
|
||||
requestedTooltip: string
|
||||
disabled?: boolean
|
||||
userProfileLink?: (username: string) => InvitePlayersUserProfileLink
|
||||
}>(),
|
||||
{
|
||||
disabled: false,
|
||||
userProfileLink: undefined,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user