add appInfo
This commit is contained in:
parent
a0628cc873
commit
5f36de6697
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
|
release/
|
||||||
yarn.lock
|
yarn.lock
|
4
appInfo.js
Normal file
4
appInfo.js
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
const appName = "EZPPLauncher"
|
||||||
|
const appVersion = "1.0.0";
|
||||||
|
|
||||||
|
module.exports = { appName, appVersion };
|
|
@ -1,5 +1,6 @@
|
||||||
const { ipcRenderer } = require('electron');
|
const { ipcRenderer } = require('electron');
|
||||||
const { Titlebar, Color } = require('custom-electron-titlebar');
|
const { Titlebar, Color } = require('custom-electron-titlebar');
|
||||||
|
const appInfo = require('../appInfo');
|
||||||
let titlebar;
|
let titlebar;
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', () => {
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
|
@ -10,7 +11,7 @@ window.addEventListener('DOMContentLoaded', () => {
|
||||||
maximizable: false
|
maximizable: false
|
||||||
});
|
});
|
||||||
|
|
||||||
titlebar.updateTitle("EZPPLauncher");
|
titlebar.updateTitle(`${appInfo.appName} ${appInfo.appVersion}`);
|
||||||
|
|
||||||
const $ = require('jquery');
|
const $ = require('jquery');
|
||||||
const Swal = require('sweetalert2');
|
const Swal = require('sweetalert2');
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const appInfo = require('../appInfo');
|
||||||
const { BrowserWindow } = require('electron');
|
const { BrowserWindow } = require('electron');
|
||||||
const { attachTitlebarToWindow } = require('custom-electron-titlebar/main');
|
const { attachTitlebarToWindow } = require('custom-electron-titlebar/main');
|
||||||
|
|
||||||
|
@ -31,7 +32,7 @@ module.exports = {
|
||||||
window.show();
|
window.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
window.webContents.setUserAgent("EZPPLauncher");
|
window.webContents.setUserAgent(`${appInfo.appName} ${appInfo.appVersion}`);
|
||||||
attachTitlebarToWindow(window);
|
attachTitlebarToWindow(window);
|
||||||
// window.webContents.openDevTools({
|
// window.webContents.openDevTools({
|
||||||
// mode: "detach"
|
// mode: "detach"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user