mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Style the edit/add/rename options
This commit is contained in:
@@ -135,12 +135,17 @@ div#history(ng-show="ui.view == 'history'")
|
|||||||
div.description(ng-click="select()")
|
div.description(ng-click="select()")
|
||||||
div.time {{ update.meta.end_ts | formatDate:'h:mm a' }}
|
div.time {{ update.meta.end_ts | formatDate:'h:mm a' }}
|
||||||
div.docs(ng-repeat="pathname in update.pathnames")
|
div.docs(ng-repeat="pathname in update.pathnames")
|
||||||
|
i.fa.fa-pencil(ng-if="history.isV2")
|
||||||
span.doc {{ pathname }}
|
span.doc {{ pathname }}
|
||||||
div.docs(ng-repeat="project_op in update.project_ops")
|
div.docs(ng-repeat="project_op in update.project_ops")
|
||||||
span(ng-if="project_op.rename")
|
span(ng-if="project_op.rename")
|
||||||
| Renamed {{ project_op.rename.pathname }} to {{ project_op.rename.newPathname }}
|
span Renamed
|
||||||
|
span.doc {{ project_op.rename.pathname }}
|
||||||
|
span to
|
||||||
|
span.doc {{ project_op.rename.newPathname }}
|
||||||
span(ng-if="project_op.add")
|
span(ng-if="project_op.add")
|
||||||
| Added {{ project_op.add.pathname }}
|
span Added
|
||||||
|
span.doc {{ project_op.add.pathname }}
|
||||||
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-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%)'}")
|
||||||
@@ -170,8 +175,8 @@ div#history(ng-show="ui.view == 'history'")
|
|||||||
'other': 'changes'\
|
'other': 'changes'\
|
||||||
}"
|
}"
|
||||||
)
|
)
|
||||||
| in <strong>{{history.diff.doc.name}}</strong>
|
| in <strong>{{history.diff.pathname}}</strong>
|
||||||
.toolbar-right
|
.toolbar-right(ng-if="!history.isV2")
|
||||||
a.btn.btn-danger.btn-sm(
|
a.btn.btn-danger.btn-sm(
|
||||||
href,
|
href,
|
||||||
ng-click="openRestoreDiffModal()"
|
ng-click="openRestoreDiffModal()"
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ define [
|
|||||||
end_ts: end_ts
|
end_ts: end_ts
|
||||||
doc: doc
|
doc: doc
|
||||||
error: false
|
error: false
|
||||||
|
pathname: doc.name
|
||||||
}
|
}
|
||||||
|
|
||||||
if !doc.deleted
|
if !doc.deleted
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ define [
|
|||||||
|
|
||||||
reset: () ->
|
reset: () ->
|
||||||
@$scope.history = {
|
@$scope.history = {
|
||||||
|
isV2: true
|
||||||
updates: []
|
updates: []
|
||||||
nextBeforeTimestamp: null
|
nextBeforeTimestamp: null
|
||||||
atEnd: false
|
atEnd: false
|
||||||
@@ -129,14 +130,6 @@ define [
|
|||||||
diff.restoreDeletedSuccess = false
|
diff.restoreDeletedSuccess = false
|
||||||
diff.restoredDocNewId = null
|
diff.restoredDocNewId = null
|
||||||
|
|
||||||
restoreDeletedDoc: (doc) ->
|
|
||||||
url = "/project/#{@$scope.project_id}/doc/#{doc.id}/restore"
|
|
||||||
@ide.$http.post(url, name: doc.name, _csrf: window.csrfToken)
|
|
||||||
|
|
||||||
restoreDiff: (diff) ->
|
|
||||||
url = "/project/#{@$scope.project_id}/doc/#{diff.doc.id}/version/#{diff.fromV}/restore"
|
|
||||||
@ide.$http.post(url, _csrf: window.csrfToken)
|
|
||||||
|
|
||||||
_parseDiff: (diff) ->
|
_parseDiff: (diff) ->
|
||||||
row = 0
|
row = 0
|
||||||
column = 0
|
column = 0
|
||||||
|
|||||||
@@ -169,10 +169,20 @@
|
|||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
line-height: @line-height-computed;
|
line-height: @line-height-computed;
|
||||||
}
|
}
|
||||||
.docs {
|
.action {
|
||||||
font-weight: bold;
|
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
.docs {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
.doc {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
color: @gray;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
li.loading-changes, li.empty-message {
|
li.loading-changes, li.empty-message {
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ describe "HistoryV2Manager", ->
|
|||||||
|
|
||||||
it "should setup the history scope on intialization", ->
|
it "should setup the history scope on intialization", ->
|
||||||
expect(@scope.history).to.deep.equal({
|
expect(@scope.history).to.deep.equal({
|
||||||
|
isV2: true
|
||||||
updates: []
|
updates: []
|
||||||
nextBeforeTimestamp: null
|
nextBeforeTimestamp: null
|
||||||
atEnd: false
|
atEnd: false
|
||||||
|
|||||||
Reference in New Issue
Block a user