-
You will run out of monthly play time in:
+ if @props.subscription.main_concern_type == 'remaining_session_play_time'
+ content = `
+
You will run out play time for this session in:
{this.displayTime()}
-
Compare plans and consider upgrading your plan for more play time and premium features.
-
`
+
Compare plans and consider upgrading your plan for more play time and premium features.
+
`
+ else
+ content = `
diff --git a/web/app/assets/javascripts/react-components/TopMessageHolder.js.jsx.coffee b/web/app/assets/javascripts/react-components/TopMessageHolder.js.jsx.coffee
index 88af1176b..8f96207a1 100644
--- a/web/app/assets/javascripts/react-components/TopMessageHolder.js.jsx.coffee
+++ b/web/app/assets/javascripts/react-components/TopMessageHolder.js.jsx.coffee
@@ -6,7 +6,7 @@ ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
@TopMessageHolder = React.createClass(
{
displayName: 'Top Message Holder',
- minimum_time_until_sub_prompt: 1000 * 60 * 30 # 30 minutes
+ minimum_time_until_sub_prompt: 1000 * 60 * 15 # 30 minutes
mixins: [Reflux.listenTo(ConfigStore, "onConfig"), Reflux.connect(context.JK.Stores.Broadcast, 'notification')]
getInitialState: () ->
@@ -25,7 +25,7 @@ ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
# only show the subscription concern message if there is a concerpn and due time is less thant 30 minutes away
if @state.notification && @state.notification.subscriptionConcern? && @state.notification.subscriptionConcern.until.total < @minimum_time_until_sub_prompt
`
-
+
`
else if @state.top_message
`
diff --git a/web/app/assets/javascripts/react-components/stores/BroadcastStore.js.coffee b/web/app/assets/javascripts/react-components/stores/BroadcastStore.js.coffee
index a13e95b72..359797d72 100644
--- a/web/app/assets/javascripts/react-components/stores/BroadcastStore.js.coffee
+++ b/web/app/assets/javascripts/react-components/stores/BroadcastStore.js.coffee
@@ -47,7 +47,7 @@ BroadcastStore = Reflux.createStore(
subscriptionManagement: () ->
@subscriptionConcern.until = @lessonUtils.getTimeRemaining(@subscriptionConcern.main_concern_time)
- if @subscriptionConcern.until.total < -30000
+ if @session?.participants.length > 1 && @subscriptionConcern.until.total < -30000
leaveBehavior =
location: "/client#/findSession"
buttons = []
@@ -158,6 +158,7 @@ BroadcastStore = Reflux.createStore(
@subscriptionConcern = null
else
@subscriptionConcern = {}
+ @subscriptionConcern.participants = @session?.participants().length
if !@subscriptionRules.remaining_month_until?
@subscriptionConcern.main_concern_time = @sessionRules.remaining_session_until
@subscriptionConcern.main_concern_type = "remaining_session_play_time"
@@ -175,7 +176,7 @@ BroadcastStore = Reflux.createStore(
@subscriptionManagement()
#logger.debug("BroadcastStore: session can play until: ", @subscriptionConcern.until, @subscriptionConcern.main_concert_time)
if !@currentSubscriptionTimer?
- @currentSubscriptionTimer= setInterval((() => @subscriptionTick()), 1000)
+ @currentSubscriptionTimer = setInterval((() => @subscriptionTick()), 1000)
@changed()
if currentSession.lesson_session?
diff --git a/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee b/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee
index e5fee293e..9ea273f55 100644
--- a/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee
+++ b/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee
@@ -1094,7 +1094,7 @@ ConfigureTracksActions = @ConfigureTracksActions
if sessionData.session_rules
@sessionRules = sessionData.session_rules
# TESTING:
- #@sessionRules.remaining_session_play_time = 60 * 30 + 15 # 30 minutes and 15 seconds
+ #@sessionRules.remaining_session_play_time = 60 * 15 + 15 # 15 minutes and 15 seconds
# compute timestamp due time
if @sessionRules.remaining_session_play_time?
@@ -1111,7 +1111,7 @@ ConfigureTracksActions = @ConfigureTracksActions
#context.jamClient.applySubscriptionPolicy()
@subscriptionRules = sessionData.subscription
# TESTING:
- #@subscriptionRules.remaining_month_play_time = 60 * 30 + 15 # 30 minutes and 15 seconds
+ #@subscriptionRules.remaining_month_play_time = 60 * 15 + 15 # 15 minutes and 15 seconds
if @subscriptionRules.remaining_month_play_time?
until_time = new Date()
diff --git a/web/app/assets/javascripts/utils.js b/web/app/assets/javascripts/utils.js
index 2663a6752..60e083dfb 100644
--- a/web/app/assets/javascripts/utils.js
+++ b/web/app/assets/javascripts/utils.js
@@ -1161,7 +1161,6 @@
context.JK.clientType = function () {
if (client_type) {
- console.log("SHORT CUT", client_type);
return client_type;
}
else {
diff --git a/web/config/application.rb b/web/config/application.rb
index aeac7ff2e..78125fc78 100644
--- a/web/config/application.rb
+++ b/web/config/application.rb
@@ -490,5 +490,10 @@ if defined?(Bundler)
{id: 'jamsubsilveryearly', name: 'Silver', price: 49.99, cycle: 'year'},
{id: 'jamsubgoldyearly', name: 'Gold', price:99.99, cycle: 'year'},
{id: 'jamsubplatinumyearly', name: 'Platinum', price:199.99, cycle: 'year'}]
+
+ # sandbox
+ # braintree: merchant id: 5v5rwm94m2vrfbms
+ # braintree: public key: 367d6dtdswvdr87s
+ # braintree: private key: 8309b8f9c669cfa940f617eb9cac56ea
end
end