mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 18:03:58 +00:00
removed splash, plugins load info
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
import PluginsProvider from './plugins/PluginsProvider.svelte';
|
||||
import Screen from './Screen.svelte';
|
||||
import { loadingPluginStore } from './stores';
|
||||
import { setAppLoaded } from './utility/appLoadManager';
|
||||
import axiosInstance from './utility/axiosInstance';
|
||||
import ErrorHandler from './utility/ErrorHandler.svelte';
|
||||
@@ -42,9 +43,12 @@
|
||||
|
||||
{#if loaded}
|
||||
<PluginsProvider />
|
||||
<OpenTabsOnStartup />
|
||||
|
||||
<Screen />
|
||||
{#if $loadingPluginStore?.loaded}
|
||||
<OpenTabsOnStartup />
|
||||
<Screen />
|
||||
{:else}
|
||||
<LoadingInfo message={`Loading plugin ${$loadingPluginStore.loadingPackageName}`} wrapper />
|
||||
{/if}
|
||||
{:else}
|
||||
<LoadingInfo message="Starting DbGate API..." wrapper />
|
||||
<LoadingInfo message="Starting DbGate ..." wrapper />
|
||||
{/if}
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
for (const installed of installedPlugins || []) {
|
||||
if (!_.keys(pluginsDict).includes(installed.name)) {
|
||||
console.log('Loading module', installed.name);
|
||||
loadingPluginStore.set({
|
||||
loaded: false,
|
||||
loadingPackageName: installed.name,
|
||||
});
|
||||
const resp = await axiosInstance.request({
|
||||
method: 'get',
|
||||
url: 'plugins/script',
|
||||
@@ -22,6 +26,12 @@
|
||||
newPlugins[installed.name] = moduleContent;
|
||||
}
|
||||
}
|
||||
if (installedPlugins) {
|
||||
loadingPluginStore.set({
|
||||
loaded: true,
|
||||
loadingPackageName: null,
|
||||
});
|
||||
}
|
||||
return newPlugins;
|
||||
}
|
||||
|
||||
@@ -43,11 +53,12 @@
|
||||
};
|
||||
return extensions;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import _ from 'lodash';
|
||||
import { extensions } from '../stores';
|
||||
import { extensions, loadingPluginStore } from '../stores';
|
||||
import axiosInstance from '../utility/axiosInstance';
|
||||
import { useInstalledPlugins } from '../utility/metadataLoaders';
|
||||
import { buildFileFormats } from './fileformats';
|
||||
@@ -73,4 +84,5 @@
|
||||
.filter(x => x.content);
|
||||
|
||||
$: $extensions = buildExtensions(plugins);
|
||||
|
||||
</script>
|
||||
|
||||
@@ -59,6 +59,10 @@ export const nullStore = readable(null, () => {});
|
||||
export const currentArchive = writable('default');
|
||||
export const isFileDragActive = writable(false);
|
||||
export const selectedCellsCallback = writable(null);
|
||||
export const loadingPluginStore = writable({
|
||||
loaded: false,
|
||||
loadingPackageName: null,
|
||||
});
|
||||
|
||||
export const currentThemeDefinition = derived([currentTheme, extensions], ([$currentTheme, $extensions]) =>
|
||||
$extensions.themes.find(x => x.className == $currentTheme)
|
||||
|
||||
Reference in New Issue
Block a user