mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-09 09:20:54 +00:00
Add ability to enable camera in personal office
The camera in the personal office is turned off by default, but users now have the option to enable it in their office Signed-off-by: Anton Alexeyev <alexeyev.anton@gmail.com>
This commit is contained in:
parent
95a2ba3aed
commit
3aba55d024
@ -96,7 +96,10 @@ export class TRoom extends TDoc implements Room {
|
||||
@Index(IndexKind.FullText)
|
||||
description!: MarkupBlobRef | null
|
||||
|
||||
type!: RoomType
|
||||
@Prop(TypeAny(love.component.RoomTypePresenter, love.string.Video), love.string.Video, {
|
||||
editor: love.component.RoomTypePresenter
|
||||
})
|
||||
type!: RoomType
|
||||
|
||||
access!: RoomAccess
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { EditBox, ModernButton } from '@hcengineering/ui'
|
||||
import { Room, isOffice, type ParticipantInfo } from '@hcengineering/love'
|
||||
import { EditBox, Icon, ModernButton } from '@hcengineering/ui'
|
||||
import { Room, isOffice, type ParticipantInfo, RoomType } from '@hcengineering/love'
|
||||
import { createEventDispatcher, onMount } from 'svelte'
|
||||
import { personByIdStore } from '@hcengineering/contact-resources'
|
||||
import { IntlString } from '@hcengineering/platform'
|
||||
@ -95,6 +95,7 @@
|
||||
|
||||
<div class="flex-row-stretch">
|
||||
<div class="row flex-grow">
|
||||
<Icon icon={object.type === RoomType.Video ? love.icon.CamEnabled : love.icon.CamDisabled} size={'small'} />
|
||||
<div class="name">
|
||||
<EditBox disabled={true} placeholder={love.string.Room} bind:value={roomName} focusIndex={1} />
|
||||
</div>
|
||||
|
@ -0,0 +1,46 @@
|
||||
<!--
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Office, Room, RoomType } from '@hcengineering/love'
|
||||
import { BooleanEditor } from '@hcengineering/view-resources'
|
||||
import { getCurrentEmployee } from '@hcengineering/contact'
|
||||
import type { ButtonKind, ButtonSize } from '@hcengineering/ui'
|
||||
|
||||
export let object: Room | undefined
|
||||
export let value: RoomType | undefined
|
||||
export let onChange: (value: any) => void
|
||||
export let kind: ButtonKind = 'no-border'
|
||||
export let size: ButtonSize = 'small'
|
||||
export let justify: 'left' | 'center' = 'center'
|
||||
export let width: string | undefined = 'fit-content'
|
||||
|
||||
$: booleanValue = value === RoomType.Video
|
||||
$: disabled = object === undefined || !('person' in object) || (object as Office).person !== getCurrentEmployee()
|
||||
|
||||
function onValueChanged (newValue: any): void {
|
||||
onChange(newValue === true ? RoomType.Video : RoomType.Audio)
|
||||
}
|
||||
</script>
|
||||
|
||||
<BooleanEditor
|
||||
{disabled}
|
||||
{kind}
|
||||
{size}
|
||||
{justify}
|
||||
{width}
|
||||
value={booleanValue}
|
||||
withoutUndefined={true}
|
||||
onChange={onValueChanged}
|
||||
/>
|
@ -28,6 +28,7 @@ import MediaPopupItemExt from './components/MediaPopupItemExt.svelte'
|
||||
import SharingStateIndicator from './components/SharingStateIndicator.svelte'
|
||||
import MeetingScheduleData from './components/MeetingScheduleData.svelte'
|
||||
import EditMeetingScheduleData from './components/EditMeetingScheduleData.svelte'
|
||||
import RoomTypePresenter from './components/RoomTypePresenter.svelte'
|
||||
|
||||
import {
|
||||
copyGuestLink,
|
||||
@ -71,7 +72,8 @@ export default async (): Promise<Resources> => ({
|
||||
MediaPopupItemExt,
|
||||
SharingStateIndicator,
|
||||
MeetingScheduleData,
|
||||
EditMeetingScheduleData
|
||||
EditMeetingScheduleData,
|
||||
RoomTypePresenter
|
||||
},
|
||||
function: {
|
||||
CreateMeeting: createMeeting,
|
||||
|
@ -36,7 +36,8 @@ export default mergeIds(loveId, love, {
|
||||
MeetingMinutesDocEditor: '' as AnyComponent,
|
||||
MeetingMinutesStatusPresenter: '' as AnyComponent,
|
||||
MeetingScheduleData: '' as AnyComponent,
|
||||
EditMeetingScheduleData: '' as AnyComponent
|
||||
EditMeetingScheduleData: '' as AnyComponent,
|
||||
RoomTypePresenter: '' as AnyComponent
|
||||
},
|
||||
function: {
|
||||
CreateMeeting: '' as Resource<DocCreateFunction>,
|
||||
|
Loading…
Reference in New Issue
Block a user