mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 02:36:00 +00:00
pinned objects fixes
This commit is contained in:
@@ -417,7 +417,7 @@
|
|||||||
onUnpin={isPinned
|
onUnpin={isPinned
|
||||||
? () =>
|
? () =>
|
||||||
pinnedDatabases.update(list =>
|
pinnedDatabases.update(list =>
|
||||||
list.filter(x => x.name != data.name || x.connection?._id != data.connection?._id)
|
list.filter(x => x?.name != data?.name || x?.connection?._id != data?.connection?._id)
|
||||||
)
|
)
|
||||||
: null}
|
: null}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
import SqlObjectList from './SqlObjectList.svelte';
|
import SqlObjectList from './SqlObjectList.svelte';
|
||||||
import DbKeysTree from './DbKeysTree.svelte';
|
import DbKeysTree from './DbKeysTree.svelte';
|
||||||
import SingleConnectionDatabaseList from './SingleConnectionDatabaseList.svelte';
|
import SingleConnectionDatabaseList from './SingleConnectionDatabaseList.svelte';
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
export let hidden = false;
|
export let hidden = false;
|
||||||
|
|
||||||
@@ -39,8 +40,8 @@
|
|||||||
name="pinned"
|
name="pinned"
|
||||||
height="15%"
|
height="15%"
|
||||||
storageName="pinnedItemsWidget"
|
storageName="pinnedItemsWidget"
|
||||||
skip={!$pinnedDatabases?.length &&
|
skip={!_.compact($pinnedDatabases).length &&
|
||||||
!$pinnedTables.some(x => x.conid == conid && x.database == $currentDatabase?.name)}
|
!$pinnedTables.some(x => x && x.conid == conid && x.database == $currentDatabase?.name)}
|
||||||
>
|
>
|
||||||
<PinnedObjectsList />
|
<PinnedObjectsList />
|
||||||
</WidgetColumnBarItem>
|
</WidgetColumnBarItem>
|
||||||
|
|||||||
@@ -9,13 +9,13 @@
|
|||||||
const connectionColorFactory = useConnectionColorFactory(3);
|
const connectionColorFactory = useConnectionColorFactory(3);
|
||||||
|
|
||||||
$: filteredTables = $pinnedTables.filter(
|
$: filteredTables = $pinnedTables.filter(
|
||||||
x => x.conid == $currentDatabase?.connection?._id && x.database == $currentDatabase?.name
|
x => x?.conid == $currentDatabase?.connection?._id && x?.database == $currentDatabase?.name
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<WidgetsInnerContainer>
|
<WidgetsInnerContainer>
|
||||||
<AppObjectList
|
<AppObjectList
|
||||||
list={[...$pinnedDatabases, ...filteredTables]}
|
list={[..._.compact($pinnedDatabases), ..._.compact(filteredTables)]}
|
||||||
module={pinnedAppObject}
|
module={pinnedAppObject}
|
||||||
passProps={{ connectionColorFactory: $connectionColorFactory }}
|
passProps={{ connectionColorFactory: $connectionColorFactory }}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user