mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge branch 'master' of https://github.com/sharelatex/web-sharelatex
This commit is contained in:
commit
5ffd76c670
5 changed files with 21 additions and 7 deletions
|
@ -76,8 +76,8 @@ div#trackChanges(ng-show="ui.view == 'track-changes'")
|
||||||
div.user(ng-repeat="update_user in update.meta.users")
|
div.user(ng-repeat="update_user in update.meta.users")
|
||||||
.color-square(ng-if="update_user != null", ng-style="{'background-color': 'hsl({{ update_user.hue }}, 70%, 50%)'}")
|
.color-square(ng-if="update_user != null", ng-style="{'background-color': 'hsl({{ update_user.hue }}, 70%, 50%)'}")
|
||||||
.color-square(ng-if="update_user == null", ng-style="{'background-color': 'hsl(100, 70%, 50%)'}")
|
.color-square(ng-if="update_user == null", ng-style="{'background-color': 'hsl(100, 70%, 50%)'}")
|
||||||
.name(ng-if="update_user.id != user.id") {{update_user.first_name}} {{update_user.last_name}}
|
.name(ng-if="update_user && update_user.id != user.id" ng-bind="displayName(update_user)")
|
||||||
.name(ng-if="update_user.id == user.id") You
|
.name(ng-if="update_user && update_user.id == user.id") You
|
||||||
.name(ng-if="update_user == null") #{translate("anonymous")}
|
.name(ng-if="update_user == null") #{translate("anonymous")}
|
||||||
div.user(ng-if="update.meta.users.length == 0")
|
div.user(ng-if="update.meta.users.length == 0")
|
||||||
.color-square(style="background-color: hsl(100, 100%, 50%)")
|
.color-square(style="background-color: hsl(100, 100%, 50%)")
|
||||||
|
|
|
@ -250,5 +250,5 @@ define [
|
||||||
|
|
||||||
_updateContainsUserId: (update, user_id) ->
|
_updateContainsUserId: (update, user_id) ->
|
||||||
for user in update.meta.users
|
for user in update.meta.users
|
||||||
return true if user.id == user_id
|
return true if user?.id == user_id
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -103,4 +103,15 @@ define [
|
||||||
$scope.trackChanges.hoveringOverListSelectors = false
|
$scope.trackChanges.hoveringOverListSelectors = false
|
||||||
$scope.resetHoverState()
|
$scope.resetHoverState()
|
||||||
|
|
||||||
|
$scope.displayName = (user) ->
|
||||||
|
full_name = "#{user.first_name} #{user.last_name}"
|
||||||
|
fallback_name = "Unknown"
|
||||||
|
if !user?
|
||||||
|
fallback_name
|
||||||
|
else if full_name != " "
|
||||||
|
full_name
|
||||||
|
else if user.email
|
||||||
|
user.email
|
||||||
|
else
|
||||||
|
fallback_name
|
||||||
]
|
]
|
|
@ -139,11 +139,14 @@
|
||||||
width: 12px;
|
width: 12px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 3px;
|
|
||||||
left: 0;
|
left: 0;
|
||||||
|
bottom: 3px;
|
||||||
}
|
}
|
||||||
.name {
|
.name {
|
||||||
display: inline-block;
|
width: 94%;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -369,5 +369,5 @@ describe "CompileController", ->
|
||||||
|
|
||||||
it "should return a 200 and body", ->
|
it "should return a 200 and body", ->
|
||||||
@res.send
|
@res.send
|
||||||
.calledWith(200, {content:"body"})
|
.calledWith({content:"body"})
|
||||||
.should.equal true
|
.should.equal true
|
||||||
|
|
Loading…
Reference in a new issue