diff --git a/frontend/package-lock.json b/frontend/package-lock.json index dd2fcc9..ce0aa5a 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -7,6 +7,9 @@ "": { "name": "frontend", "version": "0.0.0", + "dependencies": { + "highlight.js": "^11.7.0" + }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^1.0.1", "eslint": "^8.31.0", @@ -1888,6 +1891,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/highlight.js": { + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.7.0.tgz", + "integrity": "sha512-1rRqesRFhMO/PRF+G86evnyJkCgaZFOI+Z6kdj15TA18funfoqJXvgPCLSf0SWq3SRfg1j3HlDs8o4s3EGq1oQ==", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -4523,6 +4534,11 @@ "has-symbols": "^1.0.2" } }, + "highlight.js": { + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.7.0.tgz", + "integrity": "sha512-1rRqesRFhMO/PRF+G86evnyJkCgaZFOI+Z6kdj15TA18funfoqJXvgPCLSf0SWq3SRfg1j3HlDs8o4s3EGq1oQ==" + }, "ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", diff --git a/frontend/package.json b/frontend/package.json index c0b8060..8e44cb4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -17,6 +17,12 @@ "vite": "^3.0.0" }, "eslintConfig": { - "extends": ["nodejs", "svelte3"] + "extends": [ + "nodejs", + "svelte3" + ] + }, + "dependencies": { + "highlight.js": "^11.7.0" } } diff --git a/frontend/package.json.md5 b/frontend/package.json.md5 index 8282008..83aff09 100755 --- a/frontend/package.json.md5 +++ b/frontend/package.json.md5 @@ -1 +1 @@ -2c80c12f4d36310f15d586e535d30d27 \ No newline at end of file +d445254075c563425c5b0fd21e804d4a \ No newline at end of file diff --git a/frontend/src/app.svelte b/frontend/src/app.svelte index 64ab340..12651ce 100644 --- a/frontend/src/app.svelte +++ b/frontend/src/app.svelte @@ -19,8 +19,6 @@ $: database = connection?.databases[activeDbKey]; $: collection = database?.collections?.[activeCollKey]; - $: console.log(connection?.databases); - async function openConnection(hostKey) { busy.start(); const databases = await OpenConnection(hostKey); diff --git a/frontend/src/components/grid.svelte b/frontend/src/components/grid.svelte index a49381c..6bf3cd6 100644 --- a/frontend/src/components/grid.svelte +++ b/frontend/src/components/grid.svelte @@ -53,6 +53,11 @@ } } + function doubleClick(itemKey) { + toggleChildren(itemKey, false); + dispatch('trigger', itemKey); + } + function showContextMenu(evt, item) { select(item[key]); contextMenu.show(evt, item.menu); @@ -87,7 +92,7 @@ {#each _items as item (item[key])}
{@html highlighted}
+