Skip to content

Commit

Permalink
fix(editor): teleport providers to body
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Oct 20, 2021
1 parent 59c339a commit 1da6d2a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
14 changes: 0 additions & 14 deletions src/components/provider/ProviderApp.vue

This file was deleted.

16 changes: 16 additions & 0 deletions src/components/provider/ProviderEditor.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<teleport to="body">
<EditorShortcutsSwitcher v-if="ABSOLUTE.shortcuts.switcher" />
<EditorShortcutsFinder v-else-if="ABSOLUTE.shortcuts.finder" />
<ProviderLogger v-else-if="ABSOLUTE.logger" />
<ProviderProjectCreate v-else-if="ABSOLUTE.project.new" />
<ProviderPDFConfiguration v-else-if="ABSOLUTE.pdf.configuration" />
<ProviderPDFPreview v-else-if="ABSOLUTE.pdf.preview" />
</teleport>
</template>

<script setup lang="ts">
import { useAbsoluteStore } from '@/store/absolute'
const ABSOLUTE = useAbsoluteStore()
</script>
3 changes: 2 additions & 1 deletion src/pages/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<EditorBase />
</main>
</section>
<ProviderApp />
<ProviderEditor />
</template>

<script setup lang="ts">
Expand All @@ -26,6 +26,7 @@
const { t } = useI18n()
keyboard.init()
useLocalStorage().onAutoSave(60)
onUnmounted(() => {
Expand Down

0 comments on commit 1da6d2a

Please sign in to comment.