Display signatures

This commit is contained in:
Adria Navarro 2024-09-26 13:41:54 +02:00
parent 0c44f58466
commit 031bdcfeb5
2 changed files with 13 additions and 2 deletions

View File

@ -2,6 +2,7 @@
import { onMount, getContext } from "svelte"
import { Dropzone } from "@budibase/bbui"
import GridPopover from "../overlays/GridPopover.svelte"
import { FieldType } from "@budibase/types"
export let value
export let focused = false
@ -82,7 +83,12 @@
{#each value || [] as attachment}
{#if attachment}
{#if isImage(attachment.extension)}
<img src={attachment.url} alt={attachment.extension} />
<img
class:light={!$props?.darkMode &&
schema.type === FieldType.SIGNATURE_SINGLE}
src={attachment.url}
alt={attachment.extension}
/>
{:else}
<div class="file" title={attachment.name}>
{attachment.extension}
@ -142,4 +148,9 @@
width: 320px;
padding: var(--cell-padding);
}
.attachment-cell img.light {
-webkit-filter: invert(100%);
filter: invert(100%);
}
</style>

View File

@ -5,7 +5,7 @@ import { getCellID, parseCellID } from "../lib/utils"
import { tick } from "svelte"
import { Helpers } from "@budibase/bbui"
import { sleep } from "../../../utils/utils"
import { FieldType, RelationshipType } from "@budibase/types"
import { FieldType } from "@budibase/types"
import { getRelatedTableValues } from "../../../utils"
export const createStores = () => {