trodi / electron-splashscreen Goto Github PK
View Code? Open in Web Editor NEWSimple splashscreen for electron applications.
License: MIT License
Simple splashscreen for electron applications.
License: MIT License
Browser window is null on close
start the application from the command line and control C before the main widow appears.
The application should close
You get a modal dialog displaying a javascript error. I believe that this is because of the close event calling mainwindow.close before the main window is set. It would be easy to put a null check on that call.
readme's images aren't loading on the npm page. It appears that npm isn't converting my relative img paths to their github equivalent. It use to do this just fine for my demo.gif. In my research, relative paths have worked for some repos, but I'm not sure why/when they do. However, it appears that svg images never work unless you add ?sanitize=true
to the link. I also didn't want to publish my images as part of the package to reduce the size when a user npm i
.
After failing to get the relative links to work, I've done the following:
?sanitize=true
for my svgIdeally, I could specify, for npm, files that are part of the package but not downloaded when installed (e.g., docs and readme images), then I could keep my relative paths and npm would be completely in charge of serving up a package's content rather than using github links.
Thanks for this nice project. I tried to integrate the splash screen into my electron-vue app (https://github.com/Symbolk/SmartCommit), but I found that the splash screen won't close itself after the duration time. Can you have a look at this?
yarn install
yarn electron:serve
The splash window shows itself and will close itself after 1500ms.
The splash window shows itself and won't close automatically.
Use case: you need to send IPC messages from the browser process to the splashscreen so it can provide dynamic information / progress.
The transparent option doesn't seem to work in windows 7. I'm using a separate html page to show a png image. This does work in windows 10.
I just want splash window appear with a fade-in animation and disappear with fade-out, how can I do this?
Any help is very appreciated. thanks.
I wasn't sure if I should make a new issue for this, or include it in the 1.0.0 issue. Sorry if this is the wrong spot.
Anyway, I have a png image with a transparent background that shows as transparent as the application icon, and anywhere else I use it, with the exception of this splash screen. Instead it shows the transparent layer with the white/gray grid you see in photoshop.
Do you have any idea why that might be the case?
My splashscreen options:
splashScreenOpts: { width: 256, height: 256, transparent: true }
I tried to convert the code example in the README to JavaScript, but I cannot figure it out. Can someone please show me a JavaScript implementation?
Occasionally, an error Object has been destroyed
is thrown on window startup, preventing the application from launching:
I have not yet been able to reproduce this consistently. The app in question is jgierer12/pocket-casts-linux.
The application launches correctly without errors.
The above Object has been destroyed
error is thrown and the application does not launch.
Related discussions are in jgierer12/pocket-casts-linux#3, jgierer12/pocket-casts-linux#4, and jgierer12/pocket-casts-linux#7
Transparant splash screen does not work on linux (does on win 10). Command line options are passed as follows:
[
'/home/benn/datapaq5/target/release-builds/dp5-linux-x64/dp5',
'--enable-transparent-visuals',
'--disable-gpu'
]
Create a dynamic splash screen with trasparant: true as shown below:
const splash: Splashscreen.DynamicSplashScreen = Splashscreen.initDynamicSplashScreen({
windowOpts: windowOptions,
templateUrl: path.join(__dirname, '/../dynamic-splashscreen.html'),
delay: 0, // force show immediately to better illustrate example
splashScreenOpts: {
height: 900,
icon: __dirname + path.sep + '..' + path.sep + '..' +
path.sep + 'src' + path.sep + 'assets' +
path.sep + 'images' + path.sep + 'dp5-256.ico',
width: 700,
transparent: true,
webPreferences: {
nodeIntegration: true,
backgroundThrottling: false
},
},
});
win = splash.main;
return splash;
}
A transparant splashscreen
A splashscreen with a white background
This is a place that additional changes can be discussed before a 1.0.0 release happens. Please comment if you see something missing in this module!
I opened this as a place for a chance for those who use this module to comment on API breaking changes as well and general needs, before I publish a 1.0.0 version ๐.
Possible items:
Options to possible auto generate API docs:
Game Plan
in the example in the README one of the fields is splashScreenOptions when it should be splashScreenOpts, it's causing errors if it's set as splashScreenOptions
hi,
i'm using your splashscreen in my electron project and after packaging it , when i try to run it , it gives me an error that can't find module "@trodi/electron-splashscreen"
the code i'm using to import your module is
const Splashscreen = require('@trodi/electron-splashscreen')
and the command for electron packaging is :
electron-packager . --no-prune --ignore=/node_modules --ignore=/src --overwrite
any help please ?
Marwa
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.