cleaning up

This commit is contained in:
smartfrigde 2022-07-05 18:34:53 +02:00
parent 57fbc45315
commit 5d19f1844b
12 changed files with 26 additions and 28 deletions

View File

@ -26,7 +26,7 @@
"@types/node": "^17.0.42",
"@types/ws": "^8.5.3",
"copyfiles": "^2.4.1",
"electron": "^19.0.4",
"electron": "^19.0.7",
"electron-builder": "^23.0.3",
"husky": "^8.0.1",
"prettier": "^2.7.0",
@ -47,7 +47,7 @@
"linux": {
"icon": "build/icon.icns",
"category": "Network",
"maintainer": "smartfrigde@gmail.com",
"maintainer": "smartfridge@vivaldi.net",
"target": [
"deb",
"tar.gz",

File diff suppressed because one or more lines are too long

View File

@ -90,18 +90,18 @@ button {
border: none;
border-radius: 5px;
padding: 8px;
transition: .17s ease;
transition: 0.17s ease;
}
button:hover {
background: var(--brand-experiment-560);
cursor: pointer;
transition: .17s ease;
transition: 0.17s ease;
}
button:active {
background: var(--brand-experiment-600);
cursor: pointer;
transition: .17s ease;
transition: 0.17s ease;
}
#save {
font-size: 15px;
@ -200,4 +200,4 @@ select {
text-overflow: ellipsis;
white-space: nowrap;
outline: none !important;
}
}

View File

@ -135,18 +135,18 @@ button {
border: none;
border-radius: 4px;
padding: 8px 20px;
transition: .17s ease;
transition: 0.17s ease;
}
button:hover {
background: var(--brand-experiment-560);
cursor: pointer;
transition: .17s ease;
transition: 0.17s ease;
}
button:active {
background: var(--brand-experiment-600);
cursor: pointer;
transition: .17s ease;
transition: 0.17s ease;
}
/* }}} */

View File

@ -136,7 +136,6 @@
no-repeat 50% 50%;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' width='25' height='25'%3E%3Cstyle%3E.a%7Bfill:%23808080%7D%3C/style%3E%3Ccircle class='a' cx='15' cy='15' r='15'/%3E%3C/svg%3E")
no-repeat 50% 50%;
}
[armcord-platform="linux"] .titlebar #window-controls-container #quit:active {
background-color: var(--brand-experiment-600);
@ -255,7 +254,7 @@
no-repeat 50% 50%;
mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTI4OSA2TDIuODE4MDEgMy41MjUxM0wzLjUyNTEyIDIuODE4MDJMNS45OTk5OSA1LjI5Mjg5TDguNDc0ODcgMi44MTgwMkw5LjE4MTk3IDMuNTI1MTNMNi43MDcxIDZMOS4xODE5NyA4LjQ3NDg3TDguNDc0ODcgOS4xODE5OEw1Ljk5OTk5IDYuNzA3MTFMMy41MjUxMiA5LjE4MTk4TDIuODE4MDEgOC40NzQ4N0w1LjI5Mjg5IDZaIiBmaWxsPSJyZ2JhKDEyOCwgNiwgMCwgMSkiLz48L3N2Zz4=")
no-repeat 50% 50%;
transform: translate(-0.3px, -11.7px);
transform: translate(-0.3px, -11.7px);
}
[armcord-platform="darwin"] .titlebar #window-controls-container #minimize #minimize-icon {
background-color: #7d631b;
@ -263,7 +262,7 @@
no-repeat 50% 50%;
mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAgNS4zOTk5OUgyVjYuNTk5OTlIMTBWNS4zOTk5OVoiIGZpbGw9IiM5ODY4MDEiLz48L3N2Zz4=")
no-repeat 50% 50%;
transform: translate(-0px, -11.7px);
transform: translate(-0px, -11.7px);
}
[armcord-platform="darwin"] .titlebar #window-controls-container #maximize #maximize-icon {
background-color: #1d7525;
@ -271,7 +270,7 @@
no-repeat 50% 50%;
mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOC41ODgyMyA2Ljk5MDE1TDUuMDA5NzkgMy40MTE3QzQuODU1ODMgMy4yNTc3NCA0Ljk1ODYgMi45OTQyMiA1LjE3NjE0IDIuOTg1MTRMOC45MTA0MiAyLjgyOTMxQzkuMDU2NTggMi44MjMyMSA5LjE3NjczIDIuOTQzMzUgOS4xNzA2MyAzLjA4OTUyTDkuMDE0NzkgNi44MjM4QzkuMDA1NzEgNy4wNDEzNCA4Ljc0MjE5IDcuMTQ0MTEgOC41ODgyMyA2Ljk5MDE1WiIgZmlsbD0iIzEyNUUxRSIvPjxwYXRoIGQ9Ik0zLjQxMTc3IDUuMDA5ODJMNi45OTAyMSA4LjU4ODI3QzcuMTQ0MTcgOC43NDIyMyA3LjA0MTQgOS4wMDU3NSA2LjgyMzg2IDkuMDE0ODNMMy4wODk1OCA5LjE3MDY2QzIuOTQzNDIgOS4xNzY3NiAyLjgyMzI3IDkuMDU2NjEgMi44MjkzNyA4LjkxMDQ1TDIuOTg1MjEgNS4xNzYxN0MyLjk5NDI5IDQuOTU4NjMgMy4yNTc4MSA0Ljg1NTg2IDMuNDExNzcgNS4wMDk4MloiIGZpbGw9IiMxMjVFMUUiLz48L3N2Zz4=")
no-repeat 50% 50%;
transform: translate(-0.2px, -11.7px);
transform: translate(-0.2px, -11.7px);
}
[armcord-platform="darwin"] .titlebar #window-controls-container #minimize {
@ -299,7 +298,6 @@
no-repeat 50% 50%;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' width='13' height='13'%3E%3Cstyle%3E.a%7Bfill:%23808080%7D%3C/style%3E%3Ccircle class='a' cx='15' cy='15' r='15'/%3E%3C/svg%3E")
no-repeat 50% 50%;
}
[armcord-platform="darwin"] .titlebar #window-controls-container:hover #maximize:active {
background-color: #13c11e;

