mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #1776 from overleaf/pr-history-ui-filenames-overflow
History filenames overflow + full history for admins GitOrigin-RevId: b52d79e0aa1cb600eacb475d21b603f42c8cf18c
This commit is contained in:
parent
d999cd5030
commit
4e8facf3cc
4 changed files with 21 additions and 2 deletions
|
@ -369,6 +369,7 @@ module.exports = ProjectController =
|
|||
features: user.features
|
||||
refProviders: user.refProviders
|
||||
betaProgram: user.betaProgram
|
||||
isAdmin: user.isAdmin
|
||||
}
|
||||
userSettings: {
|
||||
mode : user.ace.mode
|
||||
|
|
|
@ -161,6 +161,9 @@ define([
|
|||
hasVersioning => {
|
||||
if (hasVersioning != null) {
|
||||
this.$scope.history.userHasFullFeature = hasVersioning
|
||||
if (this.$scope.user.isAdmin) {
|
||||
this.$scope.history.userHasFullFeature = true
|
||||
}
|
||||
_deregisterFeatureWatcher()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@
|
|||
margin-bottom: 3px;
|
||||
}
|
||||
.history-entry-change {
|
||||
|
||||
word-break: break-all;
|
||||
}
|
||||
.history-entry-change-action {
|
||||
margin-right: 0.5em;
|
||||
|
@ -255,7 +255,7 @@
|
|||
.history-entry-change-doc {
|
||||
color: @history-highlight-color;
|
||||
font-weight: bold;
|
||||
word-break: break-all;
|
||||
|
||||
.history-entry-selected &,
|
||||
.history-entry-hover-selected &,
|
||||
.history-version-with-label-selected & {
|
||||
|
|
|
@ -146,6 +146,9 @@ define(['ide/history/HistoryV2Manager'], HistoryV2Manager =>
|
|||
versioning: true
|
||||
}
|
||||
}
|
||||
this.$scope.user = {
|
||||
isAdmin: false
|
||||
}
|
||||
this.ide = {
|
||||
$q: $q,
|
||||
$http: $http
|
||||
|
@ -199,6 +202,18 @@ define(['ide/history/HistoryV2Manager'], HistoryV2Manager =>
|
|||
expect(this.$scope.history.userHasFullFeature).to.equal(false)
|
||||
})
|
||||
|
||||
it('should setup history with full access to the feature for admin users even if the project does not have versioning', function() {
|
||||
this.$scope.project.features.versioning = false
|
||||
this.$scope.user.isAdmin = true
|
||||
this.historyManager = new HistoryV2Manager(
|
||||
this.ide,
|
||||
this.$scope,
|
||||
this.localStorage
|
||||
)
|
||||
this.$scope.$digest()
|
||||
expect(this.$scope.history.userHasFullFeature).to.equal(true)
|
||||
})
|
||||
|
||||
describe('autoSelectFile', function() {
|
||||
beforeEach(function() {
|
||||
this.mockedFilesList = [
|
||||
|
|
Loading…
Reference in a new issue