mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix ERR_FAILED for splash screen on windows sometimes (#5539)
This commit is contained in:
1 parent
ec1df4717d
commit
06db3119a6
8 files changed
+41
-92
No files matched your search
+8
-1
@@ -5,17 +5,24 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { lensWindowInjectionToken } from "../application-window/lens-window-injection-token";
|
||||
import createLensWindowInjectable from "../application-window/create-lens-window.injectable";
|
||||
import staticFilesDirectoryInjectable from "../../../../common/vars/static-files-directory.injectable";
|
||||
import getAbsolutePathInjectable from "../../../../common/path/get-absolute-path.injectable";
|
||||
|
||||
const splashWindowInjectable = getInjectable({
|
||||
id: "splash-window",
|
||||
|
||||
instantiate: (di) => {
|
||||
const createLensWindow = di.inject(createLensWindowInjectable);
|
||||
const staticFilesDirectory = di.inject(staticFilesDirectoryInjectable);
|
||||
const getAbsolutePath = di.inject(getAbsolutePathInjectable);
|
||||
const splashWindowFile = getAbsolutePath(staticFilesDirectory, "splash.html");
|
||||
|
||||
return createLensWindow({
|
||||
id: "splash",
|
||||
title: "Loading",
|
||||
getContentUrl: () => "static://splash.html",
|
||||
getContentSource: () => ({
|
||||
file: splashWindowFile,
|
||||
}),
|
||||
defaultWidth: 500,
|
||||
defaultHeight: 300,
|
||||
resizable: false,
|
||||
|
||||
Reference in new issue
Block a user