Update prettier/eslint
This commit is contained in:
@@ -24,8 +24,7 @@ const mapStateToProps = (state) => {
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
displayPinnedManager: (display) => dispatch(displayPinnedManager(display)),
|
||||
notifyApplicationBusy: (busy) =>
|
||||
dispatch(notifyApplicationBusy(busy, true)),
|
||||
notifyApplicationBusy: (busy) => dispatch(notifyApplicationBusy(busy, true)),
|
||||
notifyError: (msg, cb) => dispatch(notifyError(msg, false, cb)),
|
||||
notifyInfo: (title, msg) => dispatch(notifyInfo(title, msg)),
|
||||
};
|
||||
@@ -68,15 +67,11 @@ export default connect(
|
||||
if (data.Success) {
|
||||
const items = data.Items.filter(
|
||||
(i) =>
|
||||
i.path !== '.' &&
|
||||
(this.state.active_directory !== '/' || i.path.substr(0, 1) !== '.')
|
||||
i.path !== '.' && (this.state.active_directory !== '/' || i.path.substr(0, 1) !== '.')
|
||||
).map((i) => {
|
||||
return {
|
||||
...i,
|
||||
name:
|
||||
i.path === '..'
|
||||
? i.path
|
||||
: i.path.substr(i.path.lastIndexOf('/') + 1),
|
||||
name: i.path === '..' ? i.path : i.path.substr(i.path.lastIndexOf('/') + 1),
|
||||
meta: {
|
||||
...i.meta,
|
||||
pinned: i.meta.pinned === '1',
|
||||
@@ -143,8 +138,7 @@ export default connect(
|
||||
checked={pinned}
|
||||
changed={() => {
|
||||
const items = JSON.parse(JSON.stringify(this.state.items));
|
||||
const pinned = (items[item_idx].meta.pinned = !items[item_idx]
|
||||
.meta.pinned);
|
||||
const pinned = (items[item_idx].meta.pinned = !items[item_idx].meta.pinned);
|
||||
this.setState(
|
||||
{
|
||||
items,
|
||||
@@ -187,9 +181,7 @@ export default connect(
|
||||
X
|
||||
</a>
|
||||
</div>
|
||||
<h1 style={{ width: '100%', textAlign: 'center' }}>
|
||||
{'Pinned File Manager'}
|
||||
</h1>
|
||||
<h1 style={{ width: '100%', textAlign: 'center' }}>{'Pinned File Manager'}</h1>
|
||||
<div className={'PinnedManagerActiveDirectory'}>
|
||||
<b> {this.state.active_directory}</b>
|
||||
</div>
|
||||
@@ -198,13 +190,7 @@ export default connect(
|
||||
<div className={'PinnedManagerItems'}>
|
||||
{this.state.items.map((i, k) => {
|
||||
return i.directory
|
||||
? this.createDirectory(
|
||||
i.name,
|
||||
i.path,
|
||||
idx++,
|
||||
this.state.items.length,
|
||||
k
|
||||
)
|
||||
? this.createDirectory(i.name, i.path, idx++, this.state.items.length, k)
|
||||
: this.createFile(
|
||||
i.name,
|
||||
i.path,
|
||||
|
||||
Reference in New Issue
Block a user