Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a12ba017bc | ||
|
|
7a2161d746 | ||
|
|
d0e7a319d6 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "VencordDesktop",
|
||||
"version": "0.1.7",
|
||||
"version": "0.1.8",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
|
||||
@@ -28,12 +28,10 @@ const runVencordMain = once(() => require(join(VENCORD_FILES_DIR, "vencordDeskto
|
||||
|
||||
let mainWin: BrowserWindow | null = null;
|
||||
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
console.log("Vencord Desktop is already running. Quitting...");
|
||||
app.quit();
|
||||
} else {
|
||||
app.on("second-instance", () => {
|
||||
if (mainWin) {
|
||||
function init() {
|
||||
app.on("second-instance", (_event, _cmdLine, _cwd, data: any) => {
|
||||
if (data.IS_DEV) app.quit();
|
||||
else if (mainWin) {
|
||||
if (mainWin.isMinimized()) mainWin.restore();
|
||||
if (!mainWin.isVisible()) mainWin.show();
|
||||
mainWin.focus();
|
||||
@@ -53,6 +51,18 @@ if (!app.requestSingleInstanceLock()) {
|
||||
});
|
||||
}
|
||||
|
||||
if (!app.requestSingleInstanceLock({ IS_DEV })) {
|
||||
if (IS_DEV) {
|
||||
console.log("Vencord Desktop is already running. Quitting previous instance...");
|
||||
init();
|
||||
} else {
|
||||
console.log("Vencord Desktop is already running. Quitting...");
|
||||
app.quit();
|
||||
}
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
|
||||
async function createWindows() {
|
||||
const splash = createSplashWindow();
|
||||
|
||||
|
||||
@@ -256,6 +256,10 @@ export function createMainWindow() {
|
||||
makeLinksOpenExternally(win);
|
||||
initSettingsListeners(win);
|
||||
|
||||
win.webContents.setUserAgent(
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
|
||||
);
|
||||
|
||||
const subdomain =
|
||||
Settings.store.discordBranch === "canary" || Settings.store.discordBranch === "ptb"
|
||||
? `${Settings.store.discordBranch}.`
|
||||
|
||||
Reference in New Issue
Block a user