diff --git a/pb/src/client_container.proto b/pb/src/client_container.proto index fb9fe0c5b..7c318c459 100644 --- a/pb/src/client_container.proto +++ b/pb/src/client_container.proto @@ -28,6 +28,8 @@ message ClientMessage { MUSICIAN_SESSION_FRESH = 115; MUSICIAN_SESSION_STALE = 116; HEARTBEAT_ACK = 117; + JOIN_REQUEST_APPROVED = 118; + JOIN_REQUEST_REJECTED = 119; TEST_SESSION_MESSAGE = 200; @@ -72,6 +74,8 @@ message ClientMessage { optional MusicianSessionFresh musician_session_fresh = 115; optional MusicianSessionStale musician_session_stale = 116; optional HeartbeatAck heartbeat_ack = 117; + optional JoinRequestAccepted join_request_accepted = 118; + optional JoinRequestRejected join_request_rejected = 119; // Client-Session messages (to/from) optional TestSessionMessage test_session_message = 200; @@ -199,6 +203,18 @@ message JoinRequest { optional string text = 3; } +message JoinRequestAccepted { + optional string join_request_id = 1; + optional string username = 2; + optional string text = 3; +} + +message JoinRequest { + optional string join_request_id = 1; + optional string username = 2; + optional string text = 3; +} + // route_to: session // a test message used by ruby-client currently. just gives way to send out to rest of session message TestSessionMessage { diff --git a/ruby/lib/jam_ruby/constants/notification_types.rb b/ruby/lib/jam_ruby/constants/notification_types.rb index 6d0f98eeb..dd75281b2 100644 --- a/ruby/lib/jam_ruby/constants/notification_types.rb +++ b/ruby/lib/jam_ruby/constants/notification_types.rb @@ -9,6 +9,9 @@ module NotificationTypes # session notifications SESSION_INVITATION = "SESSION_INVITATION" SESSION_ENDED = "SESSION_ENDED" # used to remove session-related notification from sidebar + JOIN_REQUEST = "JOIN_REQUEST" + JOIN_REQUEST_APPROVED = "JOIN_REQUEST_APPROVED" + JOIN_REQUEST_REJECTED = "JOIN_REQUEST_REJECTED" # musician notifications MUSICIAN_SESSION_JOIN = "MUSICIAN_SESSION_JOIN" diff --git a/ruby/lib/jam_ruby/models/notification.rb b/ruby/lib/jam_ruby/models/notification.rb index c0f54bf97..586b43803 100644 --- a/ruby/lib/jam_ruby/models/notification.rb +++ b/ruby/lib/jam_ruby/models/notification.rb @@ -109,27 +109,34 @@ module JamRuby end def format_msg(description, user) + name = "" + unless user.nil? + name = user.name + else + name = "Someone" + end + case description when NotificationTypes::FRIEND_UPDATE - return "#{user.name} is now " + return "#{name} is now " when NotificationTypes::FRIEND_REQUEST - return "#{user.name} has sent you a friend request." + return "#{name} has sent you a friend request." when NotificationTypes::FRIEND_REQUEST_ACCEPTED - return "#{user.name} has accepted your friend request." + return "#{name} has accepted your friend request." when NotificationTypes::FRIEND_SESSION_JOIN - return "#{user.name} has joined the session." + return "#{name} has joined the session." when NotificationTypes::MUSICIAN_SESSION_JOIN - return "#{user.name} has joined the session." + return "#{name} has joined the session." when NotificationTypes::MUSICIAN_SESSION_DEPART - return "#{user.name} has left the session." + return "#{name} has left the session." when NotificationTypes::SESSION_INVITATION - return "#{user.name} has invited you to a session." + return "#{name} has invited you to a session." # when "social_media_friend_joined" # when "join_request_approved" diff --git a/web/app/assets/javascripts/session.js b/web/app/assets/javascripts/session.js index 00924ef5a..ea5f54efe 100644 --- a/web/app/assets/javascripts/session.js +++ b/web/app/assets/javascripts/session.js @@ -171,7 +171,6 @@ } function sessionChanged() { - logger.debug("sessionChanged()"); // TODO - in the specific case of a user changing their tracks using the configureTrack dialog, // this event appears to fire before the underlying mixers have updated. I have no event to @@ -212,7 +211,6 @@ } function _initDialogs() { - logger.debug("Calling _initDialogs"); configureTrackDialog.initialize(); addTrackDialog.initialize(); addNewGearDialog.initialize(); @@ -437,8 +435,6 @@ }); }); - logger.debug("416-myTracks.length=" + myTracks.length); - configureTrackDialog = new context.JK.ConfigureTrackDialog(app, myTracks, sessionId, sessionModel); addTrackDialog = new context.JK.AddTrackDialog(app, myTracks, sessionId, sessionModel); addNewGearDialog = new context.JK.AddNewGearDialog(app, ftueCallback); @@ -673,7 +669,6 @@ function deleteTrack(evt) { var trackId = $(evt.currentTarget).attr("track-id"); sessionModel.deleteTrack(sessionId, trackId); - logger.debug("643-myTracks.length=" + myTracks.length); } function _toggleVisualMuteControl($control, muting) { diff --git a/web/app/assets/stylesheets/client/session.css.scss b/web/app/assets/stylesheets/client/session.css.scss index fcd27f93b..f04685c74 100644 --- a/web/app/assets/stylesheets/client/session.css.scss +++ b/web/app/assets/stylesheets/client/session.css.scss @@ -18,6 +18,15 @@ } +.audio-devices { + font-family:"Raleway", arial, sans-serif; + border:none; + -webkit-box-shadow: inset 2px 2px 3px 0px #888; + box-shadow: inset 2px 2px 3px 0px #888; + color:#666; +} + + .track { width:70px; height:290px; diff --git a/web/app/views/clients/_configureTrack.html.erb b/web/app/views/clients/_configureTrack.html.erb index b05eddd01..6402cfecc 100644 --- a/web/app/views/clients/_configureTrack.html.erb +++ b/web/app/views/clients/_configureTrack.html.erb @@ -23,7 +23,7 @@