remove search commands in favor of searchers

This commit is contained in:
tglide committed 2023-08-17 14:40:46 +01:00
1 parent 668034e039
commit 79774d79bf
3 files changed
+6 -45

No files matched your search

+2 -19
View File
@@ -18,7 +18,7 @@
import { goto } from '$app/navigation';
import { CommandCenter, registerCommands, registerSearchers } from '$lib/commandCenter';
import { AIPanel, OrganizationsPanel, ProjectsPanel } from '$lib/commandCenter/panels';
import { AIPanel } from '$lib/commandCenter/panels';
import { orgSearcher, projectsSearcher } from '$lib/commandCenter/searchers';
import { addSubPanel } from '$lib/commandCenter/subPanels';
import { addNotification } from '$lib/stores/notifications';
@@ -54,24 +54,7 @@
group: 'navigation',
rank: 1
},
{
label: 'Find an organization',
callback: () => {
addSubPanel(OrganizationsPanel);
},
group: 'organizations',
icon: 'search',
keys: ['f', 'o']
},
{
label: 'Find a project',
callback: () => {
addSubPanel(ProjectsPanel);
},
keys: ['f', 'p'],
group: 'projects',
icon: 'search'
},
{
label: 'Create new organization',
callback: () => {
@@ -1,19 +1,17 @@
<script lang="ts">
import { goto, invalidate } from '$app/navigation';
import type { Models } from '@appwrite.io/console';
import CreateCollection from './createCollection.svelte';
import { showCreate } from './store';
import { base } from '$app/paths';
import { page } from '$app/stores';
import { Dependencies } from '$lib/constants';
import {
addSubPanel,
registerCommands,
registerSearchers,
updateCommandGroupRanks
} from '$lib/commandCenter';
import { collectionsSearcher } from '$lib/commandCenter/searchers';
import { CollectionsPanel } from '$lib/commandCenter/panels';
import { Dependencies } from '$lib/constants';
import type { Models } from '@appwrite.io/console';
import CreateCollection from './createCollection.svelte';
import { showCreate } from './store';
const project = $page.params.project;
const databaseId = $page.params.database;
@@ -27,15 +25,6 @@
}
$: $registerCommands([
{
label: 'Find collections',
callback() {
addSubPanel(CollectionsPanel);
},
keys: ['f', 'c'],
group: 'collections',
icon: 'search'
},
{
label: 'Create collection',
callback() {
@@ -2,27 +2,16 @@
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import {
addSubPanel,
registerCommands,
registerSearchers,
updateCommandGroupRanks
} from '$lib/commandCenter';
import { FilesPanel } from '$lib/commandCenter/panels';
import { fileSearcher } from '$lib/commandCenter/searchers';
import { project } from '../../store';
import { showCreateFile } from './+page.svelte';
import { bucket } from './store';
$: $registerCommands([
{
label: 'Search files',
callback() {
addSubPanel(FilesPanel);
},
keys: ['f', 'l'],
group: 'files',
icon: 'search'
},
{
label: 'Create file',
async callback() {