Files
Multi-Hoster-Upload/lib/startup-renderer.js
T
Sucukdeluxe 6d458e37f3 fix: stabilize the header on first paint
Pass the installed version with the startup language so the renderer can display it before asynchronous initialization.

Seed and start the upload sparkline immediately, keep a fixed update-action slot across all update states, and remove the delayed automatic update check.

Add first-frame regression coverage for version, speed baseline, update geometry, and startup query behavior.
2026-08-20 13:27:55 +02:00

31 lines
1.1 KiB
JavaScript

function configureStartupRenderer(app, env = process.env, platform = process.platform) {
const sessionName = String(env && env.SESSIONNAME || '');
if (platform === 'win32' && /^RDP-/i.test(sessionName)) app.disableHardwareAcceleration();
return app;
}
function resolveStartupLanguage(config) {
return config && config.globalSettings && config.globalSettings.language === 'de' ? 'de' : 'en';
}
function createStartupQuery(config, version) {
const normalizedVersion = /^\d+\.\d+\.\d+$/.test(String(version || '').trim()) ? String(version).trim() : '';
return { language: resolveStartupLanguage(config), version: normalizedVersion };
}
function createStartupWindow(BrowserWindow, options) {
const window = new BrowserWindow({ ...options, show: false });
window.once('ready-to-show', () => {
window.show();
});
return {
window,
load(target, onLoadError, options) {
return window.loadFile(target, options).catch(onLoadError);
}
};
}
module.exports = { configureStartupRenderer, createStartupWindow, resolveStartupLanguage, createStartupQuery };