Small friends fixes (#4270)

* Ensure that fetch errors are properly propagated

* Handle user not found errors better in add_friend

* Cargo fmt

* Introduce new LabrinthError returnable by fetch_advanced

* Allow enter key to send a friend request
This commit is contained in:
Josiah Glosson
2025-08-29 07:08:26 -07:00
committed by GitHub
parent 8b98087936
commit 8fa01b937d
9 changed files with 149 additions and 135 deletions

View File

@@ -250,7 +250,13 @@ onUnmounted(() => {
<div class="mb-4">
<h2 class="m-0 text-lg font-extrabold text-contrast">Username</h2>
<p class="m-0 mt-1 leading-tight">You can add friends with their Modrinth username.</p>
<input v-model="username" class="mt-2 w-full" type="text" placeholder="Enter username..." />
<input
v-model="username"
class="mt-2 w-full"
type="text"
placeholder="Enter username..."
@keyup.enter="addFriendFromModal"
/>
</div>
<ButtonStyled color="brand">
<button :disabled="username.length === 0" @click="addFriendFromModal">