diff --git a/models/love/src/index.ts b/models/love/src/index.ts index 9457c67b8b..729fbf08d7 100644 --- a/models/love/src/index.ts +++ b/models/love/src/index.ts @@ -58,7 +58,8 @@ import { TypeDate, TypeRef, TypeString, - UX + UX, + TypeBoolean } from '@hcengineering/model' import calendar, { TEvent } from '@hcengineering/model-calendar' import core, { TAttachedDoc, TDoc } from '@hcengineering/model-core' @@ -106,9 +107,14 @@ export class TRoom extends TDoc implements Room { x!: number y!: number - language!: RoomLanguage - startWithTranscription!: boolean - startWithRecording!: boolean + @Prop(TypeString(), love.string.Language, { editor: love.component.RoomLanguageEditor }) + language!: RoomLanguage + + @Prop(TypeBoolean(), love.string.StartWithTranscription) + startWithTranscription!: boolean + + @Prop(TypeBoolean(), love.string.StartWithRecording) + startWithRecording!: boolean @Prop(Collection(attachment.class.Attachment), attachment.string.Attachments, { shortLabel: attachment.string.Files }) attachments?: number diff --git a/models/love/src/plugin.ts b/models/love/src/plugin.ts index ef026ba0cf..1829a21dfd 100644 --- a/models/love/src/plugin.ts +++ b/models/love/src/plugin.ts @@ -28,7 +28,8 @@ export default mergeIds(loveId, love, { Settings: '' as AnyComponent, LoveWidget: '' as AnyComponent, MeetingWidget: '' as AnyComponent, - WidgetSwitcher: '' as AnyComponent + WidgetSwitcher: '' as AnyComponent, + RoomLanguageEditor: '' as AnyComponent }, app: { Love: '' as Ref diff --git a/plugins/activity-resources/src/components/doc-update-message/DocUpdateMessageContent.svelte b/plugins/activity-resources/src/components/doc-update-message/DocUpdateMessageContent.svelte index 222306696f..12374e95e9 100644 --- a/plugins/activity-resources/src/components/doc-update-message/DocUpdateMessageContent.svelte +++ b/plugins/activity-resources/src/components/doc-update-message/DocUpdateMessageContent.svelte @@ -63,6 +63,7 @@ {#each createMessages as valueMessage, index} , _class: Ref>): Promise { - const isRemoved = await checkIsObjectRemoved(client, _id, _class) + async function loadObject (_id: Ref, _class: Ref>, attachedTo: Ref): Promise { + const isRemoved = attachedTo === _id ? false : await checkIsObjectRemoved(client, _id, _class) if (isRemoved) { object = await buildRemovedDoc(client, _id, _class) @@ -64,7 +65,7 @@ } } - $: void loadObject(objectId, objectClass) + $: void loadObject(objectId, objectClass, attachedTo) function getPanelComponent (object: Doc, objectPanel?: ObjectPanel): AnyComponent { if (objectPanel !== undefined) { diff --git a/plugins/love-assets/lang/cs.json b/plugins/love-assets/lang/cs.json index 54f410c561..6c86bad07f 100644 --- a/plugins/love-assets/lang/cs.json +++ b/plugins/love-assets/lang/cs.json @@ -78,6 +78,7 @@ "Status": "Stav", "Active": "Aktivní", "Finished": "Dokončeno", - "StartWithRecording": "Začít s nahráváním" + "StartWithRecording": "Začít s nahráváním", + "Language": "Jazyk" } } \ No newline at end of file diff --git a/plugins/love-assets/lang/en.json b/plugins/love-assets/lang/en.json index cfa427d098..22cc2923a9 100644 --- a/plugins/love-assets/lang/en.json +++ b/plugins/love-assets/lang/en.json @@ -78,6 +78,7 @@ "Status": "Status", "Active": "Active", "Finished": "Finished", - "StartWithRecording": "Start with recording" + "StartWithRecording": "Start with recording", + "Language": "Language" } } diff --git a/plugins/love-assets/lang/es.json b/plugins/love-assets/lang/es.json index 58b63972be..8a50a54be6 100644 --- a/plugins/love-assets/lang/es.json +++ b/plugins/love-assets/lang/es.json @@ -78,6 +78,7 @@ "Status": "Estado", "Active": "Activo", "Finished": "Terminado", - "StartWithRecording": "Iniciar con grabación" + "StartWithRecording": "Iniciar con grabación", + "Language": "Idioma" } } diff --git a/plugins/love-assets/lang/fr.json b/plugins/love-assets/lang/fr.json index 736318a6a3..1c93c733a0 100644 --- a/plugins/love-assets/lang/fr.json +++ b/plugins/love-assets/lang/fr.json @@ -78,6 +78,7 @@ "Status": "Statut", "Active": "Actif", "Finished": "Terminé", - "StartWithRecording": "Démarrer avec l'enregistrement" + "StartWithRecording": "Démarrer avec l'enregistrement", + "Language": "Langue" } } \ No newline at end of file diff --git a/plugins/love-assets/lang/it.json b/plugins/love-assets/lang/it.json index 7463abbfb0..aa569589fd 100644 --- a/plugins/love-assets/lang/it.json +++ b/plugins/love-assets/lang/it.json @@ -78,6 +78,7 @@ "Status": "Stato", "Active": "Attivo", "Finished": "Finito", - "StartWithRecording": "Inizia con la registrazione" + "StartWithRecording": "Inizia con la registrazione", + "Language": "Lingua" } } diff --git a/plugins/love-assets/lang/pt.json b/plugins/love-assets/lang/pt.json index 97412fb5c5..28491c92a8 100644 --- a/plugins/love-assets/lang/pt.json +++ b/plugins/love-assets/lang/pt.json @@ -78,6 +78,7 @@ "Status": "Estado", "Active": "Ativo", "Finished": "Finalizado", - "StartWithRecording": "Começar com gravação" + "StartWithRecording": "Começar com gravação", + "Language": "Idioma" } } diff --git a/plugins/love-assets/lang/ru.json b/plugins/love-assets/lang/ru.json index 124e1647d1..95ecdf8082 100644 --- a/plugins/love-assets/lang/ru.json +++ b/plugins/love-assets/lang/ru.json @@ -78,6 +78,7 @@ "Status": "Статус", "Active": "Активно", "Finished": "Завершено", - "StartWithRecording": "Начинать с записью" + "StartWithRecording": "Начинать с записью", + "Language": "Язык" } } diff --git a/plugins/love-assets/lang/zh.json b/plugins/love-assets/lang/zh.json index 4902ff5397..a665270a73 100644 --- a/plugins/love-assets/lang/zh.json +++ b/plugins/love-assets/lang/zh.json @@ -78,6 +78,7 @@ "Status": "状态", "Active": "活动", "Finished": "已完成", - "StartWithRecording": "开始录制" + "StartWithRecording": "开始录制", + "Language": "语言" } } diff --git a/plugins/love-resources/src/components/FloorAttributePresenter.svelte b/plugins/love-resources/src/components/FloorAttributePresenter.svelte index a98dc53262..5dc48a6f65 100644 --- a/plugins/love-resources/src/components/FloorAttributePresenter.svelte +++ b/plugins/love-resources/src/components/FloorAttributePresenter.svelte @@ -29,7 +29,7 @@ {#if inline} {:else} -
+
{floor.name}
{/if} diff --git a/plugins/love-resources/src/components/RoomLanguage.svelte b/plugins/love-resources/src/components/RoomLanguage.svelte index 9bcac4bed6..350ef30e27 100644 --- a/plugins/love-resources/src/components/RoomLanguage.svelte +++ b/plugins/love-resources/src/components/RoomLanguage.svelte @@ -18,10 +18,14 @@ import { languagesDisplayData } from '../types' export let room: Room + export let withLabel = false $: lang = room.language {languagesDisplayData[lang].emoji ?? languagesDisplayData.en.emoji} + {#if withLabel} + {languagesDisplayData[lang].label ?? languagesDisplayData.en.label} + {/if} diff --git a/plugins/love-resources/src/components/RoomLanguageEditor.svelte b/plugins/love-resources/src/components/RoomLanguageEditor.svelte new file mode 100644 index 0000000000..274724a88e --- /dev/null +++ b/plugins/love-resources/src/components/RoomLanguageEditor.svelte @@ -0,0 +1,67 @@ + + +{#if object} + +{/if} diff --git a/plugins/love-resources/src/index.ts b/plugins/love-resources/src/index.ts index c06f50ae41..fd308ddb50 100644 --- a/plugins/love-resources/src/index.ts +++ b/plugins/love-resources/src/index.ts @@ -23,6 +23,7 @@ import PanelControlBar from './components/PanelControlBar.svelte' import RoomPresenter from './components/RoomPresenter.svelte' import MeetingMinutesDocEditor from './components/MeetingMinutesDocEditor.svelte' import MeetingMinutesStatusPresenter from './components/MeetingMinutesStatusPresenter.svelte' +import RoomLanguageEditor from './components/RoomLanguageEditor.svelte' import { copyGuestLink, @@ -59,7 +60,8 @@ export default async (): Promise => ({ PanelControlBar, RoomPresenter, MeetingMinutesDocEditor, - MeetingMinutesStatusPresenter + MeetingMinutesStatusPresenter, + RoomLanguageEditor }, function: { CreateMeeting: createMeeting, diff --git a/plugins/love-resources/src/plugin.ts b/plugins/love-resources/src/plugin.ts index b74e0c9cd1..90cd754245 100644 --- a/plugins/love-resources/src/plugin.ts +++ b/plugins/love-resources/src/plugin.ts @@ -94,6 +94,7 @@ export default mergeIds(loveId, love, { KnockAction: '' as IntlString, Select: '' as IntlString, ChooseShare: '' as IntlString, - MoreOptions: '' as IntlString + MoreOptions: '' as IntlString, + Language: '' as IntlString } }) diff --git a/plugins/view-resources/src/components/ParentsNavigator.svelte b/plugins/view-resources/src/components/ParentsNavigator.svelte index 51f46a4898..bc505ef18b 100644 --- a/plugins/view-resources/src/components/ParentsNavigator.svelte +++ b/plugins/view-resources/src/components/ParentsNavigator.svelte @@ -13,7 +13,7 @@ // limitations under the License. --> -{#await getParents(element) then parents} - -{/await} +