Fix office popup join button (#6421)

This commit is contained in:
Denis Bykhov 2024-08-28 17:15:05 +05:00 committed by GitHub
parent 4fcc9a435b
commit 14aee4e74f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 6 deletions

View File

@ -129,7 +129,6 @@
}
const me = (getCurrentAccount() as PersonAccount).person
$: myRoom = isOffice(room) && room.person === me
</script>
<div class="antiPopup room-popup">
@ -196,9 +195,9 @@
/>
</div>
{/if}
{#if (joined && !myRoom) || (!allowLeave && $myRequests.length === 0 && !myRoom)}
{#if $location.path[2] !== loveId || (joined && allowLeave) || !joined}
<div class="btns flex-row-center flex-reverse flex-no-shrink w-full flex-gap-2">
{#if allowLeave}
{#if joined && allowLeave}
<ModernButton
label={love.string.LeaveRoom}
icon={love.icon.LeaveRoom}
@ -206,7 +205,7 @@
kind={'negative'}
on:click={leave}
/>
{:else if $myRequests.length === 0 && !myRoom}
{:else if !joined}
<ModernButton
icon={love.icon.EnterRoom}
label={love.string.EnterRoom}

View File

@ -624,8 +624,6 @@ export async function tryConnect (
if (room._id === currentInfo?.room) return
if (room.access === RoomAccess.DND) return
const thisRoomRequest = currentRequests.find((p) => p.room === room._id)
if (thisRoomRequest !== undefined) return
for (const req of currentRequests) {
await client.remove(req)
}