[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBERF-7090: Add Office plugins #5725

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
uberf-7090: add service not configured
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
  • Loading branch information
lexiv0re committed Jun 4, 2024
commit 5a6b383297a1dddb43150ba5e9163c8998c1c2f8
3 changes: 2 additions & 1 deletion plugins/love-assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"CopyGuestLink": "Copy guest link",
"Record": "Record",
"StopRecord": "Stop record",
"LeaveRoomConfirmation": "Are you sure you want to leave the room?"
"LeaveRoomConfirmation": "Are you sure you want to leave the room?",
"ServiceNotConfigured": "Service is not configured"
}
}
3 changes: 2 additions & 1 deletion plugins/love-assets/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"CopyGuestLink": "Copiar enlace de invitado",
"Record": "Grabar",
"StopRecord": "Detener grabación",
"LeaveRoomConfirmation": "¿Estás seguro de que quieres salir de la sala?"
"LeaveRoomConfirmation": "¿Estás seguro de que quieres salir de la sala?",
"ServiceNotConfigured": "El servicio no está configurado"
}
}
3 changes: 2 additions & 1 deletion plugins/love-assets/lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"CopyGuestLink": "Copiar link de convidado",
"Record": "Gravar",
"StopRecord": "Parar gravação",
"LeaveRoomConfirmation": "Tem certeza de que deseja sair da sala?"
"LeaveRoomConfirmation": "Tem certeza de que deseja sair da sala?",
"ServiceNotConfigured": "O serviço não está configurado"
}
}
3 changes: 2 additions & 1 deletion plugins/love-assets/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"CopyGuestLink": "Скопировать гостевую ссылку",
"Record": "Запись",
"StopRecord": "Остановить запись",
"LeaveRoomConfirmation": "Вы уверены, что хотите покинуть комнату?"
"LeaveRoomConfirmation": "Вы уверены, что хотите покинуть комнату?",
"ServiceNotConfigured": "Сервис не настроен"
}
}
15 changes: 15 additions & 0 deletions plugins/love-resources/src/components/Room.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import { Ref } from '@hcengineering/core'
import { Label, Loading, deviceOptionsStore as deviceInfo } from '@hcengineering/ui'
import { Room as TypeRoom } from '@hcengineering/love'
import { getMetadata } from '@hcengineering/platform'
import {
LocalParticipant,
LocalTrackPublication,
Expand Down Expand Up @@ -185,6 +186,7 @@
}

let loading: boolean = false
let configured: boolean = false

function handleLocalTrackUnsubscribed (publication: LocalTrackPublication, participant: LocalParticipant): void {
if (publication?.track?.kind === Track.Kind.Video) {
Expand All @@ -203,6 +205,15 @@

onMount(async () => {
loading = true

const wsURL = getMetadata(love.metadata.WebSocketURL)

if (wsURL === undefined) {
return
}

configured = true

await awaitConnect()
for (const participant of lk.remoteParticipants.values()) {
attachParticipant(participant)
Expand Down Expand Up @@ -288,6 +299,10 @@
<div class="flex justify-center error h-full w-full clear-mins">
<Label label={love.string.AnotherWindowError} />
</div>
{:else if !configured}
<div class="flex justify-center error h-full w-full clear-mins">
<Label label={love.string.ServiceNotConfigured} />
</div>
{:else if loading}
<Loading />
{/if}
Expand Down
3 changes: 2 additions & 1 deletion plugins/love-resources/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default mergeIds(loveId, love, {
GuestLink: '' as IntlString,
CopyGuestLink: '' as IntlString,
Record: '' as IntlString,
StopRecord: '' as IntlString
StopRecord: '' as IntlString,
ServiceNotConfigured: '' as IntlString
}
})
4 changes: 2 additions & 2 deletions plugins/love-resources/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ export async function record (room: Room): Promise<void> {
}
}

export async function chechRecordAvailable (): Promise<void> {
export async function checkRecordAvailable (): Promise<void> {
try {
const endpoint = getMetadata(love.metadata.ServiceEnpdoint)
if (endpoint === undefined) {
Expand All @@ -707,4 +707,4 @@ export async function chechRecordAvailable (): Promise<void> {
}
}

void chechRecordAvailable()
void checkRecordAvailable()