mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 11:01:54 +03:00
Fix minor office bugs (#6116)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
0f1231e572
commit
fe12d4930f
@ -244,16 +244,12 @@
|
||||
if (isConnected) {
|
||||
await disconnect()
|
||||
}
|
||||
} else if (!isConnected) {
|
||||
const person = $personByIdStore.get(me)
|
||||
if (person === undefined) return
|
||||
await connectRoom(0, 0, myInfo, person, myOffice)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$: checkOwnRoomConnection($infos, $myInfo, $myOffice, $isConnected)
|
||||
$: checkOwnRoomConnection($infos, $myInfo, $myOffice, $isCurrentInstanceConnected)
|
||||
|
||||
const myInvitesCategory = 'myInvites'
|
||||
|
||||
@ -350,6 +346,18 @@
|
||||
participantClickHandler(e, participant)
|
||||
}
|
||||
}
|
||||
|
||||
onDestroy(() => {
|
||||
removeEventListener('beforeunload', beforeUnloadListener)
|
||||
})
|
||||
|
||||
const beforeUnloadListener = () => {
|
||||
if ($myInfo !== undefined) {
|
||||
leaveRoom($myInfo, $myOffice)
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('beforeunload', beforeUnloadListener)
|
||||
</script>
|
||||
|
||||
<div class="flex-row-center flex-gap-2">
|
||||
|
@ -36,8 +36,8 @@
|
||||
const person = $personByIdStore.get(me)
|
||||
if (person === undefined) return
|
||||
await connectRoom(0, 0, $myInfo, person, $myOffice)
|
||||
await client.update(request, { status: RequestStatus.Approved })
|
||||
}
|
||||
await client.update(request, { status: RequestStatus.Approved })
|
||||
}
|
||||
|
||||
async function decline (): Promise<void> {
|
||||
|
@ -100,8 +100,7 @@ async function createUserInfo (acc: Ref<Account>, control: TriggerControl): Prom
|
||||
[tx],
|
||||
'createUserInfo'
|
||||
)
|
||||
await control.apply([ptx])
|
||||
return []
|
||||
return [ptx]
|
||||
}
|
||||
|
||||
async function removeUserInfo (acc: Ref<Account>, control: TriggerControl): Promise<Tx[]> {
|
||||
|
@ -783,6 +783,10 @@ export class TServerStorage implements ServerStorage {
|
||||
)
|
||||
const aresult = await performAsync(applyCtx)
|
||||
|
||||
if (aresult.length > 0) {
|
||||
await this.apply(applyCtx, aresult)
|
||||
}
|
||||
|
||||
if (applyTxes.length > 0) {
|
||||
await this.apply(applyCtx, applyTxes)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user