Fix setup not working, css additions

This commit is contained in:
smartfrigde 2022-04-20 20:30:52 +02:00
parent 61104a166e
commit 97e8fb5e69
2 changed files with 9 additions and 1 deletions

View file

@ -10,3 +10,6 @@
.notice-2HEN-u {
display: none;
}
.sidebar-1tnWFu {
border-top-left-radius: 8px !important;
}

View file

@ -83,7 +83,7 @@ export async function getConfig(object: string) {
const settingsFile = storagePath + "settings.json";
let rawdata = fs.readFileSync(settingsFile, "utf-8");
let returndata = JSON.parse(rawdata);
console.log(returndata[object]);
console.log(object + ": " + returndata[object]);
return returndata[object];
} catch (e) {
console.log("Config probably doesn't exist yet. Returning setup value.");
@ -124,7 +124,12 @@ export async function checkIfConfigExists() {
const userDataPath = app.getPath("userData");
const storagePath = path.join(userDataPath, "/storage/");
const settingsFile = storagePath + "settings.json";
if (!fs.existsSync(settingsFile)) {
if (!fs.existsSync(storagePath)) {
fs.mkdirSync(storagePath);
console.log("Created missing storage folder");
}
console.log("First run of the ArmCord. Starting setup.");
setup();
contentPath = path.join(__dirname, "/content/setup.html");