mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-20 01:53:47 +00:00
Merge pull request #2621 from overleaf/jpa-ns-empty-history
Add messaging to projects with empty history GitOrigin-RevId: 3fab0b115d35ec3d7f7d1ffa5603b7c7d3423c94
This commit is contained in:
parent
b2ee3bf2bb
commit
506bc44336
5 changed files with 12 additions and 7 deletions
|
@ -1,10 +1,14 @@
|
|||
div#history(ng-show="ui.view == 'history'")
|
||||
div#history(ng-show="ui.view == 'history' && history.updates.length > 0")
|
||||
include ./history/entriesListV1
|
||||
include ./history/entriesListV2
|
||||
|
||||
include ./history/diffPanelV1
|
||||
include ./history/previewPanelV2
|
||||
|
||||
.full-size(ng-if="ui.view == 'history' && history.updates.length === 0 && !isHistoryLoading()")
|
||||
.no-history-available
|
||||
h3
|
||||
| #{translate('no_history_available')}
|
||||
script(type="text/ng-template", id="historyRestoreDiffModalTemplate")
|
||||
.modal-header
|
||||
button.close(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.diff-panel.full-size(
|
||||
ng-if="history.isV2 && history.viewMode === HistoryViewModes.COMPARE"
|
||||
ng-if="history.isV2 && history.viewMode === HistoryViewModes.COMPARE && history.updates.length !== 0"
|
||||
)
|
||||
.diff(
|
||||
ng-show="!!history.selection.diff && !isHistoryLoading() && !history.selection.diff.error",
|
||||
|
@ -26,7 +26,7 @@
|
|||
.alert.alert-danger #{translate("generic_something_went_wrong")}
|
||||
|
||||
.point-in-time-panel.full-size(
|
||||
ng-if="history.isV2 && history.viewMode === HistoryViewModes.POINT_IN_TIME"
|
||||
ng-if="history.isV2 && history.viewMode === HistoryViewModes.POINT_IN_TIME && history.updates.length !== 0"
|
||||
)
|
||||
.point-in-time-editor-container(
|
||||
ng-if="!!history.selection.file && !history.selection.file.loading && !history.selection.file.error"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
//- point-in-time mode actions
|
||||
div.history-toolbar-actions(
|
||||
ng-if="history.viewMode === HistoryViewModes.POINT_IN_TIME && !history.error"
|
||||
ng-if="history.viewMode === HistoryViewModes.POINT_IN_TIME && !history.error && history.updates.length > 0"
|
||||
)
|
||||
button.history-toolbar-btn(
|
||||
ng-click="showAddLabelDialog();"
|
||||
|
@ -68,7 +68,7 @@
|
|||
|
||||
//- compare mode actions
|
||||
div.history-toolbar-actions(
|
||||
ng-if="history.viewMode === HistoryViewModes.COMPARE && !history.error"
|
||||
ng-if="history.viewMode === HistoryViewModes.COMPARE && !history.error && history.updates.length > 0"
|
||||
)
|
||||
button.history-toolbar-btn(
|
||||
ng-click="toggleHistoryViewMode();"
|
||||
|
@ -91,7 +91,7 @@
|
|||
| Error restoring, sorry
|
||||
|
||||
.history-toolbar-entries-list(
|
||||
ng-if="!history.error"
|
||||
ng-if="!history.error && history.updates.length > 0"
|
||||
)
|
||||
toggle-switch(
|
||||
ng-model="toolbarUIConfig.showOnlyLabels"
|
||||
|
|
|
@ -189,7 +189,6 @@ define([
|
|||
}
|
||||
this.$scope.history.error = null
|
||||
this.$scope.history.showOnlyLabels = this._getShowOnlyLabelsUserPref()
|
||||
this.$scope.history.loadingFileTree = true
|
||||
}
|
||||
|
||||
toggleHistoryViewMode() {
|
||||
|
|
|
@ -95,6 +95,7 @@
|
|||
top: @editor-toolbar-height;
|
||||
}
|
||||
|
||||
.no-history-available,
|
||||
.no-file-selection,
|
||||
.multi-selection-ongoing {
|
||||
&::before {
|
||||
|
@ -107,6 +108,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.no-history-available,
|
||||
.no-file-selection-message,
|
||||
.multi-selection-message {
|
||||
width: 50%;
|
||||
|
|
Loading…
Add table
Reference in a new issue