previewPanelV2.pug 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. .diff-panel.full-size(
  2. ng-if="history.isV2 && history.viewMode === HistoryViewModes.COMPARE && history.updates.length !== 0"
  3. )
  4. .diff(
  5. ng-show="!!history.selection.diff && !isHistoryLoading() && !history.selection.diff.error",
  6. ng-class="{ 'diff-binary': history.selection.diff.binary }"
  7. )
  8. .diff-editor-v2.hide-ace-cursor(
  9. ng-if="!history.selection.diff.binary"
  10. ace-editor="history",
  11. theme="settings.editorTheme",
  12. font-size="settings.fontSize",
  13. text="history.selection.diff.text",
  14. highlights="history.selection.diff.highlights",
  15. read-only="true",
  16. resize-on="layout:main:resize,history:toggle",
  17. navigate-highlights="true"
  18. )
  19. .alert.alert-info(ng-if="history.selection.diff.binary")
  20. | #{translate("binary_history_error")}
  21. .loading-panel(ng-show="isHistoryLoading()")
  22. i.fa.fa-spin.fa-refresh
  23. |   #{translate("loading")}…
  24. .error-panel(ng-show="history.selection.diff.error && !isHistoryLoading()")
  25. .alert.alert-danger #{translate("generic_something_went_wrong")}
  26. .point-in-time-panel.full-size(
  27. ng-if="history.isV2 && history.viewMode === HistoryViewModes.POINT_IN_TIME && history.updates.length !== 0"
  28. )
  29. .point-in-time-editor-container(
  30. ng-if="!!history.selection.file && !history.selection.file.loading && !history.selection.file.error"
  31. )
  32. .hide-ace-cursor(
  33. ng-if="!history.selection.file.binary"
  34. ace-editor="history-pointintime",
  35. theme="settings.editorTheme",
  36. font-size="settings.fontSize",
  37. text="history.selection.file.text",
  38. read-only="true",
  39. resize-on="layout:main:resize,history:toggle",
  40. )
  41. .alert.alert-info(ng-if="history.selection.file.binary")
  42. | #{translate("binary_history_error")}
  43. .loading-panel(ng-show="isHistoryLoading()")
  44. i.fa.fa-spin.fa-refresh
  45. |   #{translate("loading")}…
  46. .error-panel(ng-show="history.error")
  47. .alert.alert-danger
  48. p
  49. | #{translate("generic_history_error")}
  50. a(
  51. ng-href="mailto:#{settings.adminEmail}?Subject=Error%20loading%20history%20for%project%20{{ project_id }}",
  52. ng-non-bindable
  53. ) #{settings.adminEmail}
  54. p.clearfix
  55. a.alert-link-as-btn.pull-right(
  56. href
  57. ng-click="toggleHistory()"
  58. ) #{translate("back_to_editor")}
  59. .error-panel(ng-show="history.selection.file.error")
  60. .alert.alert-danger #{translate("generic_something_went_wrong")}