mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Revert "Show simpler UI when there is only one user."
This reverts commit 48300bd5b2ef01651e64dad3183e65d5d5798955.
This commit is contained in:
parent
dae5381af7
commit
8925dc5a78
2 changed files with 3 additions and 20 deletions
|
@ -51,22 +51,14 @@
|
|||
ng-if="editor.wantTrackChanges === true"
|
||||
)
|
||||
i.fa.fa-circle
|
||||
span(ng-click="handleTrackChangesStateClick();", ng-if="editor.wantTrackChanges === false") !{translate("track_changes_is_off")}
|
||||
span(ng-click="handleTrackChangesStateClick();", ng-if="editor.wantTrackChanges === true") !{translate("track_changes_is_on")}
|
||||
span(ng-click="toggleFullTCStateCollapse();", ng-if="editor.wantTrackChanges === false") !{translate("track_changes_is_off")}
|
||||
span(ng-click="toggleFullTCStateCollapse();", ng-if="editor.wantTrackChanges === true") !{translate("track_changes_is_on")}
|
||||
span.rp-tc-state-collapse(
|
||||
ng-if="reviewPanel.isMultiUser"
|
||||
ng-class="{ 'rp-tc-state-collapse-on': reviewPanel.fullTCStateCollapsed }"
|
||||
)
|
||||
i.fa.fa-angle-down
|
||||
review-panel-toggle(
|
||||
ng-if="!reviewPanel.isMultiUser"
|
||||
ng-model="reviewPanel.trackChangesOnForEveryone"
|
||||
on-toggle="toggleTrackChangesForEveryone(isOn);"
|
||||
disabled="!project.features.trackChanges || !permissions.write"
|
||||
)
|
||||
ul.rp-tc-state(
|
||||
review-panel-collapse-height="reviewPanel.fullTCStateCollapsed"
|
||||
ng-if="reviewPanel.isMultiUser"
|
||||
)
|
||||
li.rp-tc-state-item.rp-tc-state-item-everyone
|
||||
span.rp-tc-state-item-name Everyone
|
||||
|
|
|
@ -34,7 +34,6 @@ define [
|
|||
resolvedThreadIds: {}
|
||||
rendererData: {}
|
||||
formattedProjectMembers: {}
|
||||
isMultiUser: false
|
||||
fullTCStateCollapsed: true
|
||||
loadingThreads: false
|
||||
# All selected changes. If a aggregated change (insertion + deletion) is selection, the two ids
|
||||
|
@ -72,13 +71,11 @@ define [
|
|||
|
||||
$scope.$watch "project.members", (members) ->
|
||||
$scope.reviewPanel.formattedProjectMembers = {}
|
||||
$scope.reviewPanel.isMultiUser = false
|
||||
if $scope.project?.owner?
|
||||
$scope.reviewPanel.formattedProjectMembers[$scope.project.owner._id] = formatUser($scope.project.owner)
|
||||
if $scope.project?.members?
|
||||
for member in members
|
||||
if member.privileges == "readAndWrite"
|
||||
$scope.reviewPanel.isMultiUser = true
|
||||
$scope.reviewPanel.formattedProjectMembers[member._id] = formatUser(member)
|
||||
|
||||
$scope.commentState =
|
||||
|
@ -588,12 +585,6 @@ define [
|
|||
$scope.gotoEntry = (doc_id, entry) ->
|
||||
ide.editorManager.openDocId(doc_id, { gotoOffset: entry.offset })
|
||||
|
||||
$scope.handleTrackChangesStateClick = () ->
|
||||
if $scope.reviewPanel.isMultiUser
|
||||
$scope.toggleFullTCStateCollapse()
|
||||
else
|
||||
$scope.toggleTrackChangesForEveryone()
|
||||
|
||||
$scope.toggleFullTCStateCollapse = () ->
|
||||
if $scope.project.features.trackChanges
|
||||
reviewPanel.fullTCStateCollapsed = !reviewPanel.fullTCStateCollapsed
|
||||
|
@ -642,7 +633,7 @@ define [
|
|||
_setUserTCState(member._id, state[member._id] ? false)
|
||||
_setUserTCState($scope.project.owner._id, state[$scope.project.owner._id] ? false)
|
||||
|
||||
$scope.toggleTrackChangesForEveryone = (onForEveryone = !reviewPanel.trackChangesOnForEveryone) ->
|
||||
$scope.toggleTrackChangesForEveryone = (onForEveryone) ->
|
||||
_setEveryoneTCState onForEveryone, true
|
||||
applyClientTrackChangesStateToServer()
|
||||
|
||||
|
|
Loading…
Reference in a new issue