Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: display file info and preview #84

Open
lexoyo opened this issue Oct 26, 2018 · 2 comments
Open

Feature request: display file info and preview #84

lexoyo opened this issue Oct 26, 2018 · 2 comments

Comments

@lexoyo
Copy link
Member

lexoyo commented Oct 26, 2018

When a file (or even a folder?) is selected, it should be possible to display details about the file, such as weight, dates and type... And most important a preview.

Probably something like gdrive "file details":

screenshot from 2018-10-26 15-37-23

@jotakar
Copy link
Contributor

jotakar commented Oct 31, 2018

The file details like size and date are easy, it's necesay to modify render in FileListItem.jsx , sometinkg like
render () { const {file} = this.props; const modDate = (file.isService || !file.modified) ? "" : file.modified.replace(/^([^T]*)T([^\.]*)\..*/, '$1 $2'); const isService = UnifileService.isService(file); this.allowDownload = !file.upload && this.props.path.length > 0 && !file.isDir && !isService; this.allowDelete = !file.upload && this.props.path.length > 0 && !isService; this.allowRename = !file.upload && this.props.path.length > 0 && !isService; const mime = file.mime ? file.mime.replace(/\//g, ' ') : ''; const className = this.constructor.getClassName(file, isService, mime); const filesDetails = 'filesDetails'; return ( <section className={file-list-item${file.upload ? uploading progress-${file.upload.progress} : ''} }> <div className={className}> </div> <div className={filesDetails}>{file.name}</div> <div className={filesDetails}>{file.isDir?' ':file.size}</div> <div className={filesDetails}>{modDate}</div>

Adding modDate for date of lst modification
Needed a new class fileDetails to put data in columns
/*Files details*/ #cloud-explorer .files .file-list-item div{ width:100%; } #cloud-explorer .files li:hover{ background-color: #676767 } #cloud-explorer .files .file-list-item div:nth-child(1), div:nth-child(2){ width: auto; text-align:left;} #cloud-explorer .files .file-list-item div:nth-child(3), div:nth-child(4){ text-align : right; } #cloud-explorer .files .file-list-item ul{ width: 100%; margin-left: 20px; text-align:right; }
The image details.... a modal window (like my request for ftp login) but with image inside... perhaps.

@lexoyo
Copy link
Member Author

lexoyo commented May 12, 2019

Hey @jotakar
I did not see this comment before sorry
You should make a PR with that
We probably want to use this for file preview (should be optional because it is complicated to install)
https://www.npmjs.com/package/filepreview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants