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
|
@ -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…
Add table
Add a link
Reference in a new issue