diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm index d442eed..7d87db0 100644 --- a/lib/Vroom/I18N/en.pm +++ b/lib/Vroom/I18N/en.pm @@ -31,11 +31,7 @@ our %Lexicon = ( "FROM" => "From", "GIVE_US_YOUR_FEEDBACK" => "Give us your feedback", "YOUR_FEEDBACK_HELPS_US" => "Your feedback (good or bad) can help us improve this application", - "ROOM_LOCKED" => "This room is now locked", - "ROOM_UNLOCKED" => "This room is now unlocked", "ONE_OF_THE_PEERS" => "one of the peers", - "ROOM_LOCKED_BY_s" => "%s locked the room", - "ROOM_UNLOCKED_BY_s" => "%s unlocked the room", "PASSWORD_PROTECT_ON_BY_s" => "%s password protected the room", "PASSWORD_PROTECT_OFF_BY_s" => "%s removed password protection", "OOOPS" => "Ooops", diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm index 312f54c..fc37780 100644 --- a/lib/Vroom/I18N/fr.pm +++ b/lib/Vroom/I18N/fr.pm @@ -34,11 +34,7 @@ our %Lexicon = ( "GIVE_US_YOUR_FEEDBACK" => "Parlez-nous de votre expérience", "YOUR_FEEDBACK_HELPS_US" => "Votre retour d'expérience (bonne ou mauvaise) peut nous aider à améliorer cette application", "INVITE_SENT_TO_s" => "Une invitation a été envoyée à %s", - "ROOM_LOCKED" => "Ce salon est maintenant verrouillé", - "ROOM_UNLOCKED" => "Ce salon est maintenant déverrouillé", "ONE_OF_THE_PEERS" => "un des participants", - "ROOM_LOCKED_BY_s" => "%s a verrouillé le salon", - "ROOM_UNLOCKED_BY_s" => "%s a déverrouillé le salon", "PASSWORD_PROTECT_ON_BY_s" => "%s a protégé le salon par un mot de passe", "PASSWORD_PROTECT_OFF_BY_s" => "%s a supprimé la protection par mot de passe", "OOOPS" => "Oups", diff --git a/public/js/vroom.js b/public/js/vroom.js index cfb55a7..9791283 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -25,8 +25,6 @@ var locale = { CAM_RESUMED: '', SET_YOUR_NAME_TO_CHAT: '', ONE_OF_THE_PEERS: '', - ROOM_LOCKED_BY_s: '', - ROOM_UNLOCKED_BY_s: '', PASSWORD_PROTECT_ON_BY_s: '', PASSWORD_PROTECT_OFF_BY_s: '', CANT_SEND_TO_s: '', @@ -420,16 +418,6 @@ function initVroom(room) { $(el).remove(); }); - webrtc.on('room_locked', function(data){ - $('#lockLabel').addClass('btn-danger active'); - $.notify(sprintf(locale.ROOM_LOCKED_BY_s, stringEscape(peers[data.id].displayName)), 'info'); - }); - - webrtc.on('room_unlocked', function(data){ - $('#lockLabel').removeClass('btn-danger active'); - $.notify(sprintf(locale.ROOM_UNLOCKED_BY_s, stringEscape(peers[data.id].displayName)), 'info'); - }); - webrtc.on('password_protect_on', function(data){ $.notify(sprintf(locale.PASSWORD_PROTECT_ON_BY_s, stringEscape(peers[data.id].displayName)), 'info'); }); @@ -523,32 +511,6 @@ function initVroom(room) { webrtc.sendDirectlyToAll('vroom', 'setDisplayName', $('#displayName').val()); }); - // Handle room lock/unlock - $('#lockButton').change(function() { - var action = ($(this).is(":checked")) ? 'lock':'unlock'; - $.ajax({ - data: { - action: action, - room: roomName - }, - error: function(data) { - var msg = (data && data.msg) ? data.msg : locale.ERROR_OCCURED; - $.notify(msg, 'error'); - }, - success: function(data) { - $.notify(data.msg, 'info'); - if (action === 'lock'){ - $("#lockLabel").addClass('btn-danger'); - webrtc.sendToAll('room_locked', {}); - } - else{ - $("#lockLabel").removeClass('btn-danger'); - webrtc.sendToAll('room_unlocked', {}); - } - } - }); - }); - // ScreenSharing $('#shareScreenButton').change(function() { var action = ($(this).is(":checked")) ? 'share':'unshare'; diff --git a/public/vroom.pl b/public/vroom.pl index 4c4771a..cfb729e 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -417,8 +417,7 @@ get '/(*room)' => sub { room => $room ); } - $self->stash(locked => $data->{locked} ? 'checked':'', - turnPassword => $data->{token}); + $self->stash(turnPassword => $data->{token}); $self->render('join'); }; @@ -467,32 +466,6 @@ post '/action' => sub { } ); } - if ($action =~ m/(un)?lock/){ - my ($lock,$success); - if ($action eq 'lock'){ - $lock = 1; - $success = $self->l('ROOM_LOCKED'); - } - else{ - $lock = 0; - $success = $self->l('ROOM_UNLOCKED'); - } - my $room = $self->param('room'); - my $res = $self->lock_room($room,$lock); - unless ($res){ - return $self->render( - json => { - msg => $self->l('ERROR_OCCURED'), - }, - status => '500' - ); - } - return $self->render( - json => { - msg => $success, - } - ); - } elsif ($action eq 'ping'){ my $res = $self->ping_room($room); # Cleanup expired rooms every ~10 pings diff --git a/templates/default/join.html.ep b/templates/default/join.html.ep index ac51bd2..a442098 100644 --- a/templates/default/join.html.ep +++ b/templates/default/join.html.ep @@ -104,22 +104,6 @@ -
  • -
  • -
  • - -