Fix: 'about' preload #86
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
function dl(mainWindow, lang_path, base) {
|
||||
function dl(mainWindow, lang_path, base, dirname) {
|
||||
const electron = require("electron");
|
||||
const shell = electron.shell;
|
||||
const fs = require("fs");
|
||||
@@ -16,7 +16,10 @@ function dl(mainWindow, lang_path, base) {
|
||||
if (platform != "others") {
|
||||
updatewin = new BrowserWindow({
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
webviewTag: false,
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
preload: "../js/platform/preload.js"
|
||||
},
|
||||
width: 600,
|
||||
height: 400,
|
||||
@@ -35,7 +38,7 @@ function dl(mainWindow, lang_path, base) {
|
||||
})
|
||||
//アプデDL
|
||||
ipc.on('download-btn', (e, args) => {
|
||||
function dl(url, file, dir,e) {
|
||||
function dl(url, file, dir, e) {
|
||||
|
||||
e.sender.webContents.send('mess', "ダウンロードを開始します。");
|
||||
const opts = {
|
||||
|
@@ -73,7 +73,10 @@ function templete(lang, mainWindow, packaged, dir) {
|
||||
var ver = app.getVersion()
|
||||
var window = new BrowserWindow({
|
||||
webPreferences: {
|
||||
nodeIntegration:true
|
||||
webviewTag: false,
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
preload: "../js/platform/preload.js"
|
||||
},
|
||||
width: 300, height: 460,
|
||||
"transparent": false, // ウィンドウの背景を透過
|
||||
|
@@ -1,4 +1,4 @@
|
||||
function system(mainWindow, dir, lang) {
|
||||
function system(mainWindow, dir, lang, dirname) {
|
||||
const electron = require("electron");
|
||||
const app = electron.app;
|
||||
const join = require('path').join;
|
||||
@@ -145,19 +145,22 @@ function system(mainWindow, dir, lang) {
|
||||
about();
|
||||
});
|
||||
ipc.on('aboutData', (e, args) => {
|
||||
e.sender.webContents.send('aboutDataRender', process);
|
||||
e.sender.webContents.send('aboutDataRender', [process.version, process.versions.chrome, process.versions.electron]);
|
||||
});
|
||||
function about() {
|
||||
var ver = app.getVersion()
|
||||
var window = new BrowserWindow({
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
webviewTag: false,
|
||||
nodeIntegration: false,
|
||||
contextIsolation: false,
|
||||
preload: join(dirname,"js", "platform", "preload.js")
|
||||
},
|
||||
width: 300,
|
||||
height: 480,
|
||||
"transparent": false, // ウィンドウの背景を透過
|
||||
"frame": false, // 枠の無いウィンドウ
|
||||
"resizable": false
|
||||
"frame": true, // 枠の無いウィンドウ
|
||||
"resizable": true
|
||||
});
|
||||
window.loadURL(dir + '/about.html?ver=' + ver);
|
||||
return "true"
|
||||
@@ -182,7 +185,10 @@ function system(mainWindow, dir, lang) {
|
||||
}
|
||||
var nanowindow = new BrowserWindow({
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
webviewTag: false,
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
preload: join(dirname,"js", "platform", "preload.js")
|
||||
},
|
||||
width: 350,
|
||||
height: 200,
|
||||
|
Reference in New Issue
Block a user