-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
189 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<template> | ||
<AsideText | ||
class="wb-aside-button" | ||
:text="t('editor.aside.pdf.preview')" | ||
:shortcuts="store.state.shortcuts.previewPDF[0]" | ||
@click.prevent="onPreviewPDF" | ||
> | ||
</AsideText> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useI18n } from 'vue-i18n' | ||
import { useStore } from 'vuex' | ||
const store = useStore() | ||
const { t } = useI18n() | ||
const onPreviewPDF = async () => { | ||
store.commit('absolute/switchPdfPreview', true) | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<HeroIcon class="wb-text" @click.prevent="onClick"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
class="h-6 w-6" | ||
viewBox="0 0 20 20" | ||
fill="currentColor" | ||
> | ||
<path | ||
fill-rule="evenodd" | ||
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" | ||
clip-rule="evenodd" | ||
/> | ||
</svg> | ||
</HeroIcon> | ||
<div ref="preview" class="w-1/2 h-1/2 p-2"></div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { usePDF } from '@/use/pdf' | ||
import { ref, onMounted } from 'vue' | ||
import { useStore } from 'vuex' | ||
const preview = ref<HTMLElement | null>(null) | ||
const store = useStore() | ||
onMounted(() => { | ||
usePDF().external(store).onPreviewPDF(preview.value) | ||
}) | ||
const onClick = () => { | ||
store.commit('absolute/switchPdfPreview', false) | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
<template> | ||
<EditorCommands v-if="store.state.absolute.commands" /> | ||
<EditorShortcutsSwitcher v-if="store.state.absolute.shortcuts.switcher" /> | ||
<ProviderLoad v-if="store.state.absolute.load" /> | ||
<ProviderLogger v-if="store.state.absolute.logger" /> | ||
<ProviderPDF v-if="store.state.absolute.pdf.configuration" /> | ||
<EditorCommands v-if="absolute.commands" /> | ||
<EditorShortcutsSwitcher v-if="absolute.shortcuts.switcher" /> | ||
<ProviderLoad v-if="absolute.load" /> | ||
<ProviderLogger v-if="absolute.logger" /> | ||
<ProviderPDFConfiguration v-if="absolute.pdf.configuration" /> | ||
<ProviderPDFPreview v-if="absolute.pdf.preview" /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed } from 'vue' | ||
import { useStore } from 'vuex' | ||
const store = useStore() | ||
const absolute = computed(() => store.state.absolute) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<template> | ||
<div | ||
id="pdf-absolute" | ||
class=" | ||
absolute | ||
top-1/2 | ||
left-1/2 | ||
transform | ||
-translate-x-1/2 -translate-y-1/2 | ||
overflow-y-auto | ||
duration-700 | ||
bg-white | ||
dark:bg-gray-800 | ||
transition | ||
flex flex-col | ||
z-preview | ||
" | ||
> | ||
<PDFPreview /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters