mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Remove unused link sharing onboarding now at 100%
This commit is contained in:
parent
45de9bb5dc
commit
4d29c4d769
5 changed files with 0 additions and 62 deletions
|
@ -241,23 +241,6 @@ module.exports = ProjectController =
|
||||||
if !user_id?
|
if !user_id?
|
||||||
return cb()
|
return cb()
|
||||||
CollaboratorsHandler.userIsTokenMember user_id, project_id, cb
|
CollaboratorsHandler.userIsTokenMember user_id, project_id, cb
|
||||||
couldShowLinkSharingOnboarding: (cb) ->
|
|
||||||
cb = underscore.once(cb)
|
|
||||||
if !user_id?
|
|
||||||
return cb()
|
|
||||||
# Extract data from user's ObjectId
|
|
||||||
timestamp = parseInt(user_id.toString().substring(0, 8), 16)
|
|
||||||
userSignupDate = new Date(timestamp * 1000)
|
|
||||||
if userSignupDate > new Date("2017-11-13")
|
|
||||||
# Don't show for users who registered after it was released
|
|
||||||
return cb(null, false)
|
|
||||||
timeout = setTimeout cb, 500
|
|
||||||
AnalyticsManager.getLastOccurance user_id, "shown-linksharing-onboarding", (error, event) ->
|
|
||||||
clearTimeout timeout
|
|
||||||
if error? || event?
|
|
||||||
return cb(null, false)
|
|
||||||
else
|
|
||||||
return cb(null, true)
|
|
||||||
}, (err, results)->
|
}, (err, results)->
|
||||||
if err?
|
if err?
|
||||||
logger.err err:err, "error getting details for project page"
|
logger.err err:err, "error getting details for project page"
|
||||||
|
@ -317,7 +300,6 @@ module.exports = ProjectController =
|
||||||
languages: Settings.languages
|
languages: Settings.languages
|
||||||
themes: THEME_LIST
|
themes: THEME_LIST
|
||||||
maxDocLength: Settings.max_doc_length
|
maxDocLength: Settings.max_doc_length
|
||||||
showLinkSharingOnboarding: !!results.couldShowLinkSharingOnboarding
|
|
||||||
useV2History: !!project.overleaf?.history?.display
|
useV2History: !!project.overleaf?.history?.display
|
||||||
timer.done()
|
timer.done()
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,6 @@ block requirejs
|
||||||
window.isTokenMember = #{!!isTokenMember};
|
window.isTokenMember = #{!!isTokenMember};
|
||||||
window.maxDocLength = #{maxDocLength};
|
window.maxDocLength = #{maxDocLength};
|
||||||
window.trackChangesState = data.trackChangesState;
|
window.trackChangesState = data.trackChangesState;
|
||||||
window.showLinkSharingOnboarding = #{!!showLinkSharingOnboarding}
|
|
||||||
window.wikiEnabled = #{!!(settings.apis.wiki && settings.apis.wiki.url)};
|
window.wikiEnabled = #{!!(settings.apis.wiki && settings.apis.wiki.url)};
|
||||||
window.requirejs = {
|
window.requirejs = {
|
||||||
"paths" : {
|
"paths" : {
|
||||||
|
|
|
@ -93,21 +93,3 @@ div.full-size(
|
||||||
ng-show="ui.view == 'pdf'"
|
ng-show="ui.view == 'pdf'"
|
||||||
)
|
)
|
||||||
include ./pdf
|
include ./pdf
|
||||||
|
|
||||||
#onboarding-linksharing.onboarding-linksharing.popover(
|
|
||||||
ng-controller="LinkSharingOnboardingController"
|
|
||||||
ng-if="permissions.admin && onboarding.linkSharing == 'unseen'"
|
|
||||||
ng-class="placement"
|
|
||||||
)
|
|
||||||
.popover-inner
|
|
||||||
h3.popover-title #{translate("link_sharing")}
|
|
||||||
.popover-content
|
|
||||||
p #{translate("try_out_link_sharing")}
|
|
||||||
img(
|
|
||||||
src="/img/onboarding/linksharing/link-sharing.png"
|
|
||||||
alt="Link sharing demo"
|
|
||||||
width="100%"
|
|
||||||
)
|
|
||||||
p #{translate("try_link_sharing_description")}
|
|
||||||
button.btn.btn-default.btn-block(ng-click="dismiss()")
|
|
||||||
| #{translate("got_it")}
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ define [
|
||||||
"ide/metadata/MetadataManager"
|
"ide/metadata/MetadataManager"
|
||||||
"ide/review-panel/ReviewPanelManager"
|
"ide/review-panel/ReviewPanelManager"
|
||||||
"ide/SafariScrollPatcher"
|
"ide/SafariScrollPatcher"
|
||||||
"ide/LinkSharingOnboardingController",
|
|
||||||
"ide/settings/index"
|
"ide/settings/index"
|
||||||
"ide/share/index"
|
"ide/share/index"
|
||||||
"ide/chat/index"
|
"ide/chat/index"
|
||||||
|
@ -81,9 +80,6 @@ define [
|
||||||
chatResizerSizeOpen: window.uiConfig.chatResizerSizeOpen
|
chatResizerSizeOpen: window.uiConfig.chatResizerSizeOpen
|
||||||
chatResizerSizeClosed: window.uiConfig.chatResizerSizeClosed
|
chatResizerSizeClosed: window.uiConfig.chatResizerSizeClosed
|
||||||
}
|
}
|
||||||
$scope.onboarding = {
|
|
||||||
linkSharing: if window.showLinkSharingOnboarding then 'unseen' else 'dismissed'
|
|
||||||
}
|
|
||||||
$scope.user = window.user
|
$scope.user = window.user
|
||||||
|
|
||||||
$scope.shouldABTestPlans = false
|
$scope.shouldABTestPlans = false
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
define [
|
|
||||||
"base"
|
|
||||||
], (App) ->
|
|
||||||
App.controller "LinkSharingOnboardingController", ($scope, $timeout, event_tracking) ->
|
|
||||||
|
|
||||||
popover = angular.element('#onboarding-linksharing')
|
|
||||||
popover.hide()
|
|
||||||
|
|
||||||
$scope.dismiss = () ->
|
|
||||||
$scope.onboarding.linkSharing = 'dismissed'
|
|
||||||
event_tracking.sendMB "shown-linksharing-onboarding"
|
|
||||||
|
|
||||||
$scope.$on 'ide:loaded', () ->
|
|
||||||
shareBtn = angular.element('#shareButton')
|
|
||||||
offset = shareBtn.offset()
|
|
||||||
popover.show()
|
|
||||||
$scope.placement = 'bottom'
|
|
||||||
popover.css({
|
|
||||||
top: '' + (2) + 'px',
|
|
||||||
right: '' + (window.innerWidth - offset.left - (shareBtn.width() * 1.5) ) + 'px'
|
|
||||||
})
|
|
Loading…
Reference in a new issue