Rename electron window title
This commit is contained in:
@@ -8,6 +8,7 @@ let win: Electron.BrowserWindow;
|
|||||||
function createWindow() {
|
function createWindow() {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
win = new BrowserWindow({
|
win = new BrowserWindow({
|
||||||
|
title: 'UHK Agent',
|
||||||
width: 1024,
|
width: 1024,
|
||||||
height: 768,
|
height: 768,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
@@ -22,6 +23,10 @@ function createWindow() {
|
|||||||
// and load the index.html of the app.
|
// and load the index.html of the app.
|
||||||
win.loadURL(`file://${indexPath}`);
|
win.loadURL(`file://${indexPath}`);
|
||||||
|
|
||||||
|
win.on('page-title-updated', (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
// Emitted when the window is closed.
|
// Emitted when the window is closed.
|
||||||
win.on('closed', () => {
|
win.on('closed', () => {
|
||||||
// Dereference the window object, usually you would store windows
|
// Dereference the window object, usually you would store windows
|
||||||
|
|||||||
Reference in New Issue
Block a user