refac
This commit is contained in:
1 parent
f4a0d3c973
commit
54d7a22370
5 files changed
+34
-1
No files matched your search
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte';
|
||||
import { getPortProxyUrl } from '$lib/apis/terminal';
|
||||
import { settings } from '$lib/stores';
|
||||
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
@@ -268,7 +269,9 @@
|
||||
src={proxyUrl}
|
||||
title="Port {port} preview"
|
||||
class="w-full h-full border-0 bg-white"
|
||||
sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads"
|
||||
sandbox="allow-scripts{($settings?.terminalPreviewAllowSameOrigin ?? true)
|
||||
? ' allow-same-origin'
|
||||
: ''} allow-forms allow-popups allow-modals allow-downloads"
|
||||
on:load={onIframeLoad}
|
||||
/>
|
||||
{/key}
|
||||
|
||||
@@ -274,6 +274,8 @@
|
||||
'iframe sandbox allow same origin',
|
||||
'iframesandboxallowforms',
|
||||
'iframesandboxallowsameorigin',
|
||||
'terminal preview allow same origin',
|
||||
'terminalpreviewallowsameorigin',
|
||||
'imagecompression',
|
||||
'image compression',
|
||||
'imagemaxcompressionsize',
|
||||
|
||||
Reference in new issue
Block a user