mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
Compare commits
No commits in common. "495a813af164ac44eb4707cb39b58a1bd0c62b03" and "4b4e72ccf42f8ab26e211b19c1397648719afbdf" have entirely different histories.
495a813af1
...
4b4e72ccf4
3 changed files with 33 additions and 59 deletions
|
@ -23,9 +23,6 @@ app.whenReady().then(async () => {
|
||||||
case "native":
|
case "native":
|
||||||
createNativeWindow();
|
createNativeWindow();
|
||||||
break;
|
break;
|
||||||
case "discord":
|
|
||||||
createNativeWindow();
|
|
||||||
break;
|
|
||||||
case "glasstron":
|
case "glasstron":
|
||||||
dialog.showErrorBox(
|
dialog.showErrorBox(
|
||||||
"Glasstron is unsupported.",
|
"Glasstron is unsupported.",
|
||||||
|
|
|
@ -48,7 +48,6 @@
|
||||||
<option value="cumcord">Cumcord</option>
|
<option value="cumcord">Cumcord</option>
|
||||||
<option value="goosemod">GooseMod</option>
|
<option value="goosemod">GooseMod</option>
|
||||||
<option value="flicker">Flicker</option>
|
<option value="flicker">Flicker</option>
|
||||||
<option value="none">None</option>
|
|
||||||
</select>
|
</select>
|
||||||
<p class="header">Client mod:</p>
|
<p class="header">Client mod:</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
32
src/tray.ts
32
src/tray.ts
|
@ -1,30 +1,9 @@
|
||||||
import { app, Menu, Tray } from "electron";
|
import {app, Menu, Tray} from "electron";
|
||||||
import { mainWindow } from "./window";
|
import {mainWindow} from "./window";
|
||||||
import { getConfig } from "./utils";
|
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import { createSettingsWindow } from "./settings/main";
|
import {createSettingsWindow} from "./settings/main";
|
||||||
let tray: any = null;
|
let tray = null;
|
||||||
app.whenReady().then(async () => {
|
app.whenReady().then(() => {
|
||||||
if (await getConfig("windowStyle") == "discord") {
|
|
||||||
tray = new Tray(path.join(__dirname, "../", "/assets/ac_plug.png"));
|
|
||||||
const contextMenu = Menu.buildFromTemplate([
|
|
||||||
{
|
|
||||||
label: "Open ArmCord",
|
|
||||||
click: function () {
|
|
||||||
mainWindow.show();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Quit ArmCord",
|
|
||||||
click: function () {
|
|
||||||
app.quit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
tray.setToolTip("Discord");
|
|
||||||
tray.setContextMenu(contextMenu);
|
|
||||||
} else {
|
|
||||||
tray = new Tray(path.join(__dirname, "../", "/assets/ac_plug.png"));
|
tray = new Tray(path.join(__dirname, "../", "/assets/ac_plug.png"));
|
||||||
const contextMenu = Menu.buildFromTemplate([
|
const contextMenu = Menu.buildFromTemplate([
|
||||||
{
|
{
|
||||||
|
@ -56,5 +35,4 @@ app.whenReady().then(async () => {
|
||||||
|
|
||||||
tray.setToolTip("ArmCord " + app.getVersion());
|
tray.setToolTip("ArmCord " + app.getVersion());
|
||||||
tray.setContextMenu(contextMenu);
|
tray.setContextMenu(contextMenu);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue