mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-31 20:16:36 +08:00
chore(deps): remove useless files
This commit is contained in:
parent
42fd2574f5
commit
5f418ec731
@ -1,12 +0,0 @@
|
||||
/**
|
||||
* 主进程、渲染进程公用事件常量
|
||||
*/
|
||||
|
||||
/** 退出 */
|
||||
export const LOGOUT = '@event/logout'
|
||||
|
||||
/** 登录 */
|
||||
export const LOGIN = '@event/login'
|
||||
|
||||
/** 切换开发者工具 */
|
||||
export const TOGGLE_DEVTOOLS = 'toggle-devtools'
|
@ -1,2 +0,0 @@
|
||||
|
||||
export * as event from './event'
|
@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Expose something function to renderer
|
||||
*/
|
||||
import { BrowserWindow, ipcMain } from 'electron'
|
||||
import {
|
||||
LOGIN,
|
||||
LOGOUT,
|
||||
TOGGLE_DEVTOOLS,
|
||||
} from '@/common/constant/event'
|
||||
|
||||
export function register(win: BrowserWindow) {
|
||||
ipcMain.handle(TOGGLE_DEVTOOLS, () => {
|
||||
win.webContents.toggleDevTools()
|
||||
})
|
||||
ipcMain.handle(LOGOUT, () => { })
|
||||
}
|
@ -1,10 +1,6 @@
|
||||
import path from 'path'
|
||||
import { app, BrowserWindow } from 'electron'
|
||||
import { register } from './communication'
|
||||
import { app, BrowserWindow, ipcMain } from 'electron'
|
||||
|
||||
/**
|
||||
* Main Process some code reference https://github.com/cawa-93/vite-electron-builder
|
||||
*/
|
||||
app.disableHardwareAcceleration()
|
||||
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
@ -28,9 +24,6 @@ function bootstrap() {
|
||||
win.webContents.openDevTools()
|
||||
win.loadURL(`http://localhost:${process.env.PORT}`)
|
||||
}
|
||||
|
||||
// something init setup
|
||||
register(win)
|
||||
}
|
||||
|
||||
app.whenReady().then(bootstrap)
|
||||
|
@ -1,93 +0,0 @@
|
||||
<!-- Just a loading template -->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>electron-vue3-vite</title>
|
||||
<style>
|
||||
/* https://projects.lukehaas.me/css-loaders/ */
|
||||
body { margin: 0; background-color: #242424; }
|
||||
.loading-box { height: 100vh; display: flex; align-items: center; }
|
||||
|
||||
.load1 .loader,
|
||||
.load1 .loader:before,
|
||||
.load1 .loader:after {
|
||||
background: #ffffff;
|
||||
-webkit-animation: load1 1s infinite ease-in-out;
|
||||
animation: load1 1s infinite ease-in-out;
|
||||
width: 1em;
|
||||
height: 4em;
|
||||
}
|
||||
|
||||
.load1 .loader {
|
||||
color: #ffffff;
|
||||
text-indent: -9999em;
|
||||
margin: 88px auto;
|
||||
position: relative;
|
||||
font-size: 11px;
|
||||
-webkit-transform: translateZ(0);
|
||||
-ms-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
-webkit-animation-delay: -0.16s;
|
||||
animation-delay: -0.16s;
|
||||
}
|
||||
|
||||
.load1 .loader:before,
|
||||
.load1 .loader:after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
content: '';
|
||||
}
|
||||
|
||||
.load1 .loader:before {
|
||||
left: -1.5em;
|
||||
-webkit-animation-delay: -0.32s;
|
||||
animation-delay: -0.32s;
|
||||
}
|
||||
|
||||
.load1 .loader:after {
|
||||
left: 1.5em;
|
||||
}
|
||||
|
||||
@-webkit-keyframes load1 {
|
||||
|
||||
0%,
|
||||
80%,
|
||||
100% {
|
||||
box-shadow: 0 0;
|
||||
height: 4em;
|
||||
}
|
||||
|
||||
40% {
|
||||
box-shadow: 0 -2em;
|
||||
height: 5em;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes load1 {
|
||||
|
||||
0%,
|
||||
80%,
|
||||
100% {
|
||||
box-shadow: 0 0;
|
||||
height: 4em;
|
||||
}
|
||||
|
||||
40% {
|
||||
box-shadow: 0 -2em;
|
||||
height: 5em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="loading-box load1">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user