better oauth handle

This commit is contained in:
Jan Prochazka
2022-11-17 19:55:01 +01:00
parent 576fc2062c
commit 94a91d5fed
5 changed files with 58 additions and 30 deletions

View File

@@ -20,12 +20,16 @@
import getElectron from './utility/getElectron';
import AppStartInfo from './widgets/AppStartInfo.svelte';
import SettingsListener from './utility/SettingsListener.svelte';
import { handleAuthOnStartup } from './clientAuth';
import { handleAuthOnStartup, handleOauthCallback } from './clientAuth';
let loadedApi = false;
let loadedPlugins = false;
const isOauthCallback = handleOauthCallback();
async function loadApi() {
if (isOauthCallback) {
return;
}
// if (shouldWaitForElectronInitialize()) {
// setTimeout(loadApi, 100);
// return;
@@ -76,7 +80,7 @@
<ErrorHandler />
{#if loadedApi}
{#if loadedApi && !isOauthCallback}
<DataGridRowHeightMeter />
<CommandListener />
<PluginsProvider />