mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-30 04:05:40 +00:00
Merge branch 'staging' into develop
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
commit
4f61a4d204
@ -15,6 +15,7 @@
|
||||
<script lang="ts">
|
||||
import { getMetadata } from '@hcengineering/platform'
|
||||
import uiPlugin, { closePopup, closeTooltip, navigate, parseLocation } from '@hcengineering/ui'
|
||||
import presentation from '../plugin'
|
||||
|
||||
export let href: string | undefined
|
||||
export let disabled = false
|
||||
@ -44,7 +45,8 @@
|
||||
closeTooltip()
|
||||
try {
|
||||
const url = new URL(href)
|
||||
if (url.origin === window.location.origin) {
|
||||
const frontUrl = getMetadata(presentation.metadata.FrontUrl) ?? window.location.origin
|
||||
if (url.origin === frontUrl) {
|
||||
const loc = parseLocation(url)
|
||||
const routes = getMetadata(uiPlugin.metadata.Routes)
|
||||
const app = routes?.get(loc.path[0])
|
||||
|
@ -219,7 +219,7 @@ async function setDefaultRoomAccess (info: ParticipantInfo, control: TriggerCont
|
||||
const roomInfos = await control.queryFind(control.ctx, love.class.RoomInfo, {})
|
||||
const oldRoomInfo = roomInfos.find((ri) => ri.persons.includes(info.person))
|
||||
if (oldRoomInfo !== undefined) {
|
||||
if (oldRoomInfo.persons.length === 0) {
|
||||
if (oldRoomInfo.persons.length === 1 && oldRoomInfo.persons[0] === info.person) {
|
||||
res.push(control.txFactory.createTxRemoveDoc(oldRoomInfo._class, oldRoomInfo.space, oldRoomInfo._id))
|
||||
|
||||
const resetAccessTx = control.txFactory.createTxUpdateDoc(
|
||||
|
Loading…
Reference in New Issue
Block a user