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

View File

@ -624,8 +624,6 @@ export async function tryConnect (
if (room._id === currentInfo?.room) return if (room._id === currentInfo?.room) return
if (room.access === RoomAccess.DND) 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) { for (const req of currentRequests) {
await client.remove(req) await client.remove(req)
} }