File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
packages/app/src/app/pages/common/Modals/ShareModal2 Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,17 @@ function getUrl({ settings, sandbox }) {
123123 return url ;
124124}
125125
126+ function getIframeCode ( { settings, sandbox } ) {
127+ const url = getUrl ( { settings, sandbox } ) ;
128+
129+ return `<iframe src=${ url }
130+ style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
131+ title=${ sandbox . title }
132+ allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"
133+ sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
134+ ></iframe>` ;
135+ }
136+
126137function ShareModal ( ) {
127138 const {
128139 state : {
@@ -319,7 +330,7 @@ function ShareModal() {
319330 code
320331 rows = { 5 }
321332 readOnly
322- value = { getUrl ( { settings, sandbox } ) }
333+ value = { getIframeCode ( { settings, sandbox } ) }
323334 ref = { urlContainer }
324335 />
325336 < Button onClick = { copyEmbedCode } >
@@ -338,7 +349,7 @@ function ShareModal() {
338349 < Preview >
339350 < iframe
340351 src = { getUrl ( { settings, sandbox } ) }
341- title = "Dark Magic Variant"
352+ title = { sandbox . title }
342353 allow = "geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"
343354 sandbox = "allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
344355 />
You can’t perform that action at this time.
0 commit comments