mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #3327 from overleaf/jpa-users-email-update
[frontend] after changing the primary email, use the new one everywhere GitOrigin-RevId: c4397483f4b3779497a7655de34754525d033636
This commit is contained in:
parent
15fd090e7a
commit
b99690d365
4 changed files with 9 additions and 3 deletions
|
@ -64,6 +64,7 @@ html(
|
|||
|
||||
block head-scripts
|
||||
|
||||
meta(id="ol-usersEmail" content=getUserEmail())
|
||||
script.
|
||||
window.sharelatex = {
|
||||
siteUrl: '#{settings.siteUrl}',
|
||||
|
|
|
@ -82,7 +82,7 @@ nav.navbar.navbar-default.navbar-main
|
|||
b.caret
|
||||
ul.dropdown-menu
|
||||
li
|
||||
div.subdued(ng-non-bindable) #{getUserEmail()}
|
||||
div.subdued {{ usersEmail }}
|
||||
li.divider.hidden-xs.hidden-sm
|
||||
li
|
||||
a(href="/user/settings") #{translate('Account Settings')}
|
||||
|
|
|
@ -72,7 +72,10 @@ const App = angular
|
|||
)
|
||||
})
|
||||
|
||||
App.run($templateCache =>
|
||||
App.run(($rootScope, $templateCache) => {
|
||||
const usersEmailElement = document.getElementById('ol-usersEmail')
|
||||
$rootScope.usersEmail = usersEmailElement && usersEmailElement.content
|
||||
|
||||
// UI Select templates are hard-coded and use Glyphicon icons (which we don't import).
|
||||
// The line below simply overrides the hard-coded template with our own, which is
|
||||
// basically the same but using Font Awesome icons.
|
||||
|
@ -80,7 +83,7 @@ App.run($templateCache =>
|
|||
'bootstrap/match.tpl.html',
|
||||
'<div class="ui-select-match" ng-hide="$select.open && $select.searchEnabled" ng-disabled="$select.disabled" ng-class="{\'btn-default-focus\':$select.focus}"><span tabindex="-1" class="btn btn-default form-control ui-select-toggle" aria-label="{{ $select.baseTitle }} activate" ng-disabled="$select.disabled" ng-click="$select.activate()" style="outline: 0;"><span ng-show="$select.isEmpty()" class="ui-select-placeholder text-muted">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="ui-select-match-text pull-left" ng-class="{\'ui-select-allow-clear\': $select.allowClear && !$select.isEmpty()}" ng-transclude=""></span> <i class="caret pull-right" ng-click="$select.toggle($event)"></i> <a ng-show="$select.allowClear && !$select.isEmpty() && ($select.disabled !== true)" aria-label="{{ $select.baseTitle }} clear" style="margin-right: 10px" ng-click="$select.clear($event)" class="btn btn-xs btn-link pull-right"><i class="fa fa-times" aria-hidden="true"></i></a></span></div>'
|
||||
)
|
||||
)
|
||||
})
|
||||
|
||||
const sl_debugging =
|
||||
__guard__(window.location != null ? window.location.search : undefined, x =>
|
||||
|
|
|
@ -9,6 +9,7 @@ import App from '../../../base'
|
|||
|
||||
export default App.controller('UserAffiliationsController', function(
|
||||
$scope,
|
||||
$rootScope,
|
||||
UserAffiliationsDataService,
|
||||
$q,
|
||||
$window
|
||||
|
@ -195,6 +196,7 @@ export default App.controller('UserAffiliationsController', function(
|
|||
}
|
||||
userEmail.default = true
|
||||
window.usersEmail = userEmail.email
|
||||
$rootScope.usersEmail = userEmail.email
|
||||
})
|
||||
|
||||
$scope.removeUserEmail = function(userEmail) {
|
||||
|
|
Loading…
Reference in a new issue