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