1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-19 14:14:05 +00:00

Menus and keyboard shortcuts

This commit is contained in:
2023-01-23 14:12:14 +01:00
parent 4cefc33bd4
commit 29e93dcab1
4 changed files with 37 additions and 21 deletions

View File

@ -8,6 +8,7 @@
import Remove from './remove.svelte';
import Stats from './stats.svelte';
import Update from './update.svelte';
import { EventsOn } from '../../../../wailsjs/runtime/runtime';
export let collection;
export let hostKey;
@ -23,6 +24,8 @@
collection.key = collectionKey;
}
EventsOn('OpenCollectionTab', name => (tab = name || tab));
async function catchQuery(event) {
tab = 'find';
await tick();

View File

@ -8,6 +8,7 @@
import CollectionDetail from './collection/index.svelte';
import HostDetail from './hostdetail.svelte';
import Icon from '../../components/icon.svelte';
import { EventsOn } from '../../../wailsjs/runtime/runtime';
export let hosts = {};
export let activeHostKey = '';
@ -72,6 +73,9 @@
busy.end();
}
EventsOn('CreateHost', createHost);
EventsOn('CreateDatabase', () => newDb = {});
EventsOn('CreateCollection', () => newColl = {});
onMount(getHosts);
</script>