Layout changes
This commit is contained in:
@@ -363,7 +363,7 @@ class Configuration extends IPCContainer {
|
||||
this.props.DisplayConfiguration) + ' Configuration '}
|
||||
</h1>
|
||||
<div style={{overflowY: 'auto', height: '90%'}}>
|
||||
{this.props.MState.Mounted ? <Button
|
||||
{this.props.MState.Mounted && (configurationItems.length > 0) ? <Button
|
||||
buttonStyles={{width: 'auto', height: 'auto', marginLeft: 'auto', marginRight: '4px'}}
|
||||
clicked={() => {
|
||||
this.props.displayPinnedManager(true);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
}
|
||||
|
||||
.PinnedManagerItems {
|
||||
height: 70%;
|
||||
padding: var(--default_spacing);
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
|
||||
@@ -108,7 +108,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class extends IPCCon
|
||||
);
|
||||
}
|
||||
|
||||
createFile = (name, pinned, idx, total, item_idx) => {
|
||||
createFile = (name, path, pinned, idx, total, item_idx) => {
|
||||
const style = {textAlign: 'left'}
|
||||
if (item_idx + 1 !== total) {
|
||||
style.marginBottom = '2px';
|
||||
@@ -118,7 +118,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class extends IPCCon
|
||||
<CheckBox checked={pinned}
|
||||
changed={() => {
|
||||
const items = JSON.parse(JSON.stringify(this.state.items));
|
||||
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
|
||||
}, () => {
|
||||
@@ -127,8 +127,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(class extends IPCCon
|
||||
Remote: this.props.DisplayRemoteConfiguration,
|
||||
S3: this.props.DisplayS3Configuration,
|
||||
Version: this.props.version,
|
||||
Path: items[item_idx].path,
|
||||
Pinned: items[item_idx].meta.pinned,
|
||||
Path: path,
|
||||
Pinned: pinned,
|
||||
});
|
||||
});
|
||||
}}
|
||||
@@ -159,13 +159,14 @@ export default connect(mapStateToProps, mapDispatchToProps)(class extends IPCCon
|
||||
style={{cursor: 'pointer'}}>X</a>
|
||||
</div>
|
||||
<h1 style={{width: '100%', textAlign: 'center'}}>{'Pinned File Manager'}</h1>
|
||||
<div className={'PinnedManagerActiveDirectory'}><b>{this.state.active_directory}</b></div>
|
||||
<div className={'PinnedManagerActiveDirectory'}><b> {this.state.active_directory}</b>
|
||||
</div>
|
||||
<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.createFile(i.name, i.meta.pinned, idx++, this.state.items.length, k);
|
||||
this.createFile(i.name, i.path, i.meta.pinned, idx++, this.state.items.length, k);
|
||||
})
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user