mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
f57fe11769
* 2 new things (Read desc.) - Cleaned up ASAR packaging, ignoring unneeded files for building - Moved install location for Windows users ("AppData\Local\Programs" -> "AppData\Local" * 3 things (Read desc.) - Updated things related to Hummus (Hummus settings don't save nor load in it's respective settings window yet, idk why) - Added check for package version (ArmCord's internal version) - Made check for Kernel mod a bit cleaner, it still uses the same jank method * 3 things - Made macOS titlebar more accurate to Discord - Added "unFocused" class when window isn't focused - Added option to uninstall Husky hook for Windows users with reminder to run format script before committing * Resolved a dumb issue My dumbass not knowing the "echo" command existed smh * Made "precommit-fix" warning more noticable * Whoops * Fixed a CSS bug Discord updates are gonna hate us, huh? * 4 things (Formatted) - Updated coding for getting the current version - Updated some context menu and tray stuff - Added current version to the title of the settings window - Added the ability to restart the app within the settings * A few things - Updated tray menu to include the tray icon infront of the ArmCord version - Updated MacOS titlebar to not be broken in setup - Polished settings menu a bit - Polished the Discord tray icon - Added the Classic Discord icon as tray icon option
26 lines
1 KiB
TypeScript
26 lines
1 KiB
TypeScript
import {contextBridge, ipcRenderer} from "electron";
|
|
import * as path from "path";
|
|
import {addStyle} from "../utils";
|
|
import fs from "fs";
|
|
console.log("ArmCord Settings");
|
|
|
|
contextBridge.exposeInMainWorld("settings", {
|
|
save: (...args: any) => ipcRenderer.send("saveSettings", ...args),
|
|
restart: () => ipcRenderer.send("restart"),
|
|
saveAlert: (restartFunc: any) => ipcRenderer.send("saveAlert", restartFunc),
|
|
getLang: (toGet: string) =>
|
|
ipcRenderer.invoke("getLang", toGet).then((result) => {
|
|
return result;
|
|
}),
|
|
get: (toGet: string) =>
|
|
ipcRenderer.invoke("getSetting", toGet).then((result) => {
|
|
return result;
|
|
}), //jank but works
|
|
openThemesFolder: () => ipcRenderer.send("openThemesFolder"),
|
|
openPluginsFolder: () => ipcRenderer.send("openPluginsFolder"),
|
|
openStorageFolder: () => ipcRenderer.send("openStorageFolder"),
|
|
copyDebugInfo: () => ipcRenderer.send("copyDebugInfo")
|
|
});
|
|
ipcRenderer.on("themeLoader", (event, message) => {
|
|
addStyle(message);
|
|
});
|