diff --git a/app/src/electron.js b/app/src/electron.js
index 58d6fce4..f1eb3a58 100644
--- a/app/src/electron.js
+++ b/app/src/electron.js
@@ -19,7 +19,6 @@ const store = new Store();
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;
-let splashWindow;
let mainMenu;
log.transports.file.level = 'debug';
@@ -29,14 +28,6 @@ autoUpdater.logger = log;
let commands = {};
-function hideSplash() {
- if (splashWindow) {
- splashWindow.destroy();
- splashWindow = null;
- }
- mainWindow.show();
-}
-
function commandItem(id) {
const command = commands[id];
return {
@@ -156,7 +147,6 @@ function createWindow() {
title: 'DbGate',
...bounds,
icon: os.platform() == 'win32' ? 'icon.ico' : path.resolve(__dirname, '../icon.png'),
- show: false,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
@@ -175,7 +165,7 @@ function createWindow() {
slashes: true,
});
mainWindow.webContents.on('did-finish-load', function () {
- hideSplash();
+ // hideSplash();
});
mainWindow.on('close', () => {
store.set('winBounds', mainWindow.getBounds());
@@ -186,20 +176,6 @@ function createWindow() {
}
}
- splashWindow = new BrowserWindow({
- width: 300,
- height: 120,
- transparent: true,
- frame: false,
- });
- splashWindow.loadURL(
- url.format({
- pathname: path.join(__dirname, '../packages/web/build/splash.html'),
- protocol: 'file:',
- slashes: true,
- })
- );
-
if (process.env.ELECTRON_START_URL) {
loadMainWindow();
} else {
diff --git a/packages/web/src/App.svelte b/packages/web/src/App.svelte
index 84b22ee5..3954cd81 100644
--- a/packages/web/src/App.svelte
+++ b/packages/web/src/App.svelte
@@ -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}
-
-
-
+ {#if $loadingPluginStore?.loaded}
+
+
+ {:else}
+
+ {/if}
{:else}
-
+
{/if}
diff --git a/packages/web/src/plugins/PluginsProvider.svelte b/packages/web/src/plugins/PluginsProvider.svelte
index bf90c5c0..e8b12e1c 100644
--- a/packages/web/src/plugins/PluginsProvider.svelte
+++ b/packages/web/src/plugins/PluginsProvider.svelte
@@ -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;
}
+
diff --git a/packages/web/src/stores.ts b/packages/web/src/stores.ts
index 1cb61f78..ad676cfd 100644
--- a/packages/web/src/stores.ts
+++ b/packages/web/src/stores.ts
@@ -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)