Skip to content

Commit

Permalink
Merge branch 'main' into evan/platform-ux-improvements-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ferothefox authored Dec 12, 2024
2 parents 2540789 + 10ef25e commit 8a5747b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 33 deletions.
20 changes: 0 additions & 20 deletions .idea/daedalus.iml

This file was deleted.

4 changes: 2 additions & 2 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions apps/app-frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ const themeStore = useTheming()
const news = ref([
{
title: 'Modrinth App 0.9.0',
summary: 'An all-new UI, Modrinth Servers, and support for collections.',
title: 'Introducing Modrinth Servers',
summary: 'Host your next Minecraft server with Modrinth.',
thumbnail:
'https://media.beehiiv.com/cdn-cgi/image/format=auto,width=800,height=421,fit=scale-down,onerror=redirect/uploads/publication/thumbnail/a49f8e1b-3835-4ea1-a85b-118c6425ebc3/landscape_1667087426098458.png',
date: '2024-10-11T00:00:00Z',
link: 'https://blog.modrinth.com/p/creator-revenue-update',
'https://media.beehiiv.com/cdn-cgi/image/format=auto,width=800,height=421,fit=scale-down,onerror=redirect/uploads/asset/file/eefddc59-b4c4-4e7d-92e8-c26bdef42984/Modrinth-Servers-Thumb.png',
date: '2024-11-02T00:00:00Z',
link: 'https://blog.modrinth.com/p/modrinth-servers-beta',
},
{
title: 'Becoming Sustainable',
Expand Down
11 changes: 5 additions & 6 deletions apps/app-frontend/src/components/ui/friends/FriendsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,19 @@ const unlisten = await friend_listener(() => loadFriends())
onUnmounted(() => {
unlisten()
})
// TODO: Remove friends menu
</script>

<template>
<NewModal ref="manageFriendsModal" header="Manage friends">
<p v-if="acceptedFriends.length === 0">You have no friends :C</p>
<div v-else class="flex flex-col gap-4">
<input type="text" placeholder="Search friends..." class="w-full" />
<div v-else class="flex flex-col gap-4 min-w-[20rem]">
<input v-model="search" type="text" placeholder="Search friends..." class="w-full" />
<div
v-for="friend in acceptedFriends.filter((x) =>
x.username.toLowerCase().includes(search.value),
v-for="friend in acceptedFriends.filter(
(x) => !search || x.username.toLowerCase().includes(search),
)"
:key="friend.username"
class="flex gap-2 items-center min-w-[20rem]"
class="flex gap-2 items-center"
>
<div class="relative">
<Avatar :src="friend.avatar" class="w-12 h-12 rounded-full" size="2.25rem" circle />
Expand Down
7 changes: 7 additions & 0 deletions packages/app-lib/src/state/friends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ impl FriendsSocket {
tokio::task::spawn(async move {
let res = async {
let state = crate::State::get().await?;

{
if state.friends_socket.write.lock().await.is_some() {
return Ok(());
}
}

state
.friends_socket
.connect(
Expand Down

0 comments on commit 8a5747b

Please sign in to comment.