edit form refactor
This commit is contained in:
@@ -32,55 +32,68 @@
|
||||
|
||||
}
|
||||
</script>
|
||||
<div class="d-flex gap-2">
|
||||
{#if editable}
|
||||
<div
|
||||
class="card mb-2 bg-light w-50 "
|
||||
style="border-color:{schema.color ?? '#ccc'}; border-width: 1px;"
|
||||
>
|
||||
<div class="card-body">
|
||||
Edge Data
|
||||
<div class="position-absolute d-flex end-0" style="top:5px">
|
||||
<button
|
||||
class="trash-button text-dark btn btn-sm btn-link"
|
||||
on:click={edit}
|
||||
>
|
||||
<Icon icon="pencil"/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
<EdgeData bind:this={edgeData} {field} {edge}/>
|
||||
{/if}
|
||||
|
||||
class="card mb-2 bg-light {classes}"
|
||||
style="border-color:{schema.color ?? '#ccc'}; border-width: 1px;"
|
||||
>
|
||||
<div class="card-body">
|
||||
<Preview {record} type="card"/>
|
||||
{#if editable}
|
||||
<EdgeData bind:this={edgeData} {field} {edge}/>
|
||||
{/if}
|
||||
<!-- <div class="overflow-hidden">-->
|
||||
<!-- <a-->
|
||||
<!-- class="title-link m-0 fs-5 text-decoration-none text-dark d-block"-->
|
||||
<!-- href="{channel.lucentUrl}/records/{record.id}"-->
|
||||
<!-- title={cardTitle}-->
|
||||
<!-- >-->
|
||||
<!-- {cardTitle}-->
|
||||
<!-- </a>-->
|
||||
<!-- <small class="text-muted">-->
|
||||
<!-- {schema.label}-->
|
||||
<!-- </small>-->
|
||||
<!-- <small class="text-muted">-->
|
||||
<!-- {#if record.status === "draft"}-->
|
||||
<!-- <Status status={record.status} />-->
|
||||
<!-- {/if}-->
|
||||
<!-- </small>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div
|
||||
class="card mb-2 bg-light w-100 {classes}"
|
||||
style="border-color:{schema.color ?? '#ccc'}; border-width: 1px;"
|
||||
>
|
||||
<div class="card-body">
|
||||
|
||||
<Preview {record} type="card"/>
|
||||
|
||||
<!-- <div class="overflow-hidden">-->
|
||||
<!-- <a-->
|
||||
<!-- class="title-link m-0 fs-5 text-decoration-none text-dark d-block"-->
|
||||
<!-- href="{channel.lucentUrl}/records/{record.id}"-->
|
||||
<!-- title={cardTitle}-->
|
||||
<!-- >-->
|
||||
<!-- {cardTitle}-->
|
||||
<!-- </a>-->
|
||||
<!-- <small class="text-muted">-->
|
||||
<!-- {schema.label}-->
|
||||
<!-- </small>-->
|
||||
<!-- <small class="text-muted">-->
|
||||
<!-- {#if record.status === "draft"}-->
|
||||
<!-- <Status status={record.status} />-->
|
||||
<!-- {/if}-->
|
||||
<!-- </small>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
{#if hasDelete}
|
||||
<div class="position-absolute d-flex end-0" style="top:5px">
|
||||
|
||||
{#if hasDelete}
|
||||
<div class="position-absolute d-flex end-0" style="top:5px">
|
||||
{#if editable}
|
||||
<button
|
||||
class="trash-button text-dark btn btn-sm btn-link"
|
||||
on:click={edit}
|
||||
on:click={remove}
|
||||
>
|
||||
<Icon icon="pencil"/>
|
||||
<Icon icon="trash-can"/>
|
||||
</button>
|
||||
{/if}
|
||||
<button
|
||||
class="trash-button text-dark btn btn-sm btn-link"
|
||||
on:click={remove}
|
||||
>
|
||||
<Icon icon="trash-can"/>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user