mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 11:56:00 +00:00
#371 wip
This commit is contained in:
@@ -48,6 +48,15 @@
|
|||||||
|
|
||||||
$: isJson = _.isPlainObject(value) && !(value?.type == 'Buffer' && _.isArray(value.data)) && !value.$oid;
|
$: isJson = _.isPlainObject(value) && !(value?.type == 'Buffer' && _.isArray(value.data)) && !value.$oid;
|
||||||
$: jsonParsedValue = isJsonLikeLongString(value) ? safeJsonParse(value) : null;
|
$: jsonParsedValue = isJsonLikeLongString(value) ? safeJsonParse(value) : null;
|
||||||
|
|
||||||
|
function shouldShowTextModalButton(col) {
|
||||||
|
const m = col?.dataType?.match(/.*char.*\(([^\)]+)\)/);
|
||||||
|
if (m && m[1]) {
|
||||||
|
return parseInt(m[1]) >= 30 || m[1]?.toUpperCase() == 'MAX';
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<td
|
<td
|
||||||
@@ -114,6 +123,10 @@
|
|||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<!-- {#if shouldShowTextModalButton(col)}
|
||||||
|
<ShowFormButton icon="icon edit" on:click={() => openJsonDocument(value, undefined, true)} />
|
||||||
|
{/if} -->
|
||||||
|
|
||||||
{#if isAutoFillMarker}
|
{#if isAutoFillMarker}
|
||||||
<div class="autoFillMarker autofillHandleMarker" />
|
<div class="autoFillMarker autofillHandleMarker" />
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user