mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 23:42:32 -05:00
adjust editor
This commit is contained in:
1 parent
9b267d4a07
commit
1687a372ae
2 files changed
+73
-71
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,56 +295,58 @@
|
|||||||
</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"
|
||||||
class="inline-flex items-center justify-center text-xs h-7 px-1 rounded-md hover:bg-neutral-100"
|
:class="isCellSelection ? 'opacity-50 cursor-not-allowed' : 'hover:bg-neutral-100'"
|
||||||
:title="t('create_variable')"
|
:title="t('create_variable')"
|
||||||
@click="wrapVariable"
|
:disabled="isCellSelection"
|
||||||
>
|
@click="wrapVariable"
|
||||||
<IconBracketsContain
|
>
|
||||||
:width="16"
|
<IconBracketsContain
|
||||||
:height="16"
|
:width="16"
|
||||||
:stroke-width="1.6"
|
:height="16"
|
||||||
/>
|
:stroke-width="1.6"
|
||||||
<span class="hidden sm:inline px-0.5 font-mono">
|
/>
|
||||||
{{ t('variable') }}
|
<span class="hidden sm:inline px-0.5 font-mono">
|
||||||
</span>
|
{{ t('variable') }}
|
||||||
</button>
|
</span>
|
||||||
<div class="w-px h-5 bg-neutral-200 mx-1 sm:mx-0.5" />
|
</button>
|
||||||
<button
|
<div class="w-px h-5 bg-neutral-200 mx-1 sm:mx-0.5" />
|
||||||
class="inline-flex items-center justify-center text-xs h-7 px-1 rounded-md hover:bg-neutral-100"
|
<button
|
||||||
:title="t('create_condition')"
|
class="inline-flex items-center justify-center text-xs h-7 px-1 rounded-md"
|
||||||
@click="wrapCondition"
|
:class="isCellSelection ? 'opacity-50 cursor-not-allowed' : 'hover:bg-neutral-100'"
|
||||||
>
|
:title="t('create_condition')"
|
||||||
<svg
|
:disabled="isCellSelection"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
@click="wrapCondition"
|
||||||
width="16"
|
>
|
||||||
height="16"
|
<svg
|
||||||
viewBox="0 0 24 24"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
fill="none"
|
width="16"
|
||||||
stroke="currentColor"
|
height="16"
|
||||||
stroke-width="1.6"
|
viewBox="0 0 24 24"
|
||||||
stroke-linecap="round"
|
fill="none"
|
||||||
stroke-linejoin="round"
|
stroke="currentColor"
|
||||||
class="tabler-icon tabler-icon-brackets-contain"
|
stroke-width="1.6"
|
||||||
><path d="M7 4h-4v16h4" /><path d="M17 4h4v16h-4" />
|
stroke-linecap="round"
|
||||||
<text
|
stroke-linejoin="round"
|
||||||
x="12"
|
class="tabler-icon tabler-icon-brackets-contain"
|
||||||
y="16.5"
|
><path d="M7 4h-4v16h4" /><path d="M17 4h4v16h-4" />
|
||||||
text-anchor="middle"
|
<text
|
||||||
fill="currentColor"
|
x="12"
|
||||||
stroke="none"
|
y="16.5"
|
||||||
font-size="14"
|
text-anchor="middle"
|
||||||
font-weight="600"
|
fill="currentColor"
|
||||||
font-family="ui-sans-serif, system-ui, sans-serif"
|
stroke="none"
|
||||||
>if</text>
|
font-size="14"
|
||||||
</svg>
|
font-weight="600"
|
||||||
<span class="hidden sm:inline px-0.5 font-mono">
|
font-family="ui-sans-serif, system-ui, sans-serif"
|
||||||
{{ t('condition') }}
|
>if</text>
|
||||||
</span>
|
</svg>
|
||||||
</button>
|
<span class="hidden sm:inline px-0.5 font-mono">
|
||||||
</template>
|
{{ t('condition') }}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in new issue
Block a user