|
|
@@ -234,25 +234,6 @@ module.exports = ProjectController =
|
|
|
#don't need to wait for this to complete
|
|
|
ProjectUpdateHandler.markAsOpened project_id, ->
|
|
|
cb()
|
|
|
- showPerUserTCNotice: (cb) ->
|
|
|
- cb = underscore.once(cb)
|
|
|
- if !user_id?
|
|
|
- return cb()
|
|
|
- timestamp = user_id.toString().substring(0,8)
|
|
|
- userSignupDate = new Date( parseInt( timestamp, 16 ) * 1000 )
|
|
|
- if userSignupDate > new Date("2017-08-09")
|
|
|
- # Don't show for users who registered after it was released
|
|
|
- return cb(null, false)
|
|
|
- timeout = setTimeout cb, 500
|
|
|
- AnalyticsManager.getLastOccurance user_id, "shown-per-user-tc-notice", (error, event) ->
|
|
|
- clearTimeout timeout
|
|
|
- if error?
|
|
|
- return cb(null, false)
|
|
|
- else if event?
|
|
|
- return cb(null, false)
|
|
|
- else
|
|
|
- logger.log { user_id, event }, "per user track changes notice not shown yet to this user"
|
|
|
- return cb(null, true)
|
|
|
isTokenMember: (cb) ->
|
|
|
cb = underscore.once(cb)
|
|
|
if !user_id?
|
|
|
@@ -312,7 +293,7 @@ module.exports = ProjectController =
|
|
|
project = results.project
|
|
|
user = results.user
|
|
|
subscription = results.subscription
|
|
|
- { showPerUserTCNotice, showAutoCompileOnboarding } = results
|
|
|
+ { showAutoCompileOnboarding } = results
|
|
|
|
|
|
daysSinceLastUpdated = (new Date() - project.lastUpdated) / 86400000
|
|
|
logger.log project_id:project_id, daysSinceLastUpdated:daysSinceLastUpdated, "got db results for loading editor"
|
|
|
@@ -364,7 +345,6 @@ module.exports = ProjectController =
|
|
|
syntaxValidation: user.ace.syntaxValidation
|
|
|
}
|
|
|
trackChangesState: project.track_changes
|
|
|
- showPerUserTCNotice: !!showPerUserTCNotice
|
|
|
autoCompileEnabled: !!showAutoCompileOnboarding?.enabled
|
|
|
showAutoCompileOnboarding: !!showAutoCompileOnboarding?.showOnboarding
|
|
|
privilegeLevel: privilegeLevel
|