-
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
9 changed files
with
409 additions
and
62 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
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,5 @@ | ||
<template> | ||
<div | ||
class="mt-2 mb-1 h-1 w-full px-5 border-t border-theme-background-2 bg-theme-transparent" | ||
/> | ||
</template> |
133 changes: 133 additions & 0 deletions
133
src/components/editor/header/items/EditorBaseHeaderCreate.vue
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,133 @@ | ||
<template> | ||
<!-- Create --> | ||
<EditorHeaderButton v-if="PROJECT.name !== env.projectEmpty()"> | ||
<template #icon> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
aria-hidden="true" | ||
role="img" | ||
width="21" | ||
height="21" | ||
preserveAspectRatio="xMidYMid meet" | ||
viewBox="0 0 384 512" | ||
> | ||
<path | ||
d="M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm76.45 211.36l-96.42 95.7c-6.65 6.61-17.39 6.61-24.04 0l-96.42-95.7C73.42 337.29 80.54 320 94.82 320H160v-80c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v80h65.18c14.28 0 21.4 17.29 11.27 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z" | ||
fill="currentColor" | ||
></path> | ||
</svg> | ||
</template> | ||
<template #bar> | ||
<EditorHeaderItem | ||
:text="t('editor.bar.pdf.configuration')" | ||
shortcut="CTRL + G" | ||
@action="pdf.external().onConfigurationPDF()" | ||
> | ||
<template #icon> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
aria-hidden="true" | ||
role="img" | ||
width="24" | ||
height="24" | ||
preserveAspectRatio="xMidYMid meet" | ||
viewBox="0 0 24 24" | ||
> | ||
<path | ||
d="M22 2H6v16h16V2zm-10.5 9H9v2H7.5V7h4v4zm5 .5c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v16h16v-2H4V6zm10 5.5h1v-3h-1v3z" | ||
fill="currentColor" | ||
></path> | ||
</svg> | ||
</template> | ||
</EditorHeaderItem> | ||
<EditorHeaderItem | ||
:text="t('editor.bar.pdf.preview')" | ||
shortcut="CTRL + Shift + G" | ||
@action="ABSOLUTE.pdf.preview = true" | ||
> | ||
<template #icon> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
aria-hidden="true" | ||
role="img" | ||
width="24" | ||
height="24" | ||
preserveAspectRatio="xMidYMid meet" | ||
viewBox="0 0 24 24" | ||
> | ||
<path | ||
d="M22 2H6v16h16V2zm-10.5 9H9v2H7.5V7h4v4zm5 .5c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v16h16v-2H4V6zm10 5.5h1v-3h-1v3z" | ||
fill="currentColor" | ||
></path> | ||
</svg> | ||
</template> | ||
</EditorHeaderItem> | ||
<EditorHeaderItem | ||
:text="t('editor.bar.pdf.generate')" | ||
shortcut="CTRL + Alt + G" | ||
@action="pdf.external().onGeneratePDF()" | ||
> | ||
<template #icon> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
aria-hidden="true" | ||
role="img" | ||
width="24" | ||
height="24" | ||
preserveAspectRatio="xMidYMid meet" | ||
viewBox="0 0 24 24" | ||
> | ||
<path | ||
d="M22 2H6v16h16V2zm-10.5 9H9v2H7.5V7h4v4zm5 .5c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v16h16v-2H4V6zm10 5.5h1v-3h-1v3z" | ||
fill="currentColor" | ||
></path> | ||
</svg> | ||
</template> | ||
</EditorHeaderItem> | ||
<EditorHeaderItemDiv /> | ||
<EditorHeaderItem | ||
:text="t('editor.bar.pdf.generate')" | ||
@action="docx.generate()" | ||
> | ||
<template #icon> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
aria-hidden="true" | ||
role="img" | ||
width="24" | ||
height="24" | ||
preserveAspectRatio="xMidYMid meet" | ||
viewBox="0 0 1024 1024" | ||
> | ||
<path | ||
d="M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM512 566.1l52.81 197a12 12 0 0 0 11.6 8.9h31.77a12 12 0 0 0 11.6-8.88l74.37-276a12 12 0 0 0 .4-3.12a12 12 0 0 0-12-12h-35.57a12 12 0 0 0-11.7 9.31l-45.78 199.1l-49.76-199.32A12 12 0 0 0 528.1 472h-32.2a12 12 0 0 0-11.64 9.1L434.6 680.01L388.5 481.3a12 12 0 0 0-11.68-9.29h-35.39a12 12 0 0 0-3.11.41a12 12 0 0 0-8.47 14.7l74.17 276A12 12 0 0 0 415.6 772h31.99a12 12 0 0 0 11.59-8.9l52.81-197z" | ||
fill="currentColor" | ||
></path> | ||
</svg> | ||
</template> | ||
</EditorHeaderItem> | ||
</template> | ||
</EditorHeaderButton> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useAbsoluteStore } from '@/store/absolute' | ||
import { useProjectStore } from '@/store/project' | ||
import { useEnv } from '@/use/env' | ||
import { usePDF } from '@/use/pdf' | ||
import { useI18n } from 'vue-i18n' | ||
import { useDocx } from '@/use/docx' | ||
const ABSOLUTE = useAbsoluteStore() | ||
const PROJECT = useProjectStore() | ||
const env = useEnv() | ||
const pdf = usePDF() | ||
const docx = useDocx() | ||
const { t } = useI18n() | ||
</script> |
55 changes: 0 additions & 55 deletions
55
src/components/editor/header/items/EditorBaseHeaderPDF.vue
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.