mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 07:42:32 -05:00
adjust fonts
This commit is contained in:
1 parent
1e43fe8969
commit
2189c2e9fe
1 file changed
+19
-21
@@ -28,25 +28,16 @@
|
|||||||
:class="isDropdownAlignedRight ? 'right-0' : 'left-0'"
|
:class="isDropdownAlignedRight ? 'right-0' : 'left-0'"
|
||||||
class="absolute z-10 top-full mt-1 w-48 p-1 bg-white border border-neutral-200 rounded-lg shadow-lg max-h-64 overflow-y-auto"
|
class="absolute z-10 top-full mt-1 w-48 p-1 bg-white border border-neutral-200 rounded-lg shadow-lg max-h-64 overflow-y-auto"
|
||||||
>
|
>
|
||||||
<template
|
<button
|
||||||
v-for="(group, index) in [documentFonts, standardFonts]"
|
v-for="font in fonts"
|
||||||
:key="index"
|
:key="font.label"
|
||||||
|
class="block w-full text-left px-2 py-1 rounded-md hover:bg-neutral-100 truncate"
|
||||||
|
:class="{ 'bg-neutral-200': font.label === fontFamily }"
|
||||||
|
:style="{ fontFamily: font.value }"
|
||||||
|
@click="setSpanStyle('font-family', font.value)"
|
||||||
>
|
>
|
||||||
<div
|
{{ font.label }}
|
||||||
v-if="index && group.length && documentFonts.length"
|
</button>
|
||||||
class="my-1 border-t border-neutral-200"
|
|
||||||
/>
|
|
||||||
<button
|
|
||||||
v-for="font in group"
|
|
||||||
:key="font.label"
|
|
||||||
class="block w-full text-left px-2 py-1 rounded-md hover:bg-neutral-100 truncate"
|
|
||||||
:class="{ 'bg-neutral-200': font.label === fontFamily }"
|
|
||||||
:style="{ fontFamily: font.value }"
|
|
||||||
@click="setSpanStyle('font-family', font.value)"
|
|
||||||
>
|
|
||||||
{{ font.label }}
|
|
||||||
</button>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
@@ -316,10 +307,11 @@
|
|||||||
:height="16"
|
:height="16"
|
||||||
:stroke-width="1.6"
|
:stroke-width="1.6"
|
||||||
/>
|
/>
|
||||||
<span class="hidden sm:inline px-0.5">
|
<span class="hidden sm:inline px-0.5 font-mono">
|
||||||
{{ t('variable') }}
|
{{ t('variable') }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
<div class="w-px h-5 bg-neutral-200 mx-1 sm:mx-0.5" />
|
||||||
<button
|
<button
|
||||||
class="inline-flex items-center justify-center text-xs h-7 px-1 rounded-md hover:bg-neutral-100"
|
class="inline-flex items-center justify-center text-xs h-7 px-1 rounded-md hover:bg-neutral-100"
|
||||||
:title="t('create_condition')"
|
:title="t('create_condition')"
|
||||||
@@ -348,7 +340,7 @@
|
|||||||
font-family="ui-sans-serif, system-ui, sans-serif"
|
font-family="ui-sans-serif, system-ui, sans-serif"
|
||||||
>if</text>
|
>if</text>
|
||||||
</svg>
|
</svg>
|
||||||
<span class="hidden sm:inline px-0.5">
|
<span class="hidden sm:inline px-0.5 font-mono">
|
||||||
{{ t('condition') }}
|
{{ t('condition') }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -424,7 +416,13 @@ export default {
|
|||||||
{ label: 'Arial', value: 'Arial' },
|
{ label: 'Arial', value: 'Arial' },
|
||||||
{ label: 'Times New Roman', value: "'Times New Roman'" },
|
{ label: 'Times New Roman', value: "'Times New Roman'" },
|
||||||
{ label: 'Courier New', value: "'Courier New'" }
|
{ label: 'Courier New', value: "'Courier New'" }
|
||||||
].filter((font) => !this.documentFonts.some((documentFont) => documentFont.label === font.label))
|
]
|
||||||
|
},
|
||||||
|
fonts () {
|
||||||
|
return [
|
||||||
|
...this.documentFonts.filter((font) => !this.standardFonts.some((standardFont) => standardFont.label === font.label)),
|
||||||
|
...this.standardFonts
|
||||||
|
]
|
||||||
},
|
},
|
||||||
fontSizes () {
|
fontSizes () {
|
||||||
return [8, 9, 10, 10.5, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 48, 72]
|
return [8, 9, 10, 10.5, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 48, 72]
|
||||||
|
|||||||
Reference in new issue
Block a user