Update UI

Refactor and added new functioms
This commit is contained in:
AlphaX-Projects
2024-05-08 13:16:23 +02:00
parent 940f9f82f8
commit fa29ff4c43
357 changed files with 82113 additions and 83085 deletions

View File

@@ -2,13 +2,13 @@ const path = require('path')
const defaultConfig = require('./default.config.js')
const build = {
options: {
outputDir: path.join(__dirname, '../build'),
imgDir: path.join(__dirname, '../img')
},
aliases: {
'qortal-ui-crypto': path.join(__dirname, '../crypto/api.js')
}
options: {
outputDir: path.join(__dirname, '../build'),
imgDir: path.join(__dirname, '../img')
},
aliases: {
'qortal-ui-crypto': path.join(__dirname, '../crypto/api.js')
}
}
module.exports = build
module.exports = build

View File

@@ -1,8 +1,8 @@
const defaultConfig = require('./default.config.js')
module.exports = {
name: 'Qortal',
symbol: 'Qort',
addressVersion: 58, // Q for Qortal
logo: '/img/QORT_LOGO.svg'
}
name: 'Qortal',
symbol: 'Qort',
addressVersion: 58, // Q for Qortal
logo: '/img/QORT_LOGO.svg'
}

View File

@@ -1,27 +1,33 @@
let config = require('./default.config.js')
let userConfig = {}
try {
userConfig = require('./customConfig.js')
} catch (e) {
console.warn(e)
console.warn('Error loading user config')
}
const checkKeys = (storeObj, newObj) => {
for (const key in newObj) {
if (!Object.prototype.hasOwnProperty.call(storeObj, key)) return
if (typeof newObj[key] === 'object') {
storeObj[key] = checkKeys(storeObj[key], newObj[key])
} else {
storeObj[key] = newObj[key]
}
}
return storeObj
let userConfig = {}
try {
userConfig = require('./customConfig.js')
} catch (e) {
console.warn(e)
console.warn('Error loading user config')
}
const checkKeys = (storeObj, newObj) => {
for (const key in newObj) {
if (!Object.prototype.hasOwnProperty.call(storeObj, key)) {
return
}
if (typeof newObj[key] === 'object') {
storeObj[key] = checkKeys(storeObj[key], newObj[key])
} else {
storeObj[key] = newObj[key]
}
}
return storeObj
}
const getConfig = customConfig => {
config = checkKeys(config, customConfig)
return config
config = checkKeys(config, customConfig)
return config
}
module.exports = getConfig(userConfig)
module.exports = getConfig(userConfig)

View File

@@ -1,3 +1,3 @@
const defaultConfig = require('./default.config.js')
module.exports = {}
module.exports = {}

View File

@@ -4,10 +4,4 @@ const styles = require('./styles.config.js')
const build = require('./build.config.js')
const user = require('./user.config.js')
module.exports = {
coin,
styles,
build,
user,
crypto
}
module.exports = { coin, styles, build, user, crypto }

View File

@@ -1,5 +1,4 @@
const uiCore = require('../core/ui-core.js')
const defaultConfig = uiCore('default_config')
module.exports = defaultConfig
module.exports = defaultConfig

View File

@@ -1 +1 @@
module.exports = {}
module.exports = {}

View File

@@ -1,10 +1,11 @@
const user = require('./default.config.js').user
module.exports = {
node: 0, // set to mainnet
server: {
primary: {
port: 12388, // set as default UI port
address: '0.0.0.0', // can specify an IP for a fixed bind
},
},
}
address: '0.0.0.0' // can specify an IP for a fixed bind
}
}
}