-
Loading...
+
+ Loading...
);
};
@@ -108,8 +112,21 @@ const LoginRequestSection = () => {
const DashboardSection = () => {
const { isFluid, isVertical, navbarStyle } = useContext(AppContext);
const isKanban = getPageName('kanban');
+
+ const registerForChatMessages = () => {
+ console.log('registering for chat messages');
+ window.JK.JamServer.registerMessageCallback(window.JK.MessageType.CHAT_MESSAGE, function (header, payload) {
+ console.debug("Handling CHAT_MESSAGE msg " + JSON.stringify(payload));
+ })
+ }
+
+ useEffect(() => {
+ //registerForChatMessages()
+ }, []);
return (
+
+
{isVertical &&
}
@@ -126,6 +143,7 @@ const DashboardSection = () => {
{/* */}
+
);
};
diff --git a/web/app/controllers/clients_controller.rb b/web/app/controllers/clients_controller.rb
index 0e69dd440..54db426c4 100644
--- a/web/app/controllers/clients_controller.rb
+++ b/web/app/controllers/clients_controller.rb
@@ -6,29 +6,13 @@ class ClientsController < ApplicationController
AUTHED = %W{friend}
+ def scripts
+ _index
+ render :layout => 'scripts', content_type: 'text/javascript'
+ end
def index
-
- enable_olark
- gon.olark_box_start_hidden = true
-
- # we want to enforce that /client is always the client view prefix
- # this is a side effect of setting root path to '/'; soon we can remove this when we implement the new home page
- if request.path == '/'
- redirect_to client_url
- return
- end
-
- if current_user
- @is_guitar_center = false #current_user.is_guitar_center?
- gon.user_id = current_user.id
- gon.user_email = current_user.email
- gon.user_name = current_user.name
- end
-
- @in_client_page = true
- @minimal_curtain = Rails.application.config.minimal_curtain
- gon.recurly_tax_estimate_jam_track_plan = Rails.application.config.recurly_tax_estimate_jam_track_plan
+ _index
render :layout => 'client'
end
@@ -51,4 +35,28 @@ class ClientsController < ApplicationController
end
end
+ private
+
+ def _index
+ enable_olark
+ gon.olark_box_start_hidden = true
+
+ # we want to enforce that /client is always the client view prefix
+ # this is a side effect of setting root path to '/'; soon we can remove this when we implement the new home page
+ if request.path == '/'
+ redirect_to client_url
+ return
+ end
+
+ if current_user
+ @is_guitar_center = false #current_user.is_guitar_center?
+ gon.user_id = current_user.id
+ gon.user_email = current_user.email
+ gon.user_name = current_user.name
+ end
+
+ @in_client_page = true
+ @minimal_curtain = Rails.application.config.minimal_curtain
+ gon.recurly_tax_estimate_jam_track_plan = Rails.application.config.recurly_tax_estimate_jam_track_plan
+ end
end
diff --git a/web/config/application.rb b/web/config/application.rb
index bfbfed764..b3361beea 100644
--- a/web/config/application.rb
+++ b/web/config/application.rb
@@ -96,6 +96,8 @@ if defined?(Bundler)
config.assets.precompile += %w( support/support.js support/support.scss )
config.assets.precompile += %w( jk2021/jk2021.js jk2021/jk2021.css )
+ config.assets.precompile += %w( modern/scripts.js )
+
# where is rabbitmq?
config.rabbitmq_host = "127.0.0.1"
config.rabbitmq_port = 5672
diff --git a/web/config/routes.rb b/web/config/routes.rb
index ac601cb3d..629b668c6 100644
--- a/web/config/routes.rb
+++ b/web/config/routes.rb
@@ -1,5 +1,7 @@
Rails.application.routes.draw do
+
+
scope :as => 'jam_ruby' do
resources :users
resources :music_sessions
@@ -110,7 +112,11 @@ Rails.application.routes.draw do
get '/isp/ping.jar', :to => redirect('/ping.jar')
get '/isp/ping:isp', :to => 'users#jnlp', :constraints => {:format => :jnlp}, :as => 'isp_ping'
+
get '/client', to: 'clients#index'
+
+ get '/client_scripts', to: 'clients#scripts' #outputs javascript for external clients
+
get '/latency_tester', to: 'clients#latency_tester'
get '/confirm/:signup_token', to: 'users#signup_confirm', as: 'signup_confirm'