mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Make greyed out background the default track changes prompt
This commit is contained in:
parent
7764663552
commit
e9309532d3
2 changed files with 2 additions and 27 deletions
|
@ -449,9 +449,6 @@
|
|||
button.btn.btn-primary.start-free-trial Start free trial
|
||||
.message.show-when-not-owner
|
||||
p Please ask the project owner to upgrade to use the History feature.
|
||||
.track-changes-upgrade-control(style="display: none;")
|
||||
.message History is not yet enabled for this project.
|
||||
button.btn.btn-primary.btn-large.upgrade Enable History
|
||||
|
||||
script(type='text/template')#trackChangesDiffTemplate
|
||||
.track-changes-diff-toolbar.btn-toolbar
|
||||
|
@ -481,12 +478,6 @@
|
|||
ul.change-list.nav.nav-pills.nav-stacked
|
||||
li.loading-changes Loading...
|
||||
li.empty-message You haven't made any changes yet!
|
||||
li.track-changes-upgrade-oneweek(style="display: none;")
|
||||
p We only store one week of changes for free accounts.
|
||||
p.show-when-owner Upgrade for an unlimited history.
|
||||
p.show-when-owner
|
||||
button.btn.btn-primary.start-free-trial Start free trial
|
||||
p.show-when-not-owner Please ask the project owner to upgrade.
|
||||
|
||||
script(type='text/template')#hotKeysListTemplate
|
||||
.hotkeys
|
||||
|
|
|
@ -74,19 +74,12 @@ define [
|
|||
@enable()
|
||||
|
||||
showUpgradeView: () ->
|
||||
@upgradeType ||= @ide.analyticsManager.startABTest('track-changes-upgrade', @AB_BUCKETS)
|
||||
@$el.find("button.upgrade").off "click.track-changes"
|
||||
@$el.find("button.start-free-trial").off "click.track-changes"
|
||||
@$el.find("button.upgrade").on "click.track-changes", () => @askToUpgrade()
|
||||
@$el.find("button.start-free-trial").on "click.track-changes", () => @gotoFreeTrial()
|
||||
|
||||
if !@ide.project.get("features").versioning
|
||||
if @upgradeType == "pop-up"
|
||||
@$el.find(".track-changes-upgrade-popup").show()
|
||||
else if @upgradeType == "control"
|
||||
@$el.find(".track-changes-upgrade-control").show()
|
||||
else if @upgradeType == "one-week"
|
||||
@$el.find(".track-changes-upgrade-oneweek").show()
|
||||
ga('send', 'event', 'subscription-funnel', 'askToUgrade', "trackchanges")
|
||||
@$el.find(".track-changes-upgrade-popup").show()
|
||||
|
||||
if @ide.project.get("owner") == @ide.user
|
||||
@$el.find(".show-when-not-owner").hide()
|
||||
|
@ -230,17 +223,8 @@ define [
|
|||
disable: () ->
|
||||
@enabled = false
|
||||
|
||||
askToUpgrade: () ->
|
||||
ga('send', 'event', 'subscription-funnel', 'askToUpgrade', "trackchanges")
|
||||
ga('send', 'event', 'ab_tests', 'track-changes-upgrade', "prompted-to-upgrade-#{@upgradeType}")
|
||||
AccountManager.askToUpgrade @ide,
|
||||
onUpgrade: () =>
|
||||
@ide.analyticsManager.endABTest('track-changes-upgrade', @AB_BUCKETS)
|
||||
ga('send', 'event', 'subscription-funnel', 'upgraded-free-trial', "trackchanges")
|
||||
|
||||
gotoFreeTrial: () ->
|
||||
AccountManager.gotoSubscriptionsPage()
|
||||
@ide.analyticsManager.endABTest('track-changes-upgrade', @AB_BUCKETS)
|
||||
ga('send', 'event', 'subscription-funnel', 'upgraded-free-trial', "trackchanges")
|
||||
|
||||
return TrackChangesManager
|
||||
|
|
Loading…
Reference in a new issue