diff --git a/frontend/src/organisms/connection/collection/components/form.svelte b/frontend/src/organisms/connection/collection/components/form.svelte
index 698950d..70c37b5 100644
--- a/frontend/src/organisms/connection/collection/components/form.svelte
+++ b/frontend/src/organisms/connection/collection/components/form.svelte
@@ -2,7 +2,7 @@
import FormInput from '$components/forminput.svelte';
import Icon from '$components/icon.svelte';
import { inputTypes } from '$lib/mongo';
- import { resolveKeypath, setValue } from '$lib/keypaths';
+ import { resolveKeypath, setValue } from '$lib/objects';
import Hint from '$components/hint.svelte';
export let item = {};
diff --git a/frontend/src/organisms/connection/collection/find.svelte b/frontend/src/organisms/connection/collection/find.svelte
index 8305efd..04f1e50 100644
--- a/frontend/src/organisms/connection/collection/find.svelte
+++ b/frontend/src/organisms/connection/collection/find.svelte
@@ -1,9 +1,10 @@
+
+ [ { label: 'Drop this index', fn: () => drop(idx.name) } ]}
+ bind:activePath
+ on:trigger={e => openJson(e.detail.itemKey)}
+ />
+
+
-
-
- [ { label: 'Drop this index', fn: () => drop(idx.name) } ]}
- bind:activePath
- on:trigger={e => openJson(e.detail.itemKey)}
- />
-
@@ -73,7 +73,7 @@
.indexes {
display: grid;
gap: 0.5rem;
- grid-template: auto 1fr / 1fr;
+ grid-template: 1fr auto / 1fr;
}
.indexes .grid {
diff --git a/frontend/src/organisms/connection/collection/insert.svelte b/frontend/src/organisms/connection/collection/insert.svelte
index a172b50..f730382 100644
--- a/frontend/src/organisms/connection/collection/insert.svelte
+++ b/frontend/src/organisms/connection/collection/insert.svelte
@@ -7,7 +7,7 @@
import { randomString } from '$lib/math';
import { inputTypes } from '$lib/mongo';
import views from '$lib/stores/views';
- import { capitalise } from '$lib/strings';
+ import { capitalise, convertLooseJson, jsonLooseParse } from '$lib/strings';
import { InsertItems } from '$wails/go/app/App';
import { EJSON } from 'bson';
import { createEventDispatcher } from 'svelte';
@@ -32,7 +32,7 @@
$: {
if (collection.viewKey === 'list') {
try {
- newItems = EJSON.parse(json, { relaxed: false });
+ newItems = EJSON.deserialize(jsonLooseParse(json), { relaxed: false });
}
catch { /* ok */ }
}
@@ -46,7 +46,7 @@
}
async function insert() {
- insertedIds = await InsertItems(collection.hostKey, collection.dbKey, collection.key, json);
+ insertedIds = await InsertItems(collection.hostKey, collection.dbKey, collection.key, convertLooseJson(json));
if ((collection.viewKey === 'list') && insertedIds) {
newItems = [];
}
@@ -95,15 +95,8 @@