Before Width: | Height: | Size: 293 KiB |
Before Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 268 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 18 KiB |
@ -1,18 +0,0 @@ |
|||||
<!doctype html> |
|
||||
<html lang="en"> |
|
||||
<head> |
|
||||
<meta charset="UTF-8" /> |
|
||||
<link rel="icon" type="image/svg+xml" href="./vite.svg" /> |
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|
||||
<title>Vite + Vue + TS</title> |
|
||||
<script type="module" crossorigin src="./assets/index-DOfL5DGB.js"></script> |
|
||||
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script> |
|
||||
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script> |
|
||||
</head> |
|
||||
<body> |
|
||||
<div id="app"></div> |
|
||||
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script> |
|
||||
<script nomodule crossorigin id="vite-legacy-polyfill" src="./assets/polyfills-legacy-BoP4WWJT.js"></script> |
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="./assets/index-legacy-BceoyPKk.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script> |
|
||||
</body> |
|
||||
</html> |
|
Before Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,10 @@ |
|||||
|
window.addEventListener('DOMContentLoaded', () => { |
||||
|
const replaceText = (selector, text) => { |
||||
|
const element = document.getElementById(selector) |
||||
|
if (element) element.innerText = text |
||||
|
} |
||||
|
|
||||
|
for (const dependency of ['chrome', 'node', 'electron']) { |
||||
|
replaceText(`${dependency}-version`, process.versions[dependency]) |
||||
|
} |
||||
|
}) |
@ -0,0 +1,80 @@ |
|||||
|
'use strict' |
||||
|
|
||||
|
import { app, protocol, BrowserWindow } from 'electron' |
||||
|
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib' |
||||
|
import installExtension, { VUEJS3_DEVTOOLS } from 'electron-devtools-installer' |
||||
|
const isDevelopment = process.env.NODE_ENV !== 'production' |
||||
|
|
||||
|
// Scheme must be registered before the app is ready
|
||||
|
protocol.registerSchemesAsPrivileged([ |
||||
|
{ scheme: 'app', privileges: { secure: true, standard: true } }, |
||||
|
]) |
||||
|
|
||||
|
async function createWindow() { |
||||
|
// Create the browser window.
|
||||
|
const win = new BrowserWindow({ |
||||
|
width: 800, |
||||
|
height: 600, |
||||
|
webPreferences: { |
||||
|
// Use pluginOptions.nodeIntegration, leave this alone
|
||||
|
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
|
||||
|
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION, |
||||
|
contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION, |
||||
|
}, |
||||
|
}) |
||||
|
|
||||
|
if (process.env.WEBPACK_DEV_SERVER_URL) { |
||||
|
// Load the url of the dev server if in development mode
|
||||
|
await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL) |
||||
|
if (!process.env.IS_TEST) win.webContents.openDevTools() |
||||
|
} else { |
||||
|
createProtocol('app') |
||||
|
// Load the index.html when not in development
|
||||
|
win.loadURL('app://./index.html') |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// Quit when all windows are closed.
|
||||
|
app.on('window-all-closed', () => { |
||||
|
// On macOS it is common for applications and their menu bar
|
||||
|
// to stay active until the user quits explicitly with Cmd + Q
|
||||
|
if (process.platform !== 'darwin') { |
||||
|
app.quit() |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
app.on('activate', () => { |
||||
|
// On macOS it's common to re-create a window in the app when the
|
||||
|
// dock icon is clicked and there are no other windows open.
|
||||
|
if (BrowserWindow.getAllWindows().length === 0) createWindow() |
||||
|
}) |
||||
|
|
||||
|
// This method will be called when Electron has finished
|
||||
|
// initialization and is ready to create browser windows.
|
||||
|
// Some APIs can only be used after this event occurs.
|
||||
|
app.on('ready', async () => { |
||||
|
if (isDevelopment && !process.env.IS_TEST) { |
||||
|
// Install Vue Devtools
|
||||
|
try { |
||||
|
await installExtension(VUEJS3_DEVTOOLS) |
||||
|
} catch (e) { |
||||
|
console.error('Vue Devtools failed to install:', e.toString()) |
||||
|
} |
||||
|
} |
||||
|
createWindow() |
||||
|
}) |
||||
|
|
||||
|
// Exit cleanly on request from parent process in development mode.
|
||||
|
if (isDevelopment) { |
||||
|
if (process.platform === 'win32') { |
||||
|
process.on('message', (data) => { |
||||
|
if (data === 'graceful-exit') { |
||||
|
app.quit() |
||||
|
} |
||||
|
}) |
||||
|
} else { |
||||
|
process.on('SIGTERM', () => { |
||||
|
app.quit() |
||||
|
}) |
||||
|
} |
||||
|
} |