mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 11:45:59 +00:00
feat: add jsonPreviewWrap option to settings
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import _ from 'lodash';
|
||||
import { copyTextToClipboard } from '../utility/clipboard';
|
||||
import { openJsonLinesData } from '../utility/openJsonLinesData';
|
||||
import { useSettings } from '../utility/metadataLoaders';
|
||||
|
||||
setContext('json-tree-context-key', {});
|
||||
|
||||
@@ -23,6 +24,9 @@
|
||||
export let isInserted = false;
|
||||
export let isModified = false;
|
||||
|
||||
const settings = useSettings();
|
||||
$: wrap = $settings?.['behaviour.jsonPreviewWrap'];
|
||||
|
||||
setContext('json-tree-default-expanded', expandAll);
|
||||
if (slicedKeyCount) setContext('json-tree-sliced-key-count', slicedKeyCount);
|
||||
|
||||
@@ -66,6 +70,7 @@
|
||||
class:isDeleted
|
||||
class:isInserted
|
||||
class:isModified
|
||||
class:wrap
|
||||
>
|
||||
<JSONNode
|
||||
{key}
|
||||
@@ -115,6 +120,9 @@
|
||||
list-style: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
ul.wrap :global(li) {
|
||||
white-space: normal;
|
||||
}
|
||||
ul,
|
||||
ul :global(ul) {
|
||||
padding: 0;
|
||||
|
||||
Reference in New Issue
Block a user