mirror of
https://github.com/ION606/browser-chromium.git
synced 2026-05-14 22:26:56 +00:00
initial commit/backup
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { dialog } from 'electron';
|
||||
|
||||
export async function askUserQuestion(window, title, question) {
|
||||
const response = await dialog.showMessageBox(window, {
|
||||
buttons: ['Yes', 'No'],
|
||||
defaultId: 0,
|
||||
cancelId: 1,
|
||||
title,
|
||||
message: question,
|
||||
});
|
||||
|
||||
return response.response === 0; // true if 'Yes' was clicked, false if 'No'
|
||||
}
|
||||
Reference in New Issue
Block a user