mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:33:27 +00:00
Make track changes a feature flag
This commit is contained in:
parent
7aab6c4c0b
commit
81fcafb476
3 changed files with 5 additions and 6 deletions
|
@ -120,7 +120,7 @@ module.exports = class ProjectController
|
|||
allowed: true
|
||||
featureSwitches:
|
||||
dropbox: false
|
||||
longPolling: false
|
||||
trackChanges: false
|
||||
else
|
||||
anonymous = false
|
||||
SubscriptionLocator.getUsersSubscription user._id, (err, subscription)->
|
||||
|
@ -154,7 +154,7 @@ module.exports = class ProjectController
|
|||
spellCheckLanguage: user.ace.spellCheckLanguage
|
||||
pdfViewer : user.ace.pdfViewer
|
||||
docPositions: {}
|
||||
longPolling: user.featureSwitches.longPolling
|
||||
trackChanges: user.featureSwitches.trackChanges
|
||||
})
|
||||
sharelatexObject : JSON.stringify({
|
||||
siteUrl: Settings.siteUrl,
|
||||
|
|
|
@ -32,7 +32,7 @@ UserSchema = new Schema
|
|||
}
|
||||
featureSwitches : {
|
||||
dropbox: {type:Boolean, default:true},
|
||||
longPolling: {type:Boolean, default:false}
|
||||
trackChanges: {type:Boolean, default:false}
|
||||
}
|
||||
referal_id : {type:String, default:() -> uuid.v4().split("-")[0]}
|
||||
refered_users: [ type:ObjectId, ref:'User' ]
|
||||
|
|
|
@ -97,8 +97,6 @@ define [
|
|||
ioOptions =
|
||||
reconnect: false
|
||||
"force new connection": true
|
||||
if @userSettings.longPolling
|
||||
ioOptions.transports = ["xhr-polling"]
|
||||
@socket = socket = io.connect null, ioOptions
|
||||
|
||||
@messageManager = new MessageManager(@)
|
||||
|
@ -119,7 +117,8 @@ define [
|
|||
@cursorManager = new CursorManager(@)
|
||||
@fileViewManager = new FileViewManager(@)
|
||||
@analyticsManager = new AnalyticsManager(@)
|
||||
@trackChangesManager = new TrackChangesManager(@)
|
||||
if @userSettings.trackChanges
|
||||
@trackChangesManager = new TrackChangesManager(@)
|
||||
|
||||
@setLoadingMessage("Connecting")
|
||||
firstConnect = true
|
||||
|
|
Loading…
Reference in a new issue