mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #199 from sharelatex/sk-missing-users
When a user is null in track-changes UI, display them as "Anonymous".
This commit is contained in:
commit
778f588741
2 changed files with 5 additions and 2 deletions
|
@ -74,9 +74,11 @@ div#trackChanges(ng-show="ui.view == 'track-changes'")
|
|||
span.doc {{ doc.entity.name }}
|
||||
div.users
|
||||
div.user(ng-repeat="update_user in update.meta.users")
|
||||
.color-square(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%)'}")
|
||||
.name(ng-if="update_user.id != user.id") {{update_user.first_name}} {{update_user.last_name}}
|
||||
.name(ng-if="update_user.id == user.id") You
|
||||
.name(ng-if="update_user == null") #{translate("anonymous")}
|
||||
div.user(ng-if="update.meta.users.length == 0")
|
||||
.color-square(style="background-color: hsl(100, 100%, 50%)")
|
||||
span #{translate("anonymous")}
|
||||
|
|
|
@ -187,7 +187,8 @@ define [
|
|||
doc.entity = @ide.fileTreeManager.findEntityById(doc_id, includeDeleted: true)
|
||||
|
||||
for user in update.meta.users or []
|
||||
user.hue = @ide.onlineUsersManager.getHueForUserId(user.id)
|
||||
if user?
|
||||
user.hue = @ide.onlineUsersManager.getHueForUserId(user.id)
|
||||
|
||||
if !previousUpdate? or !moment(previousUpdate.meta.end_ts).isSame(update.meta.end_ts, "day")
|
||||
update.meta.first_in_day = true
|
||||
|
|
Loading…
Reference in a new issue