mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Update to E28
This commit is contained in:
parent
f678b7fd42
commit
6beee8d825
4 changed files with 35 additions and 24 deletions
|
@ -36,7 +36,7 @@
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
||||||
"@typescript-eslint/parser": "^5.59.2",
|
"@typescript-eslint/parser": "^5.59.2",
|
||||||
"copyfiles": "^2.4.1",
|
"copyfiles": "^2.4.1",
|
||||||
"electron": "27.2.0",
|
"electron": "28.1.4",
|
||||||
"electron-builder": "^24.6.3",
|
"electron-builder": "^24.6.3",
|
||||||
"eslint": "^8.40.0",
|
"eslint": "^8.40.0",
|
||||||
"eslint-config-dmitmel": "github:dmitmel/eslint-config-dmitmel",
|
"eslint-config-dmitmel": "github:dmitmel/eslint-config-dmitmel",
|
||||||
|
|
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
|
@ -41,8 +41,8 @@ devDependencies:
|
||||||
specifier: ^2.4.1
|
specifier: ^2.4.1
|
||||||
version: 2.4.1
|
version: 2.4.1
|
||||||
electron:
|
electron:
|
||||||
specifier: 27.2.0
|
specifier: 28.1.4
|
||||||
version: 27.2.0
|
version: 28.1.4
|
||||||
electron-builder:
|
electron-builder:
|
||||||
specifier: ^24.6.3
|
specifier: ^24.6.3
|
||||||
version: 24.6.3
|
version: 24.6.3
|
||||||
|
@ -1027,8 +1027,8 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/electron@27.2.0:
|
/electron@28.1.4:
|
||||||
resolution: {integrity: sha512-no/iMICVLI/5G0IqgKFbB89HDN88DWwKeRO+dPfJPkpJISdEX8Cx/sMEOFuuRa4VNInNe5CKCqRWExK5z3AdcQ==}
|
resolution: {integrity: sha512-WE6go611KOhtH6efRPMnVC7FE7DCKnQ3ZyHFeI1DbaCy8OU4UjZ8/CZGcuZmZgRdxSBEHoHdgaJkWRHZzF0FOg==}
|
||||||
engines: {node: '>= 12.20.55'}
|
engines: {node: '>= 12.20.55'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
|
27
src/splash/redirect.html
Normal file
27
src/splash/redirect.html
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Loading</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Loading Discord</h1>
|
||||||
|
<script>
|
||||||
|
switch (window.armcord.channel) {
|
||||||
|
case "stable":
|
||||||
|
window.location.replace("https://discord.com/app");
|
||||||
|
break;
|
||||||
|
case "canary":
|
||||||
|
window.location.replace("https://canary.discord.com/app");
|
||||||
|
break;
|
||||||
|
case "ptb":
|
||||||
|
window.location.replace("https://ptb.discord.com/app");
|
||||||
|
break;
|
||||||
|
case undefined:
|
||||||
|
window.location.replace("https://discord.com/app");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
window.location.replace("https://discord.com/app");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -274,25 +274,9 @@ async function doAfterDefiningTheWindow(): Promise<void> {
|
||||||
if (firstRun) {
|
if (firstRun) {
|
||||||
mainWindow.close();
|
mainWindow.close();
|
||||||
}
|
}
|
||||||
mainWindow.loadURL("data:text/html,%3Ch1%3ELoading%21%3C%2Fh1%3E");
|
//loadURL broke for no good reason after E28
|
||||||
mainWindow.webContents.executeJavaScript(`
|
mainWindow.loadFile("splash/redirect.html");
|
||||||
switch (window.armcord.channel) {
|
|
||||||
case "stable":
|
|
||||||
window.location.replace("https://discord.com/app");
|
|
||||||
break;
|
|
||||||
case "canary":
|
|
||||||
window.location.replace("https://canary.discord.com/app");
|
|
||||||
break;
|
|
||||||
case "ptb":
|
|
||||||
window.location.replace("https://ptb.discord.com/app");
|
|
||||||
break;
|
|
||||||
case undefined:
|
|
||||||
window.location.replace("https://discord.com/app");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
window.location.replace("https://discord.com/app");
|
|
||||||
}
|
|
||||||
`);
|
|
||||||
if (await getConfig("skipSplash")) {
|
if (await getConfig("skipSplash")) {
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue