mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #1285 from sharelatex/pr-history-compare-labels-fixes
History compare labels fixes GitOrigin-RevId: 176750c4017e5511a22f1792e37ab8918a142ec3
This commit is contained in:
parent
1160620afc
commit
4563ce864c
4 changed files with 13 additions and 4 deletions
|
@ -111,7 +111,7 @@ aside.change-list.change-list-compare(
|
|||
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(100, 70%, 50%)'}")
|
||||
.name(ng-if="::update_user && update_user.id != user.id" ng-bind="displayName(update_user)")
|
||||
.name(ng-if="::update_user && update_user.id != user.id" ng-bind="getDisplayNameForUser(update_user)")
|
||||
.name(ng-if="::update_user && update_user.id == user.id") You
|
||||
.name(ng-if="::update_user == null") #{translate("anonymous")}
|
||||
div.user(ng-if="::update.meta.users.length == 0")
|
||||
|
|
|
@ -482,10 +482,15 @@ define([
|
|||
.all(requests)
|
||||
.then(response => {
|
||||
const updatesData = response.updates.data
|
||||
let lastUpdateToV = null
|
||||
|
||||
if (updatesData.updates.length > 0) {
|
||||
lastUpdateToV = updatesData.updates[0].toV
|
||||
}
|
||||
if (response.labels != null) {
|
||||
this.$scope.history.labels = this._loadLabels(
|
||||
response.labels.data,
|
||||
updatesData.updates[0].toV
|
||||
lastUpdateToV
|
||||
)
|
||||
}
|
||||
this._loadUpdates(updatesData.updates)
|
||||
|
@ -493,7 +498,8 @@ define([
|
|||
updatesData.nextBeforeTimestamp
|
||||
if (
|
||||
updatesData.nextBeforeTimestamp == null ||
|
||||
this.$scope.history.freeHistoryLimitHit
|
||||
this.$scope.history.freeHistoryLimitHit ||
|
||||
this.$scope.history.updates.length === 0
|
||||
) {
|
||||
this.$scope.history.atEnd = true
|
||||
}
|
||||
|
@ -504,6 +510,8 @@ define([
|
|||
.catch(error => {
|
||||
const { status, statusText } = error
|
||||
this.$scope.history.error = { status, statusText }
|
||||
this.$scope.history.atEnd = true
|
||||
this.$scope.history.loadingFileTree = false
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,8 @@ define(['base', 'ide/history/util/displayNameForUser'], function(
|
|||
$scope.getDisplayNameById = id =>
|
||||
displayNameForUser($scope.getUserById(id))
|
||||
|
||||
$scope.getDisplayNameForUser = user => displayNameForUser(user)
|
||||
|
||||
$scope.deleteLabel = labelDetails =>
|
||||
$modal.open({
|
||||
templateUrl: 'historyV2DeleteLabelModalTemplate',
|
||||
|
|
|
@ -283,7 +283,6 @@
|
|||
.history-file-entity-link-selected {
|
||||
background-color: @file-tree-item-selected-bg;
|
||||
font-weight: bold;
|
||||
padding-right: 32px;
|
||||
color: #FFF;
|
||||
.fake-full-width-bg(@file-tree-item-selected-bg);
|
||||
&:hover {
|
||||
|
|
Loading…
Reference in a new issue