diff --git a/assets/lang/zh-Hans.json b/assets/lang/zh-Hans.json index 6b89784..9788d9e 100644 --- a/assets/lang/zh-Hans.json +++ b/assets/lang/zh-Hans.json @@ -4,18 +4,18 @@ "settings-patches": "Automatic Patches", "settings-mod-desc4": "heavily work in progress, doesn't have a working UI.", "loading_screen_update": "A new version of ArmCord is available. Please update to the latest version.", - "loading_screen_start": "启动ArmCord…", + "loading_screen_start": "Starting ArmCord…", "setup_question1": "Select what kind of setup you want to perform:", "loading_screen_offline": "You appear to be offline. Please connect to the Internet and try again.", "setup_question1_answer1": "Express Setup", "setup_question1_answer2": "Full Setup", "setup_offline": "You appear to be offline. Please connect to the internet and restart ArmCord.", "setup_question2": "Choose your Discord channel/instance:", - "settings-updater": "检查更新", + "settings-updater": "Check for updates", "setup_question3": "Should ArmCord handle client mods installation?", - "yes": "是的", - "no": "不是", - "next": "接下来", + "yes": "Yes", + "no": "No", + "next": "Next", "setup_question4": "Select a client mod you want to install:", "setup_question4_clientmodnotice": "Why not all of them? Having many client mods at the same time can cause issues. If you really want to do it though, check our Discord.", "settings-theme": "ArmCord theme", @@ -52,5 +52,5 @@ "settings-themesFolder": "Open themes folder", "settings-storageFolder": "Open storage folder", "settings-none": "None", - "settings-save": "保存设置" + "settings-save": "Save Settings" } diff --git a/assets/ping.png b/assets/ping.png deleted file mode 100644 index 1d0762a..0000000 Binary files a/assets/ping.png and /dev/null differ diff --git a/package.json b/package.json index 4401bf8..6a950ee 100644 --- a/package.json +++ b/package.json @@ -28,13 +28,13 @@ "devDependencies": { "@types/node": "^18.7.13", "@types/ws": "^8.5.3", - "chalk-cli": "^5.0.0", "copyfiles": "^2.4.1", - "electron": "^20.1.0", + "electron": "^19.0.8", "electron-builder": "^23.0.3", "husky": "^8.0.1", "prettier": "^2.7.0", - "typescript": "^4.7.3" + "typescript": "^4.7.3", + "chalk-cli": "^5.0.0" }, "dependencies": { "electron-context-menu": "github:ArmCord/electron-context-menu", diff --git a/src/content/css/settings.css b/src/content/css/settings.css index 051c673..b964039 100644 --- a/src/content/css/settings.css +++ b/src/content/css/settings.css @@ -254,3 +254,36 @@ select { white-space: nowrap; outline: none !important; } +.acTheme { + height: 15em !important; +} +.acCSP { + height: 10em !important; +} +.acPatches { + height: 10em !important; +} +.acWebsocket { + height: 10em !important; +} +.acMobileMode { + height: 11em !important; +} +.acAltPaste { + height: 11em !important; +} +.acChannel { + height: 21em !important; +} +.acClientMod { + height: 18em !important; +} +.acCordwood { + height: 8em !important; +} +.acPrfmMode { + height: 10em !important; +} +.acTray { + height: 8em !important; +} diff --git a/src/content/css/settingsEng.css b/src/content/css/settingsEng.css deleted file mode 100644 index 4d2acac..0000000 --- a/src/content/css/settingsEng.css +++ /dev/null @@ -1,33 +0,0 @@ -.acTheme { - height: 15em !important; -} -.acCSP { - height: 10em !important; -} -.acPatches { - height: 10em !important; -} -.acWebsocket { - height: 10em !important; -} -.acMobileMode { - height: 11em !important; -} -.acAltPaste { - height: 11em !important; -} -.acChannel { - height: 21em !important; -} -.acClientMod { - height: 18em !important; -} -.acCordwood { - height: 8em !important; -} -.acPrfmMode { - height: 10em !important; -} -.acTray { - height: 8em !important; -} diff --git a/src/content/setup.html b/src/content/setup.html index 14e11de..9a00dd0 100644 --- a/src/content/setup.html +++ b/src/content/setup.html @@ -122,7 +122,7 @@ mods: "cumcord", inviteWebsocket: true, mobileMode: false, - trayIcon: "default", + trayIcon: "ac_plug_colored", performanceMode: "none" }); setTimeout(() => window.armcordinternal.restart(), 5000); @@ -154,7 +154,7 @@ automaticPatches: false, performanceMode: "none", alternativePaste: false, - trayIcon: "default", + trayIcon: "ac_plug_colored", mods: options.mod, inviteWebsocket: true }); @@ -171,7 +171,7 @@ mods: "none", alternativePaste: false, performanceMode: "none", - trayIcon: "default", + trayIcon: "ac_plug_colored", inviteWebsocket: true }); setTimeout(() => window.armcordinternal.restart(), 500); diff --git a/src/content/splash.html b/src/content/splash.html index 4f9ce70..0378dd1 100644 --- a/src/content/splash.html +++ b/src/content/splash.html @@ -47,7 +47,7 @@ } } setTimeout(() => { - window.armcord.splashEnd(); + window.armcordinternal.splashEnd(); switch (window.armcord.channel) { case "stable": window.location.replace("https://discord.com/app"); diff --git a/src/ipc.ts b/src/ipc.ts index 21ff712..131115f 100644 --- a/src/ipc.ts +++ b/src/ipc.ts @@ -1,19 +1,9 @@ //ipc stuff -import {app, ipcMain, shell, desktopCapturer,nativeImage} from "electron"; +import {app, ipcMain, shell, desktopCapturer} from "electron"; import {mainWindow} from "./window"; -import { - setConfigBulk, - getVersion, - getConfig, - setLang, - getLang, - getWindowState, - packageVersion, getDisplayVersion -} from "./utils"; +import {setConfigBulk, getVersion, getConfig, setLang, getLang, getWindowState, packageVersion} from "./utils"; import {customTitlebar} from "./main"; import {createSettingsWindow} from "./settings/main"; -import os from "os"; -import path from "path"; export function registerIpc() { ipcMain.on("get-app-path", (event, arg) => { event.reply("app-path", app.getAppPath()); @@ -27,21 +17,6 @@ export function registerIpc() { ipcMain.on("open-external-link", (event, href: string) => { shell.openExternal(href); }); - ipcMain.on("setPing", (event, pingCount: number) => { - switch (os.platform()) { - case "linux" ?? "macos": - app.setBadgeCount(pingCount) - break; - case "win32": - if (pingCount > 0) { - var image = nativeImage.createFromPath(path.join(__dirname, "../", `/assets/ping.png`)) - mainWindow.setOverlayIcon(image, "badgeCount") - } else { - mainWindow.setOverlayIcon(null, "badgeCount") - } - break; - } - }); ipcMain.on("win-maximize", (event, arg) => { mainWindow.maximize(); }); @@ -69,13 +44,10 @@ export function registerIpc() { ipcMain.on("get-app-version", (event) => { event.returnValue = getVersion(); }); - ipcMain.on("displayVersion", (event) => { - event.returnValue = getDisplayVersion(); - }); ipcMain.on("get-package-version", (event) => { event.returnValue = packageVersion; }); - ipcMain.on("splashEnd", async () => { + ipcMain.on("splashEnd", async (event, arg) => { try { var width = (await getWindowState("width")) ?? 800; var height = (await getWindowState("height")) ?? 600; diff --git a/src/menu.ts b/src/menu.ts index a76e838..f6535bf 100644 --- a/src/menu.ts +++ b/src/menu.ts @@ -1,7 +1,6 @@ import {Menu, app, clipboard, globalShortcut} from "electron"; import {mainWindow} from "./window"; import {getConfig} from "./utils"; -import {createSettingsWindow} from "./settings/main"; function paste(contents: any) { const contentTypes = clipboard.availableFormats().toString(); @@ -52,20 +51,6 @@ export async function setMenu() { mainWindow.webContents.openDevTools(); } }, - { - label: "Open settings", - accelerator: "CmdOrCtrl+Shift+'", - click: function () { - createSettingsWindow(); - } - }, - { - label: "Reload", - accelerator: "CmdOrCtrl+R", - click: function () { - mainWindow.reload() - } - }, { label: "Quit", accelerator: "CmdOrCtrl+Q", @@ -92,13 +77,6 @@ export async function setMenu() { }, {label: "Select All", accelerator: "CmdOrCtrl+A", role: "selectAll"} ] - }, - { - label: "Zoom", - submenu: [ - {label: "Zoom in", accelerator: "CmdOrCtrl+Plus", role: "zoomIn"}, - {label: "Zoom out", accelerator: "CmdOrCtrl+-", role: "zoomOut"}, - ] } ]; diff --git a/src/preload/bridge.ts b/src/preload/bridge.ts index 1365f1e..d421d5b 100644 --- a/src/preload/bridge.ts +++ b/src/preload/bridge.ts @@ -16,8 +16,6 @@ contextBridge.exposeInMainWorld("armcord", { electron: process.versions.electron, channel: ipcRenderer.sendSync("channel"), setLang: (lang: string) => ipcRenderer.send("setLang", lang), - setPingCount: (pingCount: number) => ipcRenderer.send("setPing", pingCount), - setTrayIcon: (favicon: string) => ipcRenderer.send("sendTrayIcon", favicon), getLang: (toGet: string) => ipcRenderer.invoke("getLang", toGet).then((result) => { return result; @@ -25,13 +23,13 @@ contextBridge.exposeInMainWorld("armcord", { version: ipcRenderer.sendSync("get-app-version", "app-version"), packageVersion: ipcRenderer.sendSync("get-package-version", "app-version"), getDisplayMediaSelector: getDisplayMediaSelector, - splashEnd: () => ipcRenderer.send("splashEnd"), openSettingsWindow: () => ipcRenderer.send("openSettingsWindow") }); //to be only used inside armcord internal setup/splash etc if (window.location.href.indexOf("splash.html") > -1 || window.location.href.indexOf("setup.html") > -1) { contextBridge.exposeInMainWorld("armcordinternal", { restart: () => ipcRenderer.send("restart"), - saveSettings: (...args: any) => ipcRenderer.send("saveSettings", ...args) + saveSettings: (...args: any) => ipcRenderer.send("saveSettings", ...args), + splashEnd: () => ipcRenderer.send("splashEnd") }); } diff --git a/src/preload/preload.ts b/src/preload/preload.ts index d0963a1..f98d82e 100644 --- a/src/preload/preload.ts +++ b/src/preload/preload.ts @@ -7,7 +7,7 @@ import {injectHummusTitlebar, injectTitlebar} from "./titlebar"; import {sleep, addStyle, injectJS, addScript} from "../utils"; import {ipcRenderer} from "electron"; import {injectMobileStuff} from "./mobile"; -var version = ipcRenderer.sendSync("displayVersion"); +var version = ipcRenderer.sendSync("get-app-version", "app-version"); var channel = ipcRenderer.sendSync("channel"); async function updateLang() { if (window.location.href.indexOf("setup.html") > -1) { diff --git a/src/settings/hummus.html b/src/settings/hummus.html index 010ba50..15b5abc 100644 --- a/src/settings/hummus.html +++ b/src/settings/hummus.html @@ -15,23 +15,6 @@
-
- -

ArmCord theme

-

- ArmCord "themes" manage apps behaviour and looks. -
- Default - 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. -
- Native - uses native titlebar of OS you're currently running (e.g Windows 7/10). Functions more - similar to actual Discord app on Linux. -

-
-
@@ -124,8 +107,7 @@