mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-22 07:26:19 +00:00
Show control bar only for active meeting
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
ff68b604e3
commit
e1659e90a1
@ -608,10 +608,6 @@ export function createModel (builder: Builder): void {
|
|||||||
searchDisabled: true
|
searchDisabled: true
|
||||||
})
|
})
|
||||||
|
|
||||||
builder.mixin(love.class.Room, core.class.Class, view.mixin.ObjectPanelFooter, {
|
|
||||||
editor: love.component.PanelControlBar
|
|
||||||
})
|
|
||||||
|
|
||||||
builder.mixin(love.class.MeetingMinutes, core.class.Class, view.mixin.ObjectPanelFooter, {
|
builder.mixin(love.class.MeetingMinutes, core.class.Class, view.mixin.ObjectPanelFooter, {
|
||||||
editor: love.component.PanelControlBar
|
editor: love.component.PanelControlBar
|
||||||
})
|
})
|
||||||
|
@ -14,22 +14,15 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { location, Location } from '@hcengineering/ui'
|
import { MeetingMinutes } from '@hcengineering/love'
|
||||||
import { loveId, Room, Office } from '@hcengineering/love'
|
|
||||||
|
|
||||||
import ControlBar from './ControlBar.svelte'
|
import ControlBar from './ControlBar.svelte'
|
||||||
import { isConnected } from '../utils'
|
import { currentRoom, currentMeetingMinutes } from '../stores'
|
||||||
import { currentRoom, myOffice } from '../stores'
|
|
||||||
|
|
||||||
function showControlBar (room: Room, loc: Location, myOffice?: Office): boolean {
|
export let object: MeetingMinutes
|
||||||
if (loc.path[2] !== loveId) return false
|
|
||||||
if (room._id !== myOffice?._id) return true
|
|
||||||
|
|
||||||
return $isConnected
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $currentRoom && showControlBar($currentRoom, $location, $myOffice)}
|
{#if $currentRoom && $currentMeetingMinutes?._id === object._id}
|
||||||
<div class="flex-grow flex-shrink">
|
<div class="flex-grow flex-shrink">
|
||||||
<ControlBar room={$currentRoom} />
|
<ControlBar room={$currentRoom} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
import { getObjectLinkFragment } from '@hcengineering/view-resources'
|
import { getObjectLinkFragment } from '@hcengineering/view-resources'
|
||||||
import { getClient } from '@hcengineering/presentation'
|
import { getClient } from '@hcengineering/presentation'
|
||||||
import love from '../plugin'
|
import love from '../plugin'
|
||||||
import { currentRoom, infos, invites, myInfo, myOffice, myRequests, meetingMinutesStore } from '../stores'
|
import { currentRoom, infos, invites, myInfo, myOffice, myRequests, currentMeetingMinutes } from '../stores'
|
||||||
import {
|
import {
|
||||||
getRoomName,
|
getRoomName,
|
||||||
isCameraEnabled,
|
isCameraEnabled,
|
||||||
@ -109,7 +109,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function back (): Promise<void> {
|
async function back (): Promise<void> {
|
||||||
const meetingMinutes = $meetingMinutesStore
|
const meetingMinutes = $currentMeetingMinutes
|
||||||
if (meetingMinutes !== undefined) {
|
if (meetingMinutes !== undefined) {
|
||||||
const hierarchy = client.getHierarchy()
|
const hierarchy = client.getHierarchy()
|
||||||
const panelComponent = hierarchy.classHierarchyMixin(
|
const panelComponent = hierarchy.classHierarchyMixin(
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
import { get } from 'svelte/store'
|
import { get } from 'svelte/store'
|
||||||
|
|
||||||
import love from '../plugin'
|
import love from '../plugin'
|
||||||
import { myInfo, selectedRoomPlace, currentRoom, meetingMinutesStore } from '../stores'
|
import { myInfo, selectedRoomPlace, currentRoom, currentMeetingMinutes } from '../stores'
|
||||||
import { getRoomLabel, lk } from '../utils'
|
import { getRoomLabel, lk } from '../utils'
|
||||||
import PersonActionPopup from './PersonActionPopup.svelte'
|
import PersonActionPopup from './PersonActionPopup.svelte'
|
||||||
import RoomLanguage from './RoomLanguage.svelte'
|
import RoomLanguage from './RoomLanguage.svelte'
|
||||||
@ -70,7 +70,7 @@
|
|||||||
if ($currentRoom?._id === room._id) {
|
if ($currentRoom?._id === room._id) {
|
||||||
const sid = await lk.getSid()
|
const sid = await lk.getSid()
|
||||||
const meetingMinutes =
|
const meetingMinutes =
|
||||||
get(meetingMinutesStore) ?? (await client.findOne(love.class.MeetingMinutes, { sid, attachedTo: room._id }))
|
get(currentMeetingMinutes) ?? (await client.findOne(love.class.MeetingMinutes, { sid, attachedTo: room._id }))
|
||||||
if (meetingMinutes === undefined) {
|
if (meetingMinutes === undefined) {
|
||||||
await openDoc(hierarchy, room)
|
await openDoc(hierarchy, room)
|
||||||
} else {
|
} else {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
import love from '../../plugin'
|
import love from '../../plugin'
|
||||||
import VideoTab from './VideoTab.svelte'
|
import VideoTab from './VideoTab.svelte'
|
||||||
import { isCurrentInstanceConnected, lk } from '../../utils'
|
import { isCurrentInstanceConnected, lk } from '../../utils'
|
||||||
import { currentRoom, meetingMinutesStore } from '../../stores'
|
import { currentRoom, currentMeetingMinutes } from '../../stores'
|
||||||
import ChatTab from './ChatTab.svelte'
|
import ChatTab from './ChatTab.svelte'
|
||||||
import TranscriptionTab from './TranscriptionTab.svelte'
|
import TranscriptionTab from './TranscriptionTab.svelte'
|
||||||
|
|
||||||
@ -61,7 +61,7 @@
|
|||||||
meetingQuery.query(love.class.MeetingMinutes, { sid, attachedTo: room._id }, async (res) => {
|
meetingQuery.query(love.class.MeetingMinutes, { sid, attachedTo: room._id }, async (res) => {
|
||||||
meetingMinutes = res[0]
|
meetingMinutes = res[0]
|
||||||
if (meetingMinutes) {
|
if (meetingMinutes) {
|
||||||
meetingMinutesStore.set(meetingMinutes)
|
currentMeetingMinutes.set(meetingMinutes)
|
||||||
}
|
}
|
||||||
isMeetingMinutesLoaded = true
|
isMeetingMinutesLoaded = true
|
||||||
})
|
})
|
||||||
|
@ -60,7 +60,7 @@ export const activeInvites = derived(invites, (val) => {
|
|||||||
export const myPreferences = writable<DevicesPreference | undefined>()
|
export const myPreferences = writable<DevicesPreference | undefined>()
|
||||||
export let $myPreferences: DevicesPreference | undefined
|
export let $myPreferences: DevicesPreference | undefined
|
||||||
|
|
||||||
export const meetingMinutesStore = writable<MeetingMinutes | undefined>(undefined)
|
export const currentMeetingMinutes = writable<MeetingMinutes | undefined>(undefined)
|
||||||
export const selectedRoomPlace = writable<{ _id: Ref<Room>, x: number, y: number } | undefined>(undefined)
|
export const selectedRoomPlace = writable<{ _id: Ref<Room>, x: number, y: number } | undefined>(undefined)
|
||||||
|
|
||||||
function filterParticipantInfo (value: ParticipantInfo[]): ParticipantInfo[] {
|
function filterParticipantInfo (value: ParticipantInfo[]): ParticipantInfo[] {
|
||||||
|
@ -82,7 +82,7 @@ import { openDoc } from '@hcengineering/view-resources'
|
|||||||
|
|
||||||
import { sendMessage } from './broadcast'
|
import { sendMessage } from './broadcast'
|
||||||
import love from './plugin'
|
import love from './plugin'
|
||||||
import { $myPreferences, currentRoom, meetingMinutesStore, selectedRoomPlace } from './stores'
|
import { $myPreferences, currentRoom, currentMeetingMinutes, selectedRoomPlace } from './stores'
|
||||||
import RoomSettingsPopup from './components/RoomSettingsPopup.svelte'
|
import RoomSettingsPopup from './components/RoomSettingsPopup.svelte'
|
||||||
|
|
||||||
export const selectedCamId = 'selectedDevice_cam'
|
export const selectedCamId = 'selectedDevice_cam'
|
||||||
@ -478,7 +478,7 @@ function closeMeetingMinutes (): void {
|
|||||||
const loc = getCurrentLocation()
|
const loc = getCurrentLocation()
|
||||||
|
|
||||||
if (loc.path[2] === loveId) {
|
if (loc.path[2] === loveId) {
|
||||||
const meetingMinutes = get(meetingMinutesStore)
|
const meetingMinutes = get(currentMeetingMinutes)
|
||||||
const panel = get(panelstore).panel
|
const panel = get(panelstore).panel
|
||||||
const { _id } = panel ?? {}
|
const { _id } = panel ?? {}
|
||||||
|
|
||||||
@ -486,7 +486,7 @@ function closeMeetingMinutes (): void {
|
|||||||
closePanel()
|
closePanel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
meetingMinutesStore.set(undefined)
|
currentMeetingMinutes.set(undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function setCam (value: boolean): Promise<void> {
|
export async function setCam (value: boolean): Promise<void> {
|
||||||
@ -660,13 +660,13 @@ async function openMeetingMinutes (room: Room): Promise<void> {
|
|||||||
{ sid, title: newDoc.title, description: newDoc.description, status: newDoc.status },
|
{ sid, title: newDoc.title, description: newDoc.description, status: newDoc.status },
|
||||||
_id
|
_id
|
||||||
)
|
)
|
||||||
meetingMinutesStore.set(newDoc)
|
currentMeetingMinutes.set(newDoc)
|
||||||
const loc = getCurrentLocation()
|
const loc = getCurrentLocation()
|
||||||
if (loc.path[2] === loveId) {
|
if (loc.path[2] === loveId) {
|
||||||
await openDoc(client.getHierarchy(), newDoc)
|
await openDoc(client.getHierarchy(), newDoc)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
meetingMinutesStore.set(doc)
|
currentMeetingMinutes.set(doc)
|
||||||
const loc = getCurrentLocation()
|
const loc = getCurrentLocation()
|
||||||
if (loc.path[2] === loveId) {
|
if (loc.path[2] === loveId) {
|
||||||
await openDoc(client.getHierarchy(), doc)
|
await openDoc(client.getHierarchy(), doc)
|
||||||
|
Loading…
Reference in New Issue
Block a user