Indent with spaces
This commit is contained in:
parent
78a61dc60f
commit
48ee29b621
|
@ -173,7 +173,7 @@ export default class {
|
||||||
|
|
||||||
const configs = {
|
const configs = {
|
||||||
defaultConfig: readConfig.defaultConfig,
|
defaultConfig: readConfig.defaultConfig,
|
||||||
schemes: readConfig.configSchemes,
|
schemes: readConfig.configSchemes,
|
||||||
userConfig
|
userConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
top: 27px;
|
top: 27px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.platform-linux & {
|
.platform-linux & {
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bd-settings-button-btn {
|
.bd-settings-button-btn {
|
||||||
background-image: $logoSmallBw;
|
background-image: $logoSmallBw;
|
||||||
|
|
|
@ -123,16 +123,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.bd-settings .bd-sidebar-view.bd-stop .bd-content-region {
|
.bd-settings .bd-sidebar-view.bd-stop .bd-content-region {
|
||||||
z-index: 3003;
|
z-index: 3003;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bd-backdrop {
|
.bd-backdrop {
|
||||||
z-index: 3003;
|
z-index: 3003;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bd-sidebar .bd-settings-button {
|
.bd-sidebar .bd-settings-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
||||||
.platform-darwin & {
|
.platform-darwin & {
|
||||||
top: 22px;
|
top: 22px;
|
||||||
|
|
|
@ -20,18 +20,18 @@ export class ClientLogger {
|
||||||
static dbg(module, message) { this.log(module, message, 'dbg'); }
|
static dbg(module, message) { this.log(module, message, 'dbg'); }
|
||||||
|
|
||||||
static log(module, message, level = 'log') {
|
static log(module, message, level = 'log') {
|
||||||
level = this.parseLevel(level);
|
level = this.parseLevel(level);
|
||||||
if (typeof message === 'object' && !(message instanceof Array)) {
|
if (typeof message === 'object' && !(message instanceof Array)) {
|
||||||
console[level]('[%cBetter%cDiscord:%s]', 'color: #3E82E5', '', `${module}${level === 'debug' ? '|DBG' : ''}`, message);
|
console[level]('[%cBetter%cDiscord:%s]', 'color: #3E82E5', '', `${module}${level === 'debug' ? '|DBG' : ''}`, message);
|
||||||
let message_string = message.toString();
|
let message_string = message.toString();
|
||||||
if (message_string === '[object Object]')
|
if (message_string === '[object Object]')
|
||||||
message_string += ' ' + JSON.stringify(message, null, 4);
|
message_string += ' ' + JSON.stringify(message, null, 4);
|
||||||
|
|
||||||
logs.push(`${level.toUpperCase()} : [${Vendor.moment().format('DD/MM/YY hh:mm:ss')}|${module}] ${message_string}${message_string === '[object Object]' ? ' ' + JSON.stringify(message, null, 4) : ''}`);
|
logs.push(`${level.toUpperCase()} : [${Vendor.moment().format('DD/MM/YY hh:mm:ss')}|${module}] ${message_string}${message_string === '[object Object]' ? ' ' + JSON.stringify(message, null, 4) : ''}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
message = typeof message === 'object' && message instanceof Array ? message : [message];
|
message = typeof message === 'object' && message instanceof Array ? message : [message];
|
||||||
console[level]('[%cBetter%cDiscord:%s]', 'color: #3E82E5', '', `${module}${level === 'debug' ? '|DBG' : ''}`, ...message);
|
console[level]('[%cBetter%cDiscord:%s]', 'color: #3E82E5', '', `${module}${level === 'debug' ? '|DBG' : ''}`, ...message);
|
||||||
logs.push(`${level.toUpperCase()} : [${Vendor.moment().format('DD/MM/YY hh:mm:ss')}|${module}] ${message.join(' ')}`);
|
logs.push(`${level.toUpperCase()} : [${Vendor.moment().format('DD/MM/YY hh:mm:ss')}|${module}] ${message.join(' ')}`);
|
||||||
}
|
}
|
||||||
|
@ -44,9 +44,9 @@ export class ClientLogger {
|
||||||
this.err(err.module, err.message);
|
this.err(err.module, err.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
static get logs() {
|
static get logs() {
|
||||||
return logs;
|
return logs;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get levels() {
|
static get levels() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -46,26 +46,26 @@ export class Utils {
|
||||||
return camelCased;
|
return camelCased;
|
||||||
}
|
}
|
||||||
|
|
||||||
static compare(value1, value2) {
|
static compare(value1, value2) {
|
||||||
// Check to see if value1 and value2 contain the same data
|
// Check to see if value1 and value2 contain the same data
|
||||||
if (typeof value1 !== typeof value2) return false;
|
if (typeof value1 !== typeof value2) return false;
|
||||||
if (value1 === null && value2 === null) return true;
|
if (value1 === null && value2 === null) return true;
|
||||||
if (value1 === null || value2 === null) return false;
|
if (value1 === null || value2 === null) return false;
|
||||||
|
|
||||||
if (typeof value1 === 'object' || typeof value1 === 'array') {
|
if (typeof value1 === 'object' || typeof value1 === 'array') {
|
||||||
// Loop through the object and check if everything's the same
|
// Loop through the object and check if everything's the same
|
||||||
let value1array = typeof value1 === 'array' ? value1 : Object.keys(value1);
|
let value1array = typeof value1 === 'array' ? value1 : Object.keys(value1);
|
||||||
let value2array = typeof value2 === 'array' ? value2 : Object.keys(value2);
|
let value2array = typeof value2 === 'array' ? value2 : Object.keys(value2);
|
||||||
if (value1array.length !== value2array.length) return false;
|
if (value1array.length !== value2array.length) return false;
|
||||||
|
|
||||||
for (let key in value1) {
|
for (let key in value1) {
|
||||||
if (!this.compare(value1[key], value2[key])) return false;
|
if (!this.compare(value1[key], value2[key])) return false;
|
||||||
}
|
}
|
||||||
} else if (value1 !== value2) return false;
|
} else if (value1 !== value2) return false;
|
||||||
|
|
||||||
// value1 and value2 contain the same data
|
// value1 and value2 contain the same data
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class FileUtils {
|
export class FileUtils {
|
||||||
|
|
|
@ -48,7 +48,7 @@ console.log(dummyArgs);
|
||||||
class Comms {
|
class Comms {
|
||||||
|
|
||||||
constructor(bd) {
|
constructor(bd) {
|
||||||
this.bd = bd;
|
this.bd = bd;
|
||||||
this.initListeners();
|
this.initListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue