Lists: owner-only database browser/editor for all tables (meta.edit_log audit)
All checks were successful
Deploy production / deploy (push) Successful in 2m33s
All checks were successful
Deploy production / deploy (push) Successful in 2m33s
This commit is contained in:
@@ -21,7 +21,9 @@
|
||||
|
||||
const kind = $derived(column.kind);
|
||||
const long = $derived(
|
||||
kind === 'json' || column.uiType === 'longtext' || (kind === 'text' && (value?.length ?? 0) > 80)
|
||||
kind === 'json' ||
|
||||
column.uiType === 'longtext' ||
|
||||
(kind === 'text' && (value?.length ?? 0) > 80)
|
||||
);
|
||||
const listId = `fk-${Math.random().toString(36).slice(2)}`;
|
||||
let options = $state.raw<{ value: string; label: string }[]>([]);
|
||||
@@ -64,7 +66,11 @@
|
||||
const base =
|
||||
'w-full rounded border border-[var(--site-border)] bg-[var(--site-bg)] px-2 py-1 text-sm focus:outline-2 focus:outline-[var(--site-text)]';
|
||||
const placeholder = $derived(
|
||||
value === null ? (column.hasDefault ? `default${column.defaultExpr ? `: ${column.defaultExpr}` : ''}` : 'null') : ''
|
||||
value === null
|
||||
? column.hasDefault
|
||||
? `default${column.defaultExpr ? `: ${column.defaultExpr}` : ''}`
|
||||
: 'null'
|
||||
: ''
|
||||
);
|
||||
</script>
|
||||
|
||||
@@ -78,7 +84,9 @@
|
||||
{@attach focusOnMount}
|
||||
aria-label={column.label}
|
||||
>
|
||||
{#if column.nullable || column.hasDefault}<option value="">{column.hasDefault ? '(default)' : 'null'}</option>{/if}
|
||||
{#if column.nullable || column.hasDefault}<option value=""
|
||||
>{column.hasDefault ? '(default)' : 'null'}</option
|
||||
>{/if}
|
||||
<option value="true">true</option>
|
||||
<option value="false">false</option>
|
||||
</select>
|
||||
@@ -91,7 +99,9 @@
|
||||
{@attach focusOnMount}
|
||||
aria-label={column.label}
|
||||
>
|
||||
{#if column.nullable || column.hasDefault}<option value="">{column.hasDefault ? '(default)' : 'null'}</option>{/if}
|
||||
{#if column.nullable || column.hasDefault}<option value=""
|
||||
>{column.hasDefault ? '(default)' : 'null'}</option
|
||||
>{/if}
|
||||
{#each column.enumValues as v (v)}<option value={v}>{v}</option>{/each}
|
||||
</select>
|
||||
{:else if long}
|
||||
@@ -103,8 +113,7 @@
|
||||
oninput={(e) => (value = e.currentTarget.value)}
|
||||
onkeydown={keydown}
|
||||
{@attach focusOnMount}
|
||||
aria-label={column.label}
|
||||
></textarea>
|
||||
aria-label={column.label}></textarea>
|
||||
{:else}
|
||||
<input
|
||||
class={base}
|
||||
|
||||
Reference in New Issue
Block a user