1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-14 15:35:35 +00:00

Merge pull request #5149 from haiwen/tagged-files-improvement

[tags] 'Tagged Files' dialog: improvement
This commit is contained in:
Daniel Pan 2022-03-07 12:26:42 +08:00 committed by GitHub
commit 2ee5b7ca54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,16 +70,16 @@ class ListTaggedFilesDialog extends React.Component {
render() { render() {
let taggedFileList = this.state.taggedFileList; let taggedFileList = this.state.taggedFileList;
return ( return (
<Modal isOpen={true}> <Modal isOpen={true} style={{maxWidth: '678px'}}>
<ModalHeader toggle={this.props.onClose}>{gettext('Tagged Files')}</ModalHeader> <ModalHeader toggle={this.props.onClose}>{gettext('Tagged Files')}</ModalHeader>
<ModalBody className="dialog-list-container"> <ModalBody className="dialog-list-container">
<table> <table>
<thead> <thead>
<tr> <tr>
<th width='45%' className="ellipsis">{gettext('Name')}</th> <th width='50%' className="ellipsis">{gettext('Name')}</th>
<th width='27%'>{gettext('Size')}</th> <th width='20%'>{gettext('Size')}</th>
<th width='18%'>{gettext('Last Update')}</th> <th width='22%'>{gettext('Last Update')}</th>
<th width='10%'></th> <th width='8%'></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -154,7 +154,7 @@ class TaggedFile extends React.Component {
</tr> </tr>
: :
<tr onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave} onFocus={this.onMouseEnter}> <tr onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave} onFocus={this.onMouseEnter}>
<td className="name"><a href={href} target='_blank'>{taggedFile.filename}</a></td> <td><a href={href} target='_blank' className="d-inline-block w-100 ellipsis" title={taggedFile.filename}>{taggedFile.filename}</a></td>
<td>{Utils.bytesToSize(taggedFile.size)}</td> <td>{Utils.bytesToSize(taggedFile.size)}</td>
<td>{moment.unix(taggedFile.mtime).fromNow()}</td> <td>{moment.unix(taggedFile.mtime).fromNow()}</td>
<td><a href="#" role="button" aria-label={gettext('Delete')} title={gettext('Delete')} className={className} onClick={this.deleteFile}></a></td> <td><a href="#" role="button" aria-label={gettext('Delete')} title={gettext('Delete')} className={className} onClick={this.deleteFile}></a></td>