diff --git a/conf/vroom.conf.sample b/conf/vroom.conf.sample index 1ef72b0..853b437 100644 --- a/conf/vroom.conf.sample +++ b/conf/vroom.conf.sample @@ -14,6 +14,7 @@ realm => 'example.com', # Web & contact baseUrl => 'https://vroom.example.com/', emailFrom => 'vroom@example.com', +feedbackRecipient => 'admin@example.com', # Templates to use for web pages template => 'default', # Used to sign cookies diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm index e478d67..0bbbcfb 100644 --- a/lib/Vroom/I18N/en.pm +++ b/lib/Vroom/I18N/en.pm @@ -17,6 +17,14 @@ our %Lexicon = ( "click on this link", "HAVE_A_NICE_MEETING" => "Have a nice meeting :-)", "EMAIL_SIGN" => "VROOM! And video conferencing becomes free, simple and safe", + "FEEDBACK" => "Feedback", + "YOUR_MAIL_OPTIONAL" => "Your email address (optional)", + "COMMENT" => "Comment", + "SUBMIT" => "Submit", + "FEEDBACK_FROM_VROOM" => "VROOM feedback", + "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", diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm index 470eae2..d1b996d 100644 --- a/lib/Vroom/I18N/fr.pm +++ b/lib/Vroom/I18N/fr.pm @@ -18,6 +18,14 @@ our %Lexicon = ( "une webcam. Quand vous êtes prêt, cliquez sur ce lien", "HAVE_A_NICE_MEETING" => "Bonne réunion :-)", "EMAIL_SIGN" => "VROOM! Et la visio conférence devient libre, simple et sûr", + "FEEDBACK" => "Retour d'expérience", + "YOUR_MAIL_OPTIONAL" => "Votre adresse email (optionnelle)", + "COMMENT" => "Commentaire", + "SUBMIT" => "Envoyer", + "FEEDBACK_FROM_VROOM" => "Retour d'expérience de VROOM", + "FROM" => "De la part de", + "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é", diff --git a/public/css/vroom.css b/public/css/vroom.css index 3d0806c..70ac519 100644 --- a/public/css/vroom.css +++ b/public/css/vroom.css @@ -69,6 +69,10 @@ max-width: 500px; margin: auto; } +#feedbackFormContainer { + max-width: 700px; + margin: auto; +} #chatBox { max-height:300px; resize:none; diff --git a/public/vroom.pl b/public/vroom.pl index 57610e3..94bb6d4 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -68,6 +68,7 @@ our $config = plugin Config => { realm => 'vroom', baseUrl => 'https://vroom.example.com/', emailFrom => 'vroom@example.com', + feedbackRecipient => 'admin@example.com', template => 'default', inactivityTimeout => 3600, logLevel => 'info', @@ -226,6 +227,25 @@ get '/about' => sub { get '/help' => 'help'; +get '/feedback' => 'feedback'; +post '/feedback' => sub { + my $self = shift; + my $email = $self->param('email') || ''; + my $comment = $self->param('comment'); + $self->email( + header => [ + Subject => encode("MIME-Header", $self->l("FEEDBACK_FROM_VROOM")), + To => $config->{feedbackRecipient} + ], + data => [ + template => 'feedback', + email => $email, + comment => $comment + ], + ); + $self->redirect_to($self->url_for('/')); +}; + get '/goodby/(:room)' => sub { my $self = shift; my $room = $self->stash('room'); diff --git a/templates/default/feedback.email.ep b/templates/default/feedback.email.ep new file mode 100644 index 0000000..6017ac5 --- /dev/null +++ b/templates/default/feedback.email.ep @@ -0,0 +1,14 @@ + +
+ <%=l 'FROM' %>: <%= $email %> +
++ <%=l 'COMMENT' %>: <%= $comment %> +
+
+ —
+
+ <%=l 'EMAIL_SIGN' %>
+
<%=l 'THANKS_FOR_USING' %>
- +