|
@@ -37,7 +37,9 @@ function loadWindowPage(window: BrowserWindow, subPath: string) {
|
|
|
if (VITE_DEV_SERVER_URL) {
|
|
if (VITE_DEV_SERVER_URL) {
|
|
|
window.loadURL(VITE_DEV_SERVER_URL + "#" + subPath)
|
|
window.loadURL(VITE_DEV_SERVER_URL + "#" + subPath)
|
|
|
} else {
|
|
} else {
|
|
|
- window.loadFile(path.join(RENDERER_DIST, 'index.html') + "#" + subPath)
|
|
|
|
|
|
|
+ window.loadFile(path.join(RENDERER_DIST, 'index.html'), {
|
|
|
|
|
+ hash: subPath,
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
function loadViewUrl(view: WebContentsView, subPath: string) {
|
|
function loadViewUrl(view: WebContentsView, subPath: string) {
|
|
@@ -47,7 +49,9 @@ function loadViewUrl(view: WebContentsView, subPath: string) {
|
|
|
if (VITE_DEV_SERVER_URL) {
|
|
if (VITE_DEV_SERVER_URL) {
|
|
|
view.webContents.loadURL(VITE_DEV_SERVER_URL + "#" + subPath)
|
|
view.webContents.loadURL(VITE_DEV_SERVER_URL + "#" + subPath)
|
|
|
} else {
|
|
} else {
|
|
|
- view.webContents.loadFile(path.join(RENDERER_DIST, 'index.html') + "#" + subPath)
|
|
|
|
|
|
|
+ view.webContents.loadFile(path.join(RENDERER_DIST, 'index.html'), {
|
|
|
|
|
+ hash: subPath,
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -60,7 +64,6 @@ function createWindow() {
|
|
|
preload: path.join(__dirname, 'preload.mjs'),
|
|
preload: path.join(__dirname, 'preload.mjs'),
|
|
|
contextIsolation: true,
|
|
contextIsolation: true,
|
|
|
allowRunningInsecureContent: true,
|
|
allowRunningInsecureContent: true,
|
|
|
- partition: 'persist:minnan-demo-app',
|
|
|
|
|
},
|
|
},
|
|
|
width: 1200,
|
|
width: 1200,
|
|
|
height: 800,
|
|
height: 800,
|
|
@@ -68,9 +71,7 @@ function createWindow() {
|
|
|
|
|
|
|
|
childView = new WebContentsView({
|
|
childView = new WebContentsView({
|
|
|
webPreferences: {
|
|
webPreferences: {
|
|
|
- partition: 'persist:minnan-demo-app',
|
|
|
|
|
allowRunningInsecureContent: true,
|
|
allowRunningInsecureContent: true,
|
|
|
- enableBlinkFeatures: 'PasswordManager',
|
|
|
|
|
},
|
|
},
|
|
|
})
|
|
})
|
|
|
const expandButtonView = new WebContentsView({
|
|
const expandButtonView = new WebContentsView({
|