View File

@ -12,9 +12,7 @@
<body>
<div class="container">
<div id="warning" class="hidden">
<p id="setup_offline">
You appear to be offline. Please connect to the internet and restart ArmCord.
</p>
<p id="setup_offline">You appear to be offline. Please connect to the internet and restart ArmCord.</p>
</div>
<div id="setup">
<div id="logo" class="hidden"></div>

View File

@ -7,8 +7,8 @@
@import url("css/splash.css");
</style>
<script>
window.onbeforeunload = function(){
const style = document.createElement('style');
window.onbeforeunload = function () {
const style = document.createElement("style");
style.textContent = "body { display: none; }";
document.head.append(style);
};
@ -30,7 +30,7 @@
text.innerHTML = await armcord.getLang("loading_screen_offline");
} else {
text.innerHTML = await armcord.getLang("loading_screen_start");
if (window.armcord.version === "DEV") {
if (window.armcord.version === "3.1.0") {
console.log("Running a development build of ArmCord. Skipping updater.");
} else {
const response = await fetch("https://armcord.xyz/latest.json");

View File

@ -94,4 +94,4 @@ setInterval(() => {
el.textContent = `\nArmCord Version: ${version}`;
el.onclick = () => ipcRenderer.send("openSettingsWindow");
host.append(el);
}, 2000);
}, 2000);

View File

@ -26,9 +26,8 @@ export function injectTitlebar() {
addStyle(fs.readFileSync(titlebarcssPath, "utf8"));
addStyle(fs.readFileSync(wordmarkcssPath, "utf8"));
document.body.setAttribute("customTitlebar", "");
document.body.setAttribute("armcord-platform", os.platform());
document.body.setAttribute("armcord-platform", "win32");
var titlebar = document.getElementsByClassName("titlebar")[0];
var minimize = document.getElementById("minimize");
var maximize = document.getElementById("maximize");
var quit = document.getElementById("quit");

View File

@ -23,7 +23,7 @@ import type {Server, WebSocket} from "ws";
import {inviteWindow, createInviteWindow} from "./window";
async function wsLog(message: string, ...args: unknown[]) {
console.log("[WebSocket]" + message, ...args);
console.log("[WebSocket] " + message, ...args);
}
/** Generates an inclusive range (as `Array`) from `start` to `end`. */

View File

@ -4,9 +4,7 @@ import { mainWindow } from "./window";
import { getConfig, getConfigLocation, setWindowState } from "./utils";
import * as path from "path";
import { createSettingsWindow } from "./settings/main";
import { platform } from "process";
let tray: any = null;
let defaultIcon = "ac_plug_colored";
app.whenReady().then(async () => {
let finishedSetup = (await getConfig("doneSetup"));
if ((await getConfig("windowStyle")) == "basic") {
@ -89,6 +87,12 @@ app.whenReady().then(async () => {
{
type: "separator"
},
{
label: `Open ${clientName}`,
click: function () {
mainWindow.show();
}
},
{
label: "Open Settings",
click: function () {

View File

@ -1,7 +1,6 @@
import * as fs from "fs";
import { app, dialog } from "electron";
import path from "path";
import { defaultMaxListeners } from "events";
export var firstRun: boolean;
export var isSetup: boolean;
export var contentPath: string;