search settings improvement

This commit is contained in:
SPRINX0\prochazka
2024-12-20 08:42:30 +01:00
parent c65bf51dcd
commit edf64db69a
5 changed files with 25 additions and 21 deletions

View File

@@ -131,18 +131,16 @@
const res = [];
res.push({ label: 'Search by:', isBold: true, disabled: true });
if (driver?.databaseEngineTypes?.includes('document')) {
res.push({ label: 'Collection names', switchValue: 'collectionName' });
res.push({ label: 'Collection name', switchValue: 'pureName' });
}
if (driver?.databaseEngineTypes?.includes('sql')) {
res.push({ label: 'Schema name', switchValue: 'schemaName' });
res.push({ label: 'Table name', switchValue: 'tableName' });
res.push({ label: 'View name', switchValue: 'viewName' });
res.push({ label: 'Table/view/procedure name', switchValue: 'pureName' });
res.push({ label: 'Schema', switchValue: 'schemaName' });
res.push({ label: 'Column name', switchValue: 'columnName' });
res.push({ label: 'Column data type', switchValue: 'columnType' });
res.push({ label: 'Table comment', switchValue: 'tableComment' });
res.push({ label: 'Column comment', switchValue: 'columnComment' });
res.push({ label: 'Procedure/function/trigger name', switchValue: 'sqlObjectName' });
res.push({ label: 'Procedure/function/trigger text', switchValue: 'sqlObjectText' });
res.push({ label: 'View/procedure/trigger text', switchValue: 'sqlObjectText' });
res.push({ label: 'Table engine', switchValue: 'tableEngine' });
}
return res.map(item => ({
@@ -217,7 +215,12 @@
}}
/>
<CloseSearchButton bind:filter />
<DropDownButton icon="icon filter" menu={createSearchMenu} square={!!filter} narrow={false} />
<DropDownButton
icon={filter ? 'img filter-active' : 'icon filter'}
menu={createSearchMenu}
square={!!filter}
narrow={false}
/>
{#if !filter}
<DropDownButton icon="icon plus-thick" menu={createAddMenu} />
{/if}