This commit is contained in:
Alexey Kasyanchuk 2018-07-18 09:14:14 +03:00
parent 0727da3236
commit a752a67370
4 changed files with 31 additions and 31 deletions

View File

@ -130,38 +130,38 @@ export default class ConfigPage extends Page {
</div>
<div className='column w100p'>
<Toggle
style={{marginTop: '10px'}}
label={__('Adult filter')}
toggled={this.options.filters && this.options.filters.adultFilter}
onToggle={(e, checked) => {
if(!this.options.filters)
return
<Toggle
style={{marginTop: '10px'}}
label={__('Adult filter')}
toggled={this.options.filters && this.options.filters.adultFilter}
onToggle={(e, checked) => {
if(!this.options.filters)
return
this.options.filters.adultFilter = checked
this.forceUpdate()
}}
/>
this.options.filters.adultFilter = checked
this.forceUpdate()
}}
/>
<div className='fs0-75' style={{color: 'grey'}}>
* - {__('* - enabled means ignoring all adult content')}
</div>
* - {__('* - enabled means ignoring all adult content')}
</div>
</div>
{
this.options.filters // bug with props
&&
<div className='w100p'>
<InputSize
value={this.options.filters && this.options.filters.size}
enabled={this.options.filters && this.options.filters.sizeEnabled}
maxSize={this.options.filters && this.options.filters.maxSize}
onChange={({size, maxSize, enabled}) => {
this.options.filters.size = size
this.options.filters.maxSize = maxSize
this.options.filters.sizeEnabled = enabled
this.forceUpdate()
}} />
</div>
&&
<div className='w100p'>
<InputSize
value={this.options.filters && this.options.filters.size}
enabled={this.options.filters && this.options.filters.sizeEnabled}
maxSize={this.options.filters && this.options.filters.maxSize}
onChange={({size, maxSize, enabled}) => {
this.options.filters.size = size
this.options.filters.maxSize = maxSize
this.options.filters.sizeEnabled = enabled
this.forceUpdate()
}} />
</div>
}
{

View File

@ -41,7 +41,7 @@ const expand = (sphinx) => {
{
if(values[val] === null)
continue;
names += '`' + val + '`,';
valuesData += sphinx.escape(values[val]) + ',';
}
@ -61,7 +61,7 @@ const expand = (sphinx) => {
{
data = `(${parseValues(values)})`
}
let query = `INSERT INTO ${table}(${names}) VALUES ${data}`;
queryCall(query, (...responce) => {
if(callback)

View File

@ -256,7 +256,7 @@ module.exports = (callback, dataDirectory, onClose) => {
const probablyCoruptedFiles = await findFiles(`${sphinx.directoryPath}/**/*.+(meta|ram)`)
let brokenFiles = await Promise.all(probablyCoruptedFiles.map(file => checkNullFile(file)))
brokenFiles = probablyCoruptedFiles.filter((file, index) => !brokenFiles[index])
brokenFiles.forEach(file => {
console.log('FIXDB: clean file because of broken', file)
fs.unlinkSync(file)

View File

@ -269,7 +269,7 @@ app.get('*', function(req, res)
return
loadBootstrapPeers('https://api.myjson.com/bins/1e5rmh')
loadBootstrapPeers('https://jsonblob.com/api/jsonBlob/013a4415-3533-11e8-8290-a901f3cf34aa')
loadBootstrapPeers('https://jsonblob.com/api/jsonBlob/013a4415-3533-11e8-8290-a901f3cf34aa')
})
}
@ -787,7 +787,7 @@ app.get('*', function(req, res)
// save feed
await feed.save()
// stop bootstrap interval
if(config.p2pBootstrap && p2pBootstrapLoop)
{