Skip to content

Commit

Permalink
Merge branch 'master' into l10n_master
Browse files Browse the repository at this point in the history
  • Loading branch information
holema authored Nov 19, 2024
2 parents 2886a6c + caaf7f8 commit 568b8ec
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 35 deletions.
4 changes: 1 addition & 3 deletions assets/js/confirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function initDirectSend() {
if (e.target.matches('.directSend')) {
e.preventDefault();
var url = e.target.href;
var targetUrl = e.target.dataset.url;
var target = e.target.dataset.target;

fetch(url)
Expand Down Expand Up @@ -96,7 +95,6 @@ function initConfirmDirectSendHref() {
if (e.target.matches('.directSendWithConfirm')) {
e.preventDefault();
const url = e.target.href;
const targetUrl = e.target.dataset.url;
const target = e.target.dataset.target;
const text = e.target.dataset.text || 'Wollen Sie die Aktion durchführen?';

Expand All @@ -111,7 +109,7 @@ function initConfirmDirectSendHref() {
confirmButton: 'btn-danger btn',
cancelButton: 'btn-outline-primary btn'
}
}).then((resul) => {
}).then((result) => {
if (result.isConfirmed) {
fetch(url)
.then(response => response.text())
Expand Down
1 change: 1 addition & 0 deletions assets/js/livekit/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class livekitApi {
this.iframe.style.height = "100%";

this.iframe.allow = "autoplay; camera; clipboard-write; compute-pressure; display-capture; hid; microphone; screen-wake-lock; speaker-selection";
this.iframe.sandbox = "allow-same-origin allow-popups-to-escape-sandbox allow-scripts allow-storage-access-by-user-activation allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-presentation";
// Das iframe in das parentElement einfügen
document.getElementById(this.parentElement).appendChild(this.iframe);

Expand Down
41 changes: 23 additions & 18 deletions assets/js/serverSettings.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@

import * as mdb from 'mdb-ui-kit'; // lib
export function showAppIdSettings() {
document.getElementById('jwtServer').addEventListener('change',(e)=>{
const element = document.getElementById('appId')
const instance = new mdb.Collapse(element)
if (e.target.checked) {
instance.show();
} else {
instance.hide();
}
})
if (document.getElementById('jwtServer')){
document.getElementById('jwtServer').addEventListener('change',(e)=>{
const element = document.getElementById('appId')
const instance = new mdb.Collapse(element)
if (e.target.checked) {
instance.show();
} else {
instance.hide();
}
})
}

}
export function showLiveKitServerSettings(){
if (document.getElementById('server_liveKitServer')){
document.getElementById('server_liveKitServer').addEventListener('change', function () {
if (document.getElementById('server_liveKitServer').checked) {
document.getElementById('jitsiMeetSettings').classList.add('d-none');
document.getElementById('liveKitServerSettings').classList.remove('d-none');
} else {
document.getElementById('jitsiMeetSettings').classList.remove('d-none');
document.getElementById('liveKitServerSettings').classList.add('d-none');
}
});
}

document.getElementById('server_liveKitServer').addEventListener('change', function () {
if (document.getElementById('server_liveKitServer').checked) {
document.getElementById('jitsiMeetSettings').classList.add('d-none');
document.getElementById('liveKitServerSettings').classList.remove('d-none');
} else {
document.getElementById('jitsiMeetSettings').classList.remove('d-none');
document.getElementById('liveKitServerSettings').classList.add('d-none');
}
});
}

5 changes: 3 additions & 2 deletions src/MessageHandler/CustomMailerMessageDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mailer\Transport;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;

class CustomMailerMessageDispatcher implements MessageHandlerInterface
#[AsMessageHandler]
class CustomMailerMessageDispatcher
{
public function __construct(
private MailerInterface $mailer,
Expand Down
5 changes: 3 additions & 2 deletions src/MessageHandler/LobbyLeaverMessageDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
use App\Service\Lobby\ToModeratorWebsocketService;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;

class LobbyLeaverMessageDispatcher implements MessageHandlerInterface
#[AsMessageHandler]
class LobbyLeaverMessageDispatcher
{
private LoggerInterface $logger;
private $toModerator;
Expand Down
7 changes: 1 addition & 6 deletions src/Service/ThemeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,7 @@ public function getThemeProperty($property)
{
$theme = $this->getTheme();
if ($theme) {
try {
$property = $theme[$property];
return $property;
} catch (\Exception $e) {
return null;
}
return $theme[$property] ?? null;
}
return null;
}
Expand Down
23 changes: 19 additions & 4 deletions src/Service/caller/JitsiComponentSelectorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,26 @@ public function __construct(
{
$this->baseUrl = null;
$dir = $this->kernel->getProjectDir();

$this->kid = $this->parameterBag->get('JITSI_COMPONENT_SELECTOR_JWT_KID');
$privateKey = $dir . $this->parameterBag->get('JITSI_COMPONENT_SELECTOR_PRIVATE_PATH') . hash('sha256', $this->kid) . '.key';
$this->privateKey = file_get_contents(str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $privateKey));
$publicKey = $dir . $this->parameterBag->get('JITSI_COMPONENT_SELECTOR_PUBLIC_PATH') . hash('sha256', $this->kid) . '.pem';
$this->publicKey = file_get_contents(str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $publicKey));
$privateKeyPath = $dir . $this->parameterBag->get('JITSI_COMPONENT_SELECTOR_PRIVATE_PATH') . hash('sha256', $this->kid) . '.key';
$publicKeyPath = $dir . $this->parameterBag->get('JITSI_COMPONENT_SELECTOR_PUBLIC_PATH') . hash('sha256', $this->kid) . '.pem';

// Replace directory separators for cross-platform compatibility
$privateKeyPath = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $privateKeyPath);
$publicKeyPath = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $publicKeyPath);

// Check if the private key file exists
if (file_exists($privateKeyPath)) {
$this->privateKey = file_get_contents($privateKeyPath);
}

// Check if the public key file exists
if (file_exists($publicKeyPath)) {
$this->publicKey = file_get_contents($publicKeyPath);
}



}

Expand Down

0 comments on commit 568b8ec

Please sign in to comment.