@ -6,7 +6,7 @@
class="preview-iframe"
sandbox="allow-scripts allow-same-origin allow-forms"
></iframe>
<div class="control-buttons">
<div v-if="!isInIframe" class="control-buttons">
<button @click="goHome" class="control-btn back-btn" title="BACK HOME">
<span>🏠</span>
</button>
@ -111,6 +111,10 @@ const documentVisible = ref(false);
const currentDocument = ref<Document | null>(null);
const previewUrl = ref('');
const isInIframe = computed(() => {
return window.self !== window.top;
});
const canEdit = computed(() => {
if (!project.value) return false;
return userStore.isAuthenticated &&