fix: render component view in revision preview

This commit is contained in:
Mo Bitar
2020-09-24 15:06:18 -05:00
parent 64e99f3c0d
commit 65498cad5c
6 changed files with 34 additions and 24 deletions

View File

@@ -74,11 +74,11 @@
| version of the app.
| Ensure you are running at least version 2.1 on all platforms.
iframe(
data-component-id='{{ctrl.componentUuid}}',
data-component-id='{{ctrl.component.uuid}}',
frameborder='0',
ng-init='ctrl.onIframeInit()'
ng-attr-id='component-iframe-{{ctrl.componentUuid}}',
ng-if='ctrl.componentUuid && !ctrl.reloading && ctrl.componentValid',
ng-attr-id='component-iframe-{{ctrl.component.uuid}}',
ng-if='ctrl.component.uuid && !ctrl.reloading && ctrl.componentValid',
ng-src='{{ctrl.getUrl() | trusted}}',
sandbox='allow-scripts allow-top-navigation-by-user-activation allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-modals allow-forms allow-downloads'
)

View File

@@ -16,15 +16,13 @@
a.sk-a.info.close-button(
ng-click="ctrl.dismiss(); $event.stopPropagation()"
) Close
.sk-panel-content.selectable
.sk-panel-content.selectable(ng-if="!ctrl.state.editor")
.sk-h2 {{ctrl.content.title}}
p.normal.sk-p(
style="white-space: pre-wrap; font-size: 16px;"
) {{ctrl.content.text}}
//- FIXME(baptiste): Component preview doesn't work
//-
//- component-view.component-view(
//- component-uuid="ctrl.editor.uuid"
//- ng-if="ctrl.editor",
//- application='ctrl.application'
//- )
component-view.component-view(
ng-if="ctrl.state.editor",
template-component="ctrl.state.editor",
application='ctrl.application'
)