2.0 - Rewrite
This commit is contained in:
smartfridge 2021-05-01 15:13:52 +02:00 committed by GitHub
commit 015d11702a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 4279 additions and 3724 deletions

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

9
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "13:00"
open-pull-requests-limit: 99
versioning-strategy: increase

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules

View file

@ -1,10 +1,13 @@
# armcord # armcord
Armcord is Discord client for Arm Linux. Goal of the project is to bring custom discord version of app to arm. It uses GooseMod for themes and plugins. This will work on normal x86 if you really want it to work. Armcord is a custom Discord client for ARM Linux. It's goal is to bring a custom Discord client to ARM Architecture. It uses [GooseMod](https://goosemod.com) for custom themes and plugins!
# Dependencies: # To run this you need:
nodejs, npm nodejs, npm
# How to run/install it? # How to run/install it?
On first install just do `./install.sh` and it will install needed modules, after that start client with `npm start` 1.Run `npm install`
2.Run `npm start`
Alternative: Download pre-compiled version from releases tab.
# FAQ # FAQ
1.Will I get banned from using it? 1.Will I get banned from using it?
**-You are breaking Discord ToS because this is using GooseMod for themes and plugins but if you don't do anything bad you will not get banned.** **-You are breaking Discord ToS since we are using GooseMod for themes and plugins. But no one ever got banned from using ArmCord or GooseMod**

View file

@ -1,19 +1,40 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8" />
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> <meta http-equiv="refresh" content="5; URL=https://discord.com/app" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<title>ArmCord</title> <title>ArmCord</title>
<meta http-equiv="refresh" content="0; url=http://discord.com/app" /> <style>
:root {
font-family: Arial, Helvetica, sans-serif;
}
.titlebar {
font-family: Verdana, Geneva, Tahoma, sans-serif;
background-color: #2C2F33;
}
body {
color: white;
}
h1 {
color: white;
}
h1 {
text-align: center;
}
span {
text-align: center;
}
</style>
<style>
body {
background-color: #2c2f33;
}
</style>
</head> </head>
<body> <body>
<h1>Hello World!</h1> <h1>ArmCord</h1>
<h1>Redirecting you to Discord...</h1> <h1>Discord will load in few seconds.</h1>
<h1>If you are stuck on this page check your internet connection!</h1>
<!-- You can also require other files to run in this process -->
<script src="./renderer.js"></script>
</body> </body>
</html> </html>

View file

@ -1,2 +0,0 @@
npm install
npm start

25
main.js
View file

@ -1,24 +1,29 @@
// Modules to control application life and create native browser window // Modules to control application life and create native browser window
const {app, BrowserWindow, session} = require('electron') const { app, BrowserWindow, session } = require('electron')
const path = require('path') const path = require('path')
require('v8-compile-cache'); require("v8-compile-cache");
let mainWindow
function createWindow() {
function createWindow () { mainWindow = new BrowserWindow({
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 800, width: 800,
height: 600, height: 600,
frame: false,
webPreferences: { webPreferences: {
preload: path.join(__dirname, 'preload.js') preload: path.join(__dirname, 'preload.js'),
enableRemoteModule: true,
nodeIntegration: false,
} }
}) })
// and load the index.html of the app.
mainWindow.loadFile('index.html') mainWindow.loadFile('index.html')
// Open the DevTools. // Open the DevTools.
// mainWindow.webContents.openDevTools() // mainWindow.webContents.openDevTools()
mainWindow.on('closed', () => {
mainWindow = null
})
} }
// This method will be called when Electron has finished // This method will be called when Electron has finished
@ -41,7 +46,3 @@ app.whenReady().then(() => {
app.on('window-all-closed', function () { app.on('window-all-closed', function () {
if (process.platform !== 'darwin') app.quit() if (process.platform !== 'darwin') app.quit()
}) })
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.

7800
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,69 +1,35 @@
{ {
"name": "armcord", "name": "armcord",
"version": "1.0.0", "version": "2.0.0",
"description": "A minimal Electron application", "description": "ArmCord is a Discord client made for ARM Linux that allows you to customize your experience.",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {
"start": "electron-forge start", "start": "electron .",
"package": "electron-forge package", "dist": "electron-builder",
"make": "electron-forge make" "test": "echo \"Error: no test specified\" && exit 1"
},
"author": "smartfrigde",
"license": "MIT",
"dependencies": {
"custom-electron-titlebar": "3.2.5",
"v8-compile-cache": "^2.3.0"
},
"devDependencies": {
"electron": "latest",
"electron-builder": "latest",
"electron-packager": "latest"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/electron/electron-quick-start.git" "url": "git+https://github.com/smartfrigde/armcord.git"
}, },
"keywords": [ "keywords": [
"Electron", "arm",
"quick", "discord",
"start", "electron"
"tutorial",
"demo"
], ],
"author": "GitHub",
"license": "MIT",
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.54",
"@electron-forge/maker-deb": "^6.0.0-beta.54",
"@electron-forge/maker-rpm": "^6.0.0-beta.54",
"@electron-forge/maker-squirrel": "^6.0.0-beta.54",
"@electron-forge/maker-zip": "^6.0.0-beta.54",
"electron": "^12.0.0"
},
"bugs": { "bugs": {
"url": "https://github.com/electron/electron-quick-start/issues" "url": "https://github.com/smartfrigde/armcord/issues"
}, },
"homepage": "https://github.com/electron/electron-quick-start#readme", "homepage": "https://github.com/smartfrigde/armcord#readme"
"dependencies": {
"electron-squirrel-startup": "^1.0.0",
"rpmbuild": "0.0.23",
"v8-compile-cache": "^2.3.0",
"yarn": "^1.22.10"
},
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "armcord"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
}
} }

View file

@ -1,19 +1,9 @@
// All of the Node.js APIs are available in the preload process. const customTitlebar = require('custom-electron-titlebar')
// It has the same sandbox as a Chrome extension.
window.addEventListener('DOMContentLoaded', () => { window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => { new customTitlebar.Titlebar({
const element = document.getElementById(selector) backgroundColor: customTitlebar.Color.fromHex("#2C2F33"),
if (element) element.innerText = text });
}
for (const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}-version`, process.versions[type])
}
}) })
style = document.createElement("style");
document.head.appendChild(style);
style.appendChild(
document.createTextNode(
`@import url("https://smartfrigde.github.io/smartcord/custom.css")`
)
);

View file

@ -1,6 +0,0 @@
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// No Node.js APIs are available in this process because
// `nodeIntegration` is turned off. Use `preload.js` to
// selectively enable features needed in the rendering
// process.