INNER CODE UNIT · JavaScript

isClosingBlocked

Megabyteceer/thing-editor · thing-editor/electron-main/index.js:27

	function isClosingBlocked() {
		if (mainWindow.__currentProgressOperation) {
			const res = dialog.showMessageBoxSync(mainWindow, {
				title: 'Are you sure?',
				message: mainWindow.__currentProgressOperation + ' in progress. ' + Math.round(mainWindow.__currentProgress * 100) + '% of 100% complete',
				buttons: [
					'Abort ' + mainWindow.__currentProgressOperation + ' and close',
					'Wait for ' + mainWindow.__currentProgressOperation + ' finish',
				],
				defaultId: 1,
				cancelId: 0
			});
			return res === 1;
		}
	}

	const originalLog = console.log.bind(console);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…