mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Remove Hummus support
This commit is contained in:
parent
3339a4ca1b
commit
e0313c01dd
8 changed files with 4 additions and 261 deletions
|
@ -30,12 +30,10 @@
|
||||||
"settings-mobileMode": "Mobile mode",
|
"settings-mobileMode": "Mobile mode",
|
||||||
"settings-mobileMode-desc": "If you're on a device with touch-screen this feature is for you! It activates Discord's hidden mobile\n mode meant for phones and tablets. Only major feature missing is voice chat support. This is ideal for\n users on PinePhone and similar.",
|
"settings-mobileMode-desc": "If you're on a device with touch-screen this feature is for you! It activates Discord's hidden mobile\n mode meant for phones and tablets. Only major feature missing is voice chat support. This is ideal for\n users on PinePhone and similar.",
|
||||||
"settings-channel": "Discord channel",
|
"settings-channel": "Discord channel",
|
||||||
"settings-channel-hummus": "Hummus (Experimental)",
|
|
||||||
"settings-channel-desc1": "You can use this setting to change current instance of Discord:",
|
"settings-channel-desc1": "You can use this setting to change current instance of Discord:",
|
||||||
"settings-channel-desc2": "you're probably most familiar with this one. It's the one you see in default Discord\n client!",
|
"settings-channel-desc2": "you're probably most familiar with this one. It's the one you see in default Discord\n client!",
|
||||||
"settings-channel-desc3": "this is alpha test release of Discord. By using it you gain access to the newest\n features and fixes.",
|
"settings-channel-desc3": "this is alpha test release of Discord. By using it you gain access to the newest\n features and fixes.",
|
||||||
"settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.",
|
"settings-channel-desc4": "public test build. Receives features earlier than stable but is a bit older than Canary.",
|
||||||
"settings-channel-desc5": "unofficial instance of Discord that takes you back to 2016! Only client mod\n available to run alongside with it is Cordwood. It's run by community, so you take all the risk by\n using it.",
|
|
||||||
"settings-invitewebsocket": "Rich Presence (Experimental)",
|
"settings-invitewebsocket": "Rich Presence (Experimental)",
|
||||||
"settings-invitewebsocket-desc": "Uses <a target=\"_blank\" href=\"https://github.com/OpenAsar/arrpc\">arRPC</a> to support Discord RPC (Rich Presence) with local programs on your machine. Work in progress.",
|
"settings-invitewebsocket-desc": "Uses <a target=\"_blank\" href=\"https://github.com/OpenAsar/arrpc\">arRPC</a> to support Discord RPC (Rich Presence) with local programs on your machine. Work in progress.",
|
||||||
"settings-altPaste": "Alternative Paste",
|
"settings-altPaste": "Alternative Paste",
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
<option value="stable">Stable</option>
|
<option value="stable">Stable</option>
|
||||||
<option value="canary">Canary</option>
|
<option value="canary">Canary</option>
|
||||||
<option value="ptb">PTB</option>
|
<option value="ptb">PTB</option>
|
||||||
<option value="hummus">Hummus (unofficial)</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-center setup-ask" id="setup_question3">
|
<p class="text-center setup-ask" id="setup_question3">
|
||||||
|
|
|
@ -78,9 +78,6 @@
|
||||||
case "ptb":
|
case "ptb":
|
||||||
window.location.replace("https://ptb.discord.com/app");
|
window.location.replace("https://ptb.discord.com/app");
|
||||||
break;
|
break;
|
||||||
case "hummus":
|
|
||||||
window.location.replace("https://hummus.sys42.net/");
|
|
||||||
break;
|
|
||||||
case undefined:
|
case undefined:
|
||||||
window.location.replace("https://discord.com/app");
|
window.location.replace("https://discord.com/app");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import "./capturer";
|
||||||
import "./patch";
|
import "./patch";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import {fixTitlebar, injectHummusTitlebar, injectTitlebar} from "./titlebar";
|
import {fixTitlebar, injectTitlebar} from "./titlebar";
|
||||||
import {sleep, addStyle, addScript} from "../utils";
|
import {sleep, addStyle, addScript} from "../utils";
|
||||||
import {injectMobileStuff} from "./mobile";
|
import {injectMobileStuff} from "./mobile";
|
||||||
window.localStorage.setItem("hideNag", "true");
|
window.localStorage.setItem("hideNag", "true");
|
||||||
|
@ -33,11 +33,7 @@ if (window.location.href.indexOf("splash.html") > -1) {
|
||||||
console.log("Skipping titlebar injection and client mod injection.");
|
console.log("Skipping titlebar injection and client mod injection.");
|
||||||
} else {
|
} else {
|
||||||
if (ipcRenderer.sendSync("titlebar")) {
|
if (ipcRenderer.sendSync("titlebar")) {
|
||||||
if (channel == "hummus") {
|
injectTitlebar();
|
||||||
injectHummusTitlebar();
|
|
||||||
} else {
|
|
||||||
injectTitlebar();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (ipcRenderer.sendSync("mobileMode")) {
|
if (ipcRenderer.sendSync("mobileMode")) {
|
||||||
injectMobileStuff();
|
injectMobileStuff();
|
||||||
|
@ -67,11 +63,7 @@ if (window.location.href.indexOf("splash.html") > -1) {
|
||||||
if (document.getElementById("window-controls-container") == null) {
|
if (document.getElementById("window-controls-container") == null) {
|
||||||
console.warn("Titlebar didn't inject, retrying...");
|
console.warn("Titlebar didn't inject, retrying...");
|
||||||
if (ipcRenderer.sendSync("titlebar")) {
|
if (ipcRenderer.sendSync("titlebar")) {
|
||||||
if (channel == "hummus") {
|
fixTitlebar();
|
||||||
injectHummusTitlebar();
|
|
||||||
} else {
|
|
||||||
fixTitlebar();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await updateLang();
|
await updateLang();
|
||||||
|
|
|
@ -1,234 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<style>
|
|
||||||
@import url("../content/css/settings.css");
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="saveBar">
|
|
||||||
<button id="settings-save" class="center">Save Settings</button>
|
|
||||||
</div>
|
|
||||||
<div class="restartBar">
|
|
||||||
<button id="settings-restart" class="center">Restart App</button>
|
|
||||||
</div>
|
|
||||||
<div class="switch acTheme">
|
|
||||||
<select name="theme" id="theme" class="left dropdown">
|
|
||||||
<option value="default">Default</option>
|
|
||||||
<option value="native">Native</option>
|
|
||||||
</select>
|
|
||||||
<p class="header" id="settings-theme">ArmCord theme</p>
|
|
||||||
<p class="description">
|
|
||||||
ArmCord "themes" manage apps behaviour and looks.
|
|
||||||
<br />
|
|
||||||
<b>Default</b> - this is how ArmCord looks when you first launch it. It includes recreation of Discord's
|
|
||||||
custom titlebar and ArmCord specific styles injected into Discord.
|
|
||||||
<br />
|
|
||||||
<b>Native</b> - uses native titlebar of OS you're currently running (e.g Windows 7/10). Functions more
|
|
||||||
similar to actual Discord app on Linux.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="switch acCSP">
|
|
||||||
<label class="header">ArmCord CSP</label>
|
|
||||||
<input class="tgl tgl-light left" id="csp" type="checkbox" />
|
|
||||||
<label class="tgl-btn left" for="csp"></label>
|
|
||||||
<p class="description">
|
|
||||||
ArmCord CSP is our system that manages loading custom content loading into the Discord app. Stuff like
|
|
||||||
client mods and themes depend on it. Disable if you want to get rid of mods and custom styles.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="switch acTray">
|
|
||||||
<label class="header" id="settings-tray">Minimize to tray</label>
|
|
||||||
<input class="tgl tgl-light left" id="tray" type="checkbox" />
|
|
||||||
<label class="tgl-btn left" for="tray"></label>
|
|
||||||
<p class="description">
|
|
||||||
When disabled, ArmCord will close like any other window when closed, otherwise it'll sit back and relax
|
|
||||||
in your system tray for later.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="switch acPatches">
|
|
||||||
<label class="header" id="settings-patches">Automatic Patches</label>
|
|
||||||
<input class="tgl tgl-light left" id="patches" type="checkbox" />
|
|
||||||
<label class="tgl-btn left" for="patches"></label>
|
|
||||||
<p class="description">
|
|
||||||
Fetches automatic patches that are distributed if release turns out to have bugs after release. Usually
|
|
||||||
you don't have to keep this enabled, unless notified in support Discord.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="switch acAltPaste">
|
|
||||||
<label class="header" id="settings-alternativePaste">Alternative paste</label>
|
|
||||||
<input class="tgl tgl-light left" id="alternativePaste" type="checkbox" />
|
|
||||||
<label class="tgl-btn left" for="alternativePaste"></label>
|
|
||||||
<p class="description">
|
|
||||||
If you're on Gnome on Linux or just simply can't paste images copied from other messages, then this is
|
|
||||||
for you. This enables alternative module for pasting images. Only enable this when you're experiencing
|
|
||||||
issues.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="switch acChannel">
|
|
||||||
<select name="channel" id="channel" class="left dropdown">
|
|
||||||
<option value="stable">Stable</option>
|
|
||||||
<option value="canary">Canary</option>
|
|
||||||
<option value="ptb">PTB</option>
|
|
||||||
<option value="hummus">Hummus (unofficial)</option>
|
|
||||||
</select>
|
|
||||||
<div>
|
|
||||||
<p class="header" id="settings-channel">Discord channel:</p>
|
|
||||||
<p class="description">
|
|
||||||
You can use this setting to change current instance of Discord:
|
|
||||||
<br />
|
|
||||||
<b>Stable</b> - you're probably most familiar with this one. It's the one you see in default Discord
|
|
||||||
client!
|
|
||||||
<br />
|
|
||||||
<b>Canary</b> - this is alpha test release of Discord. By using it you gain access to newest
|
|
||||||
features and fixes.
|
|
||||||
<br />
|
|
||||||
<b>PTB</b> - public test build. Gets features earlier than stable but is a bit older than Canary.
|
|
||||||
<br />
|
|
||||||
<b>Hummus</b> - unofficial instance of Discord that takes you back to 2016! None of the client mods
|
|
||||||
bundled with ArmCord work with it. It's run by community, so you take all the risk by using it.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="switch acCordwood">
|
|
||||||
<label class="header" id="settings-cordwood">Cordwood client mod</label>
|
|
||||||
<input class="tgl tgl-light left" id="cordwood" type="checkbox" />
|
|
||||||
<label class="tgl-btn left" for="cordwood"></label>
|
|
||||||
<p class="description">
|
|
||||||
Client mod for Hummus that focuses on making the plugin development experience easier. Minimal, light,
|
|
||||||
and easy to use
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="switch acPrfmMode">
|
|
||||||
<select name="prfmMode" id="prfmMode" class="left dropdown">
|
|
||||||
<option value="performance">Performance</option>
|
|
||||||
<option value="battery">Battery</option>
|
|
||||||
<option value="none">None</option>
|
|
||||||
</select>
|
|
||||||
<p class="header" id="settings-prfmMode">Performance mode:</p>
|
|
||||||
<p class="description">
|
|
||||||
Performance mode is an experimental function that may either increase responsiveness and performance of
|
|
||||||
ArmCord or... decrease it. Please try every option and see which fits you the best.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="switch acTray">
|
|
||||||
<select name="trayIcon" id="trayIcon" class="left dropdown">
|
|
||||||
<optgroup label="- Discord -">
|
|
||||||
<option value="default">Dynamic</option>
|
|
||||||
<option value="dsc-tray">Discord Icon</option>
|
|
||||||
<option value="clsc-dsc-tray">Classic Discord Icon</option>
|
|
||||||
</optgroup>
|
|
||||||
<optgroup label="- ArmCord -">
|
|
||||||
<option value="ac_plug_colored">Colored Plug</option>
|
|
||||||
<option value="ac_white_plug">White Plug</option>
|
|
||||||
<option value="ac_white_plug_hollow">White Plug Alt</option>
|
|
||||||
<option value="ac_black_plug">Black Plug</option>
|
|
||||||
<option value="ac_black_plug_hollow">Black Plug Alt</option>
|
|
||||||
</optgroup>
|
|
||||||
</select>
|
|
||||||
<p class="header" id="settings-trayIcon">Tray icon:</p>
|
|
||||||
<p class="description">Set the icon which will appear in tray menu.</p>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<div class="switch acAdvSettings">
|
|
||||||
<h1 class="center advancedText">⚠️ Advanced User Zone ⚠️</h1>
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<label class="header" id="settings-skipSplash">Skip Splash Screen (Experimental)</label>
|
|
||||||
<input class="tgl tgl-light left" id="skipSplash" type="checkbox" />
|
|
||||||
<label class="tgl-btn left" for="skipSplash"></label>
|
|
||||||
<p class="description">Skips ArmCord splash screen when you start up the app.</p>
|
|
||||||
<br />
|
|
||||||
<button id="settings-pluginsFolder" class="center">Open Plugins Folder</button>
|
|
||||||
<br />
|
|
||||||
<button id="settings-themesFolder" class="center">Open Themes Folder</button>
|
|
||||||
<br />
|
|
||||||
<button id="settings-storageFolder" class="center">Open Storage Folder</button>
|
|
||||||
<br />
|
|
||||||
<button id="settings-copyDebugInfo" class="center">Copy Debug Info</button>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
<script>
|
|
||||||
async function loadLang() {
|
|
||||||
document.getElementById("settings-save").innerHTML = await settings.getLang("settings-save");
|
|
||||||
document.getElementById("settings-channel").innerHTML = await settings.getLang("settings-channel");
|
|
||||||
document.getElementById("settings-patches").innerHTML = await settings.getLang("settings-patches");
|
|
||||||
document.getElementById("settings-tray").innerHTML = await settings.getLang("settings-tray");
|
|
||||||
document.getElementById("settings-theme").innerHTML = await settings.getLang("settings-theme");
|
|
||||||
document.getElementById("prfmMode").options[2].text = await settings.getLang("settings-none");
|
|
||||||
document.getElementById("prfmMode").options[1].text = await settings.getLang("settings-prfmMode-battery");
|
|
||||||
document.getElementById("prfmMode").options[0].text = await settings.getLang(
|
|
||||||
"settings-prfmMode-performance"
|
|
||||||
);
|
|
||||||
document.getElementById("theme").options[1].text = await settings.getLang("settings-theme-native");
|
|
||||||
document.getElementById("theme").options[0].text = await settings.getLang("settings-theme-default");
|
|
||||||
}
|
|
||||||
loadLang();
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
async function loadSettings() {
|
|
||||||
document.getElementById("csp").checked = await settings.get("armcordCSP");
|
|
||||||
document.getElementById("tray").checked = await settings.get("minimizeToTray");
|
|
||||||
document.getElementById("alternativePaste").checked = await settings.get("alternativePaste");
|
|
||||||
document.getElementById("patches").value = await settings.get("automaticPatches");
|
|
||||||
if ((await settings.get("mods")) == "cordwood") {
|
|
||||||
document.getElementById("cordwood").checked = true;
|
|
||||||
} else {
|
|
||||||
document.getElementById("cordwood").checked = false;
|
|
||||||
}
|
|
||||||
document.getElementById("channel").value = await settings.get("channel");
|
|
||||||
document.getElementById("theme").value = await settings.get("windowStyle");
|
|
||||||
document.getElementById("prfmMode").value = await settings.get("performanceMode");
|
|
||||||
document.getElementById("trayIcon").value = await settings.get("trayIcon");
|
|
||||||
}
|
|
||||||
loadSettings();
|
|
||||||
document.getElementById("settings-save").addEventListener("click", function () {
|
|
||||||
settings.save({
|
|
||||||
windowStyle: document.getElementById("theme").value,
|
|
||||||
channel: document.getElementById("channel").value,
|
|
||||||
armcordCSP: document.getElementById("csp").checked,
|
|
||||||
minimizeToTray: document.getElementById("tray").checked,
|
|
||||||
alternativePaste: document.getElementById("alternativePaste").checked,
|
|
||||||
skipSplash: document.getElementById("skipSplash").checked,
|
|
||||||
automaticPatches: document.getElementById("patches").checked,
|
|
||||||
mods: cordwood,
|
|
||||||
mobileMode: document.getElementById("mobile").checked,
|
|
||||||
inviteWebsocket: document.getElementById("websocket").checked,
|
|
||||||
performanceMode: document.getElementById("prfmMode").value,
|
|
||||||
trayIcon: document.getElementById("trayIcon").value,
|
|
||||||
doneSetup: true
|
|
||||||
});
|
|
||||||
alert(`Your settings have been saved!
|
|
||||||
Some changes may require the app to restart before taking effect.`);
|
|
||||||
});
|
|
||||||
document.getElementById("settings-restart").addEventListener("click", function () {
|
|
||||||
settings.restart();
|
|
||||||
});
|
|
||||||
document.getElementById("settings-pluginsFolder").addEventListener("click", async function () {
|
|
||||||
settings.openPluginsFolder();
|
|
||||||
await new Promise((r) => setTimeout(r, 2000));
|
|
||||||
});
|
|
||||||
document.getElementById("settings-themesFolder").addEventListener("click", async function () {
|
|
||||||
settings.openThemesFolder();
|
|
||||||
await new Promise((r) => setTimeout(r, 2000));
|
|
||||||
});
|
|
||||||
document.getElementById("settings-storageFolder").addEventListener("click", async function () {
|
|
||||||
settings.openStorageFolder();
|
|
||||||
await new Promise((r) => setTimeout(r, 2000));
|
|
||||||
});
|
|
||||||
document.getElementById("settings-copyDebugInfo").addEventListener("click", function () {
|
|
||||||
settings.copyDebugInfo();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</html>
|
|
|
@ -46,11 +46,7 @@ export function createSettingsWindow() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
async function settingsLoadPage() {
|
async function settingsLoadPage() {
|
||||||
if ((await getConfig("channel")) == "hummus") {
|
settingsWindow.loadURL(`file://${__dirname}/settings.html`);
|
||||||
settingsWindow.loadURL(`file://${__dirname}/hummus.html`);
|
|
||||||
} else {
|
|
||||||
settingsWindow.loadURL(`file://${__dirname}/settings.html`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const userDataPath = app.getPath("userData");
|
const userDataPath = app.getPath("userData");
|
||||||
const themesFolder = userDataPath + "/themes/";
|
const themesFolder = userDataPath + "/themes/";
|
||||||
|
|
|
@ -109,7 +109,6 @@
|
||||||
<option value="stable" selected>Stable</option>
|
<option value="stable" selected>Stable</option>
|
||||||
<option value="canary">Canary</option>
|
<option value="canary">Canary</option>
|
||||||
<option value="ptb">PTB</option>
|
<option value="ptb">PTB</option>
|
||||||
<option value="hummus" data-string="settings-channel-hummus"></option>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -123,7 +122,6 @@
|
||||||
<b>PTB</b> -
|
<b>PTB</b> -
|
||||||
<span data-string="settings-channel-desc4"></span>
|
<span data-string="settings-channel-desc4"></span>
|
||||||
<br />
|
<br />
|
||||||
<b>Hummus</b> -<span data-string="settings-channel-desc5"></span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -245,9 +245,6 @@ async function doAfterDefiningTheWindow() {
|
||||||
case "ptb":
|
case "ptb":
|
||||||
window.location.replace("https://ptb.discord.com/app");
|
window.location.replace("https://ptb.discord.com/app");
|
||||||
break;
|
break;
|
||||||
case "hummus":
|
|
||||||
window.location.replace("https://hummus.sys42.net/");
|
|
||||||
break;
|
|
||||||
case undefined:
|
case undefined:
|
||||||
window.location.replace("https://discord.com/app");
|
window.location.replace("https://discord.com/app");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue