mirror of
https://github.com/docusealco/docuseal
synced 2026-11-14 07:52:32 -05:00
adjust editor
This commit is contained in:
1 parent
9b267d4a07
commit
1687a372ae
2 files changed
+27
-25
No files matched your search
@@ -27,7 +27,7 @@
|
|||||||
v-for="action in group"
|
v-for="action in group"
|
||||||
:key="action.title"
|
:key="action.title"
|
||||||
class="inline-flex items-center justify-center w-7 h-7 rounded-md"
|
class="inline-flex items-center justify-center w-7 h-7 rounded-md"
|
||||||
:class="[{ 'text-red-600': action.danger, 'bg-neutral-200': action.active }, isDisabled(action) ? 'opacity-50 cursor-not-allowed' : 'hover:bg-neutral-100']"
|
:class="{ 'text-red-600': action.danger, 'bg-neutral-200': action.active, 'hover:bg-neutral-100': !action.active && !isDisabled(action), 'opacity-50 cursor-not-allowed': isDisabled(action) }"
|
||||||
:title="action.structural && !coords.isRegular ? t('irregular_table_structure') : t(action.title)"
|
:title="action.structural && !coords.isRegular ? t('irregular_table_structure') : t(action.title)"
|
||||||
:disabled="isDisabled(action)"
|
:disabled="isDisabled(action)"
|
||||||
@click="$emit('command', action.command, action.arg)"
|
@click="$emit('command', action.command, action.arg)"
|
||||||
|
|||||||
@@ -31,8 +31,8 @@
|
|||||||
<button
|
<button
|
||||||
v-for="font in fonts"
|
v-for="font in fonts"
|
||||||
:key="font.label"
|
:key="font.label"
|
||||||
class="block w-full text-left px-2 py-1 rounded-md hover:bg-neutral-100 truncate"
|
class="block w-full text-left px-2 py-1 rounded-md truncate"
|
||||||
:class="{ 'bg-neutral-200': font.label === fontFamily }"
|
:class="font.label === fontFamily ? 'bg-neutral-200' : 'hover:bg-neutral-100'"
|
||||||
:style="{ fontFamily: font.value }"
|
:style="{ fontFamily: font.value }"
|
||||||
@click="setSpanStyle('font-family', font.value)"
|
@click="setSpanStyle('font-family', font.value)"
|
||||||
>
|
>
|
||||||
@@ -61,8 +61,8 @@
|
|||||||
<button
|
<button
|
||||||
v-for="size in fontSizes"
|
v-for="size in fontSizes"
|
||||||
:key="size"
|
:key="size"
|
||||||
class="block w-full text-left px-2 py-1 rounded-md hover:bg-neutral-100"
|
class="block w-full text-left px-2 py-1 rounded-md"
|
||||||
:class="{ 'bg-neutral-200': size === fontSize }"
|
:class="size === fontSize ? 'bg-neutral-200' : 'hover:bg-neutral-100'"
|
||||||
@click="setFontSize(size)"
|
@click="setFontSize(size)"
|
||||||
>
|
>
|
||||||
{{ size }}
|
{{ size }}
|
||||||
@@ -114,8 +114,8 @@
|
|||||||
<button
|
<button
|
||||||
v-for="value in lineHeights"
|
v-for="value in lineHeights"
|
||||||
:key="value"
|
:key="value"
|
||||||
class="block w-full text-left px-2 py-1 rounded-md hover:bg-neutral-100"
|
class="block w-full text-left px-2 py-1 rounded-md"
|
||||||
:class="{ 'bg-neutral-200': value === lineHeight }"
|
:class="value === lineHeight ? 'bg-neutral-200' : 'hover:bg-neutral-100'"
|
||||||
@click="setBlockStyle('line-height', `calc(${value} * 1.15)`)"
|
@click="setBlockStyle('line-height', `calc(${value} * 1.15)`)"
|
||||||
>
|
>
|
||||||
{{ value }}
|
{{ value }}
|
||||||
@@ -147,8 +147,8 @@
|
|||||||
<button
|
<button
|
||||||
v-for="(icon, align) in alignIcons"
|
v-for="(icon, align) in alignIcons"
|
||||||
:key="align"
|
:key="align"
|
||||||
class="inline-flex items-center justify-center w-7 h-7 rounded-md hover:bg-neutral-100"
|
class="inline-flex items-center justify-center w-7 h-7 rounded-md"
|
||||||
:class="{ 'bg-neutral-200': align === textAlign }"
|
:class="align === textAlign ? 'bg-neutral-200' : 'hover:bg-neutral-100'"
|
||||||
:title="t(align)"
|
:title="t(align)"
|
||||||
@click="setBlockStyle('text-align', align)"
|
@click="setBlockStyle('text-align', align)"
|
||||||
>
|
>
|
||||||
@@ -162,8 +162,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<button
|
<button
|
||||||
class="inline-flex items-center justify-center h-7 px-1 rounded-md hover:bg-neutral-100"
|
class="inline-flex items-center justify-center h-7 px-1 rounded-md"
|
||||||
:class="{ 'bg-neutral-200': listStyle }"
|
:class="listStyle ? 'bg-neutral-200' : 'hover:bg-neutral-100'"
|
||||||
:title="t('bullet_list')"
|
:title="t('bullet_list')"
|
||||||
@click="toggleDropdown('list')"
|
@click="toggleDropdown('list')"
|
||||||
>
|
>
|
||||||
@@ -185,8 +185,8 @@
|
|||||||
<button
|
<button
|
||||||
v-for="({ label, marker }, style) in listStyles"
|
v-for="({ label, marker }, style) in listStyles"
|
||||||
:key="style"
|
:key="style"
|
||||||
class="flex items-center gap-2 w-full px-2 py-1 rounded-md hover:bg-neutral-100"
|
class="flex items-center gap-2 w-full px-2 py-1 rounded-md"
|
||||||
:class="{ 'bg-neutral-200': style === listStyle }"
|
:class="style === listStyle ? 'bg-neutral-200' : 'hover:bg-neutral-100'"
|
||||||
@click="toggleList(style)"
|
@click="toggleList(style)"
|
||||||
>
|
>
|
||||||
<span class="w-4 text-center">{{ marker }}</span>
|
<span class="w-4 text-center">{{ marker }}</span>
|
||||||
@@ -197,8 +197,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-0.5">
|
<div class="flex items-center gap-0.5">
|
||||||
<button
|
<button
|
||||||
class="inline-flex items-center justify-center w-7 h-7 rounded-md hover:bg-neutral-100"
|
class="inline-flex items-center justify-center w-7 h-7 rounded-md"
|
||||||
:class="{ 'bg-neutral-200': isBold }"
|
:class="isBold ? 'bg-neutral-200' : 'hover:bg-neutral-100'"
|
||||||
:title="t('bold')"
|
:title="t('bold')"
|
||||||
@click="toggleBold"
|
@click="toggleBold"
|
||||||
>
|
>
|
||||||
@@ -208,8 +208,8 @@
|
|||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="inline-flex items-center justify-center w-7 h-7 rounded-md hover:bg-neutral-100"
|
class="inline-flex items-center justify-center w-7 h-7 rounded-md"
|
||||||
:class="{ 'bg-neutral-200': isItalic }"
|
:class="isItalic ? 'bg-neutral-200' : 'hover:bg-neutral-100'"
|
||||||
:title="t('italic')"
|
:title="t('italic')"
|
||||||
@click="toggleItalic"
|
@click="toggleItalic"
|
||||||
>
|
>
|
||||||
@@ -219,8 +219,8 @@
|
|||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="inline-flex items-center justify-center w-7 h-7 rounded-md hover:bg-neutral-100"
|
class="inline-flex items-center justify-center w-7 h-7 rounded-md"
|
||||||
:class="{ 'bg-neutral-200': isUnderline }"
|
:class="isUnderline ? 'bg-neutral-200' : 'hover:bg-neutral-100'"
|
||||||
:title="t('underline')"
|
:title="t('underline')"
|
||||||
@click="toggleUnderline"
|
@click="toggleUnderline"
|
||||||
>
|
>
|
||||||
@@ -230,8 +230,8 @@
|
|||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="inline-flex items-center justify-center w-7 h-7 rounded-md hover:bg-neutral-100"
|
class="inline-flex items-center justify-center w-7 h-7 rounded-md"
|
||||||
:class="{ 'bg-neutral-200': isStrike }"
|
:class="isStrike ? 'bg-neutral-200' : 'hover:bg-neutral-100'"
|
||||||
:title="t('strikethrough')"
|
:title="t('strikethrough')"
|
||||||
@click="toggleStrike"
|
@click="toggleStrike"
|
||||||
>
|
>
|
||||||
@@ -295,11 +295,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="!isCellSelection">
|
|
||||||
<div class="w-px h-5 bg-neutral-200 mx-1 sm:mx-0.5" />
|
<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"
|
||||||
|
:class="isCellSelection ? 'opacity-50 cursor-not-allowed' : 'hover:bg-neutral-100'"
|
||||||
:title="t('create_variable')"
|
:title="t('create_variable')"
|
||||||
|
:disabled="isCellSelection"
|
||||||
@click="wrapVariable"
|
@click="wrapVariable"
|
||||||
>
|
>
|
||||||
<IconBracketsContain
|
<IconBracketsContain
|
||||||
@@ -313,8 +314,10 @@
|
|||||||
</button>
|
</button>
|
||||||
<div class="w-px h-5 bg-neutral-200 mx-1 sm:mx-0.5" />
|
<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"
|
||||||
|
:class="isCellSelection ? 'opacity-50 cursor-not-allowed' : 'hover:bg-neutral-100'"
|
||||||
:title="t('create_condition')"
|
:title="t('create_condition')"
|
||||||
|
:disabled="isCellSelection"
|
||||||
@click="wrapCondition"
|
@click="wrapCondition"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
@@ -344,7 +347,6 @@
|
|||||||
{{ t('condition') }}
|
{{ t('condition') }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in new issue
Block a user