Added Theme Folder Button

This commit is contained in:
KayoticCarnige 2021-05-25 06:24:42 -04:00
parent 21435ca167
commit 253ff66cc3
4 changed files with 38 additions and 5 deletions

View File

@ -56,6 +56,7 @@ button.back-btn {
height: 25px;
margin-top: 5px;
margin-left: 5px;
left: 0;
text-align: center;
border-style: none;
outline: none;
@ -72,6 +73,34 @@ button.back-btn:active {
background-color: #5c6fb1;
}
button#open-themes-btn {
position: absolute;
background-color: #7289da;
font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #ffffff;
padding: 4px;
border-radius: 5px;
width: 105px;
height: 25px;
margin-top: 5px;
margin-right: 5px;
right: 0;
text-align: center;
border-style: none;
outline: none;
}
button#open-themes-btn:hover {
background-color: #687dc6;
border-style: none;
outline: none;
cursor: pointer;
}
button#open-themes-btn:active {
background-color: #5c6fb1;
}
#tm-list {
position: absolute;
top: 100px;

View File

@ -8,7 +8,8 @@
<body>
<a href="https://discord.com/app"><button class="back-btn">Back to Discord</button></a>
<button id="open-themes-btn">Themes Folder</button>
<p class="logo">Cord Manager</p>
<div id="tm-list"></div>
</body>
</html>
</html>

View File

@ -33,6 +33,7 @@ window.addEventListener("DOMContentLoaded", () => {
--window-buttons: var(--header-secondary);
--cord-color: var(--header-primary);
--armcord-color: #7289da;
--titlebar-color: var(--background-tertiary);
}
.base-3dtUhz, .sidebar-2K8pFh {
display: -webkit-box;
@ -64,10 +65,10 @@ div.menubar[role="menubar"] {
.window-title {
font-size: 0px !important;
margin-left: initial !important;
transform: translate(10px, 2px) !important;
transform: translate(10px, 2px);
}
.titlebar {
background: var(--background-tertiary) !important;
background: var(--titlebar-color) !important;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.titlebar .window-controls-container .window-icon {

View File

@ -1,5 +1,6 @@
const fs = require("fs");
const armcord = require("./ArmCord.js");
const {shell} = require('electron');
const ArmCord = require("./ArmCord.js");
const themeFolder = __dirname + "/themes/";
window.addEventListener("DOMContentLoaded", () => {
@ -18,7 +19,7 @@ window.addEventListener("DOMContentLoaded", () => {
"color:red; font-weight: bold; font-size: 50px;color: red;"
);
}
armcord.addStyle(theme);
ArmCord.addStyle(theme);
var html = `<div id="tm-list-item"><div id="theme-name">${themeFile.name}</div><div id="theme-author">By ${themeFile.author}</div><div id="theme-description">${themeFile.description}</div></div><br><br>`;
document.getElementById("tm-list").innerHTML = html + document.getElementById("tm-list").innerHTML;
console.log(`%cLoaded ${themeFile.name} made by ${themeFile.author}`, "color:red");
@ -26,4 +27,5 @@ window.addEventListener("DOMContentLoaded", () => {
console.error(err);
}
});
document.getElementById("open-themes-btn").onclick = function () {shell.openPath(`${__dirname}/themes`);};
});