#48: Support pinning files to cache [partial]
This commit is contained in:
@@ -25,7 +25,7 @@ const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
displayPinnedManager: display => dispatch(displayPinnedManager(display)),
|
||||
notifyApplicationBusy: busy => dispatch(notifyApplicationBusy(busy, true)),
|
||||
notifyError: msg => dispatch(notifyError(msg)),
|
||||
notifyError: (msg, cb) => dispatch(notifyError(msg, false, cb)),
|
||||
notifyInfo: (title, msg) => dispatch(notifyInfo(title, msg)),
|
||||
}
|
||||
};
|
||||
@@ -63,7 +63,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class extends IPCCon
|
||||
.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',
|
||||
@@ -74,7 +74,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class extends IPCCon
|
||||
items,
|
||||
});
|
||||
} else {
|
||||
this.props.notifyError(data.Error, false, () => {
|
||||
this.props.notifyError(data.Error, () => {
|
||||
this.props.displayPinnedManager(false);
|
||||
});
|
||||
}
|
||||
@@ -159,7 +159,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class extends IPCCon
|
||||
style={{cursor: 'pointer'}}>X</a>
|
||||
</div>
|
||||
<h1 style={{width: '100%', textAlign: 'center'}}>{'Pinned File Manager'}</h1>
|
||||
<h2 className={'PinnedManagerActiveDirectory'}>{this.state.active_directory}</h2>
|
||||
<div className={'PinnedManagerActiveDirectory'}><b>{this.state.active_directory}</b></div>
|
||||
<div className={'PinnedManagerItems'}>
|
||||
{
|
||||
this.state.items.map((i, k) => {
|
||||
|
||||
Reference in New Issue
Block a user