diff --git a/services/web/app/views/project/editor/history/diffPanelV1.pug b/services/web/app/views/project/editor/history/diffPanelV1.pug index 14af4b2f47..a6b100b45a 100644 --- a/services/web/app/views/project/editor/history/diffPanelV1.pug +++ b/services/web/app/views/project/editor/history/diffPanelV1.pug @@ -1,6 +1,15 @@ .diff-panel.full-size(ng-if="!history.isV2", ng-controller="HistoryDiffController") + div( + ng-controller="FileViewController" + ng-if="ui.view == 'history' && openFile" + ) + file-view( + file="file" + store-references-keys="storeReferencesKeys" + ) + .diff( - ng-if="!!history.diff && !history.diff.loading && !history.diff.deleted && !history.diff.error && !history.diff.binary" + ng-if="!!history.diff && !history.diff.loading && !history.diff.deleted && !history.diff.error && !openFile" ) .toolbar.toolbar-alt span.name diff --git a/services/web/frontend/js/ide/binary-files/BinaryFilesManager.js b/services/web/frontend/js/ide/binary-files/BinaryFilesManager.js index 1703374f32..51a9cc7cc5 100644 --- a/services/web/frontend/js/ide/binary-files/BinaryFilesManager.js +++ b/services/web/frontend/js/ide/binary-files/BinaryFilesManager.js @@ -26,7 +26,9 @@ export default BinaryFilesManager = class BinaryFilesManager { openFile(file) { this.ide.fileTreeManager.selectEntity(file) - this.$scope.ui.view = 'file' + if (this.$scope.ui.view !== 'history') { + this.$scope.ui.view = 'file' + } this.$scope.openFile = null this.$scope.$apply() return window.setTimeout( @@ -46,7 +48,9 @@ export default BinaryFilesManager = class BinaryFilesManager { return window.setTimeout( () => { this.$scope.openFile = null - this.$scope.ui.view = 'editor' + if (this.$scope.ui.view !== 'history') { + this.$scope.ui.view = 'editor' + } this.$scope.$apply() }, 0,