Only one Sighnstation can connect
This commit is contained in:
@@ -38,7 +38,14 @@ function connectWebSocket() {
|
||||
ws.onmessage = async (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
|
||||
if (data.type === 'pdf') {
|
||||
if (data.type === 'already_connected') {
|
||||
console.log('⚠️ Bereits eine andere Signatur-Station verbunden');
|
||||
// Show warning message
|
||||
const warning = document.getElementById('alreadyConnectedWarning');
|
||||
if (warning) {
|
||||
warning.style.display = 'block';
|
||||
}
|
||||
} else if (data.type === 'pdf') {
|
||||
console.log('PDF empfangen');
|
||||
currentPdf = new Uint8Array(data.pdf);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user