mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
When a user is null in track-changes UI, display them as "Anonymous".
This commit is contained in:
parent
1c9f9274a9
commit
4a315a0474
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 }}
|
span.doc {{ doc.entity.name }}
|
||||||
div.users
|
div.users
|
||||||
div.user(ng-repeat="update_user in update.meta.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") {{update_user.first_name}} {{update_user.last_name}}
|
||||||
.name(ng-if="update_user.id == user.id") You
|
.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")
|
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%)")
|
||||||
span #{translate("anonymous")}
|
span #{translate("anonymous")}
|
||||||
|
|
|
@ -187,7 +187,8 @@ define [
|
||||||
doc.entity = @ide.fileTreeManager.findEntityById(doc_id, includeDeleted: true)
|
doc.entity = @ide.fileTreeManager.findEntityById(doc_id, includeDeleted: true)
|
||||||
|
|
||||||
for user in update.meta.users or []
|
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")
|
if !previousUpdate? or !moment(previousUpdate.meta.end_ts).isSame(update.meta.end_ts, "day")
|
||||||
update.meta.first_in_day = true
|
update.meta.first_in_day = true
|
||||||
|
|
Loading…
Reference in a new issue