|
|
@ -2022,12 +2022,12 @@ function initVroom(room) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// Handle auth to become room owner
|
|
|
|
// Handle auth to become room owner
|
|
|
|
$('#authPass').on('input', function() { |
|
|
|
$('#ownerAuthPass').on('input', function() { |
|
|
|
if ($('#authPass').val() === ''){ |
|
|
|
if ($('#ownerAuthPass').val() === ''){ |
|
|
|
$('#authPassButton').addClass('disabled'); |
|
|
|
$('#ownerAuthButton').attr('disabled', 'disabled'); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
else{ |
|
|
|
$('#authPassButton').removeClass('disabled'); |
|
|
|
$('#ownerAuthButton').removeAttr('disabled'); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
$('#ownerAuthForm').submit(function(event) { |
|
|
|
$('#ownerAuthForm').submit(function(event) { |
|
|
@ -2040,15 +2040,16 @@ function initVroom(room) { |
|
|
|
room: roomName |
|
|
|
room: roomName |
|
|
|
}, |
|
|
|
}, |
|
|
|
function(data){ |
|
|
|
function(data){ |
|
|
|
$('#authPass').val(''); |
|
|
|
$('#ownerAuthPass').val(''); |
|
|
|
$('#ownerAuthModal').modal('hide'); |
|
|
|
|
|
|
|
if (data.role === 'owner'){ |
|
|
|
if (data.role === 'owner'){ |
|
|
|
getPeerRole(peers.local.id); |
|
|
|
getPeerRole(peers.local.id); |
|
|
|
$('#joinPassFields,#ownerPassFields').hide(); |
|
|
|
$('#joinPassFields,#ownerPassFields').hide(); |
|
|
|
|
|
|
|
$('#ownerAuthModal').modal('hide'); |
|
|
|
$.notify(data.msg, 'success'); |
|
|
|
$.notify(data.msg, 'success'); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
else{ |
|
|
|
$.notify(localize('WRONG_PASSWORD'), 'error'); |
|
|
|
$.notify(localize('WRONG_PASSWORD'), 'error'); |
|
|
|
|
|
|
|
$('#ownerAuthButton').attr('disabled', 'disabled'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|