Skip to content

Commit

Permalink
add all
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanMo committed Aug 3, 2023
1 parent 089a970 commit 473decd
Show file tree
Hide file tree
Showing 9 changed files with 6,294 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 微信桌面版

基于网页版微信和Electron框架
31 changes: 31 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
packagerConfig: {
asar: true,
icon: "./images/icon"
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
},
{
name: '@electron-forge/maker-deb',
config: {},
},
{
name: '@electron-forge/maker-rpm',
config: {},
},
],
plugins: [
{
name: '@electron-forge/plugin-auto-unpack-natives',
config: {},
},
],
};
Binary file added images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
body {
margin: 0;
padding: 0;
overflow: hidden;
}
iframe {
border: none;
}
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<title>微信</title>
<link rel="stylesheet" href="index.css" />
</head>
<body>
<iframe src="https://wx.qq.com" width="1280" height="800" sandbox="allow-scripts allow-top-navigation">
</iframe>
</body>
</html>
31 changes: 31 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const { app, BrowserWindow } = require('electron')
const path = require('path')

function createWindow () {
const win = new BrowserWindow({
width: 1280,
height: 800,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
},
autoHideMenuBar: true,
})

win.loadFile('index.html')
}

app.whenReady().then(() => {
createWindow()

app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
})

app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
Loading

0 comments on commit 473decd

Please sign in to comment.