mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Update Electron
This commit is contained in:
parent
99417c3d29
commit
75276dee90
4 changed files with 11 additions and 7 deletions
|
@ -28,13 +28,13 @@
|
|||
"devDependencies": {
|
||||
"@types/node": "^17.0.42",
|
||||
"@types/ws": "^8.5.3",
|
||||
"chalk-cli": "^5.0.0",
|
||||
"copyfiles": "^2.4.1",
|
||||
"electron": "^19.0.8",
|
||||
"electron": "^20.1.0",
|
||||
"electron-builder": "^23.0.3",
|
||||
"husky": "^8.0.1",
|
||||
"prettier": "^2.7.0",
|
||||
"typescript": "^4.7.3",
|
||||
"chalk-cli": "^5.0.0"
|
||||
"typescript": "^4.7.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"electron-context-menu": "github:ArmCord/electron-context-menu",
|
||||
|
|
|
@ -26,6 +26,7 @@ export function createSettingsWindow() {
|
|||
frame: true,
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
sandbox: false,
|
||||
preload: path.join(__dirname, "preload.js")
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {contextBridge, ipcRenderer} from "electron";
|
||||
import path from "path";
|
||||
import * as path from "path";
|
||||
import {addStyle} from "../utils";
|
||||
import fs from "fs";
|
||||
console.log("ArmCord Settings");
|
||||
|
|
|
@ -104,10 +104,10 @@ async function doAfterDefiningTheWindow() {
|
|||
}
|
||||
getFavicon()
|
||||
`)
|
||||
console.log(app.getPath("cache"))
|
||||
console.log(app.getPath("temp"))
|
||||
var buf = new Buffer(faviconBase64.replace(/^data:image\/\w+;base64,/, ""), 'base64');
|
||||
fs.writeFileSync(path.join(app.getPath("cache"), "/", "tray.png"), buf, "utf-8");
|
||||
let trayPath = nativeImage.createFromPath(path.join(app.getPath("cache"), "/", "tray.png"));
|
||||
fs.writeFileSync(path.join(app.getPath("temp"), "/", "tray.png"), buf, "utf-8");
|
||||
let trayPath = nativeImage.createFromPath(path.join(app.getPath("temp"), "/", "tray.png"));
|
||||
if (process.platform === "darwin" && trayPath.getSize().height > 22) trayPath = trayPath.resize({height: 22});
|
||||
tray.setImage(trayPath)
|
||||
})
|
||||
|
@ -207,6 +207,7 @@ export function createCustomWindow() {
|
|||
frame: false,
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
sandbox: false,
|
||||
preload: path.join(__dirname, "preload/preload.js"),
|
||||
spellcheck: true
|
||||
}
|
||||
|
@ -223,6 +224,7 @@ export function createNativeWindow() {
|
|||
frame: true,
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
sandbox: false,
|
||||
preload: path.join(__dirname, "preload/preload.js"),
|
||||
spellcheck: true
|
||||
}
|
||||
|
@ -240,6 +242,7 @@ export function createInviteWindow() {
|
|||
frame: true,
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
sandbox: false,
|
||||
spellcheck: true
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue