fix circular imports from routing

This commit is contained in:
2023-04-26 13:05:51 -07:00
parent 35271049dd
commit 12d9d733a5
3 changed files with 9 additions and 15 deletions

View File

@ -3,19 +3,17 @@ import { emit, listen } from '@tauri-apps/api/event';
import { invoke } from '@tauri-apps/api/tauri';
import { appState } from './lib/state.js';
import { navigate, currentView } from './lib/routing.js';
import { views, currentView, navigate } from './lib/routing.js';
$views = import.meta.glob('./views/*.svelte', {eager: true});
navigate('Home');
invoke('get_config').then(config => $appState.config = config);
listen('credentials-request', (tauriEvent) => {
$appState.pendingRequests.put(tauriEvent.payload);
});
// can't set this in routing.js directly for some reason
if (!$currentView) {
navigate('Home');
}
</script>