mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-07-31 14:11:45 +00:00
Update UI
Refactor and added new functioms
This commit is contained in:
@@ -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
|
@@ -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'
|
||||
}
|
@@ -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)
|
@@ -1,3 +1,3 @@
|
||||
const defaultConfig = require('./default.config.js')
|
||||
|
||||
module.exports = {}
|
||||
module.exports = {}
|
@@ -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 }
|
@@ -1,5 +1,4 @@
|
||||
const uiCore = require('../core/ui-core.js')
|
||||
const defaultConfig = uiCore('default_config')
|
||||
|
||||
|
||||
module.exports = defaultConfig
|
||||
module.exports = defaultConfig
|
@@ -1 +1 @@
|
||||
module.exports = {}
|
||||
module.exports = {}
|
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user