Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/nkg447/rc-file-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
nkg447 committed Nov 18, 2019
2 parents e213a9a + da8b490 commit 6e07977
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/components/addressBar/AddressBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import styles from './AddressBar.css';
export default props => {
const { address, changeAddress } = props;
const [path, setPath] = React.useState(address);
if (path !== address) {
const [oldPath, setOldPath] = React.useState(address);
if (oldPath !== address) {
setPath(address);
setOldPath(address);
}
return (
<div className={styles.container}>
Expand Down
8 changes: 7 additions & 1 deletion app/components/fileItem/FileItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ export default createSelectable(props => {
isSelecting,
selectableRef,
selected,
isToCut,
...otherProps
} = props;

const isDirectory = file.isDirectory();
const iconStyle = {
fontSize: fileIconSize,
Expand All @@ -74,7 +76,11 @@ export default createSelectable(props => {
icon={isDirectory ? faFolder : addressToIcon(file.name)}
style={iconStyle}
color={
selected || isSelecting ? Colors.selectedFileIcon : Colors.fileIcon
selected || isSelecting
? Colors.selectedFileIcon
: isToCut
? Colors.onCutFileIcon
: Colors.fileIcon
}
/>
);
Expand Down
3 changes: 3 additions & 0 deletions app/containers/contentBody/ContentBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ export default class ContentBody extends Component {
}}
fileIconSize={fileIconSize}
selected={this.state.selectedFiles.includes(file)}
isToCut={this.props.filesToCut.includes(
path.join(address, file.name)
)}
></FileItem>
))}
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/theme/Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export default {
fileIcon: '#6cccfc',
selectedFileIcon: '#74b1be',
sidebarBackground: '#2c2e3b',
sidebar: '#74b1be'
sidebar: '#74b1be',
onCutFileIcon: '#b7e6fe'
};

0 comments on commit 6e07977

Please sign in to comment.