diffPanelV2.pug 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .diff-panel.full-size(ng-if="history.isV2", ng-controller="HistoryV2DiffController")
  2. .diff(
  3. ng-if="!!history.diff && !history.diff.loading && !history.diff.error",
  4. ng-class="{ 'diff-binary': history.diff.binary }"
  5. )
  6. .toolbar.toolbar-alt
  7. span.name(ng-if="history.diff.binary")
  8. strong {{history.diff.pathname}}
  9. span.name(ng-if="!history.diff.binary")
  10. | <strong>{{history.diff.highlights.length}} </strong>
  11. ng-pluralize(
  12. count="history.diff.highlights.length",
  13. when="{\
  14. 'one': 'change',\
  15. 'other': 'changes'\
  16. }"
  17. )
  18. | in <strong>{{history.diff.pathname}}</strong>
  19. .toolbar-right(ng-if="history.selection.docs[history.selection.pathname].deletedAtV")
  20. button.btn.btn-danger.btn-sm(
  21. ng-click="restoreDeletedFile()"
  22. ng-show="!restoreState.error"
  23. ng-disabled="restoreState.inflight"
  24. )
  25. i.fa.fa-fw.fa-step-backward
  26. span(ng-show="!restoreState.inflight")
  27. | Restore this deleted file
  28. span(ng-show="restoreState.inflight")
  29. | Restoring...
  30. span.text-danger(ng-show="restoreState.error")
  31. | Error restoring, sorry
  32. .diff-editor.hide-ace-cursor(
  33. ng-if="!history.diff.binary"
  34. ace-editor="history",
  35. theme="settings.theme",
  36. font-size="settings.fontSize",
  37. text="history.diff.text",
  38. highlights="history.diff.highlights",
  39. read-only="true",
  40. resize-on="layout:main:resize",
  41. navigate-highlights="true"
  42. )
  43. .alert.alert-info(ng-if="history.diff.binary")
  44. | We're still working on showing image and binary changes, sorry. Stay tuned!
  45. .loading-panel(ng-show="history.diff.loading")
  46. i.fa.fa-spin.fa-refresh
  47. | &nbsp;&nbsp;#{translate("loading")}...
  48. .error-panel(ng-show="history.diff.error")
  49. .alert.alert-danger #{translate("generic_something_went_wrong")}