add option to disable the splash animation

This commit is contained in:
ading2210 2024-01-22 18:10:14 +00:00
parent cb33f1834b
commit 50d2b712d6
4 changed files with 10 additions and 8 deletions

View file

@ -20,7 +20,7 @@ export function createSplashWindow(startMinimized = false) {
splash.loadFile(join(VIEW_DIR, "splash.html")); splash.loadFile(join(VIEW_DIR, "splash.html"));
const { splashBackground, splashColor, splashTheming } = Settings.store; const { splashBackground, splashColor, splashTheming, disableSplashAnimation } = Settings.store;
if (splashTheming) { if (splashTheming) {
if (splashColor) { if (splashColor) {
@ -35,5 +35,9 @@ export function createSplashWindow(startMinimized = false) {
} }
} }
if (!disableSplashAnimation) {
splash.webContents.insertCSS(`img {display: block !important}`);
}
return splash; return splash;
} }

View file

@ -49,6 +49,7 @@ export default function SettingsUi() {
["disableSmoothScroll", "Disable smooth scrolling", "Disables smooth scrolling in Vesktop", false], ["disableSmoothScroll", "Disable smooth scrolling", "Disables smooth scrolling in Vesktop", false],
["hardwareAcceleration", "Hardware Acceleration", "Enable hardware acceleration", true], ["hardwareAcceleration", "Hardware Acceleration", "Enable hardware acceleration", true],
["splashTheming", "Splash theming", "Adapt the splash window colors to your custom theme", false], ["splashTheming", "Splash theming", "Adapt the splash window colors to your custom theme", false],
["disableSplashAnimation", "Disable splash animation", "Disable the animation on the splash window", false],
[ [
"openLinksWithElectron", "openLinksWithElectron",
"Open Links in app (experimental)", "Open Links in app (experimental)",

View file

@ -28,6 +28,7 @@ export interface Settings {
checkUpdates?: boolean; checkUpdates?: boolean;
splashTheming?: boolean; splashTheming?: boolean;
disableSplashAnimation?: boolean;
splashColor?: string; splashColor?: string;
splashBackground?: string; splashBackground?: string;
} }

View file

@ -26,18 +26,14 @@
width: 128px; width: 128px;
height: 128px; height: 128px;
image-rendering: pixelated; image-rendering: pixelated;
display: none;
} }
</style> </style>
</head> </head>
<body> <body>
<div class="wrapper"> <div class="wrapper">
<img <img draggable="false" src="../shiggy.gif" alt="shiggy" role="presentation" />
draggable="false"
src="../shiggy.gif"
alt="shiggy"
role="presentation"
/>
<p>Loading Vesktop...</p> <p>Loading Vesktop...</p>
</div> </div>
</body> </body>