Webui: added links on file names

Browsers can play partial files with built-in player, or save files to disk.
This commit is contained in:
hunbernd 2015-11-06 22:51:52 +01:00
parent ce40760791
commit 88e1dc006b
4 changed files with 10 additions and 2 deletions

View File

@ -66,6 +66,10 @@ td{
background-color: midnightblue; background-color: midnightblue;
} }
.filelink{
color: inherit;
}
input, textarea{ input, textarea{
color: lime; color: lime;
font-family: monospace; font-family: monospace;

View File

@ -571,7 +571,7 @@ var DownloadsWidget = React.createClass({
ctrlBtn = <div className="btn" onClick={pauseFn}>pause</div>; ctrlBtn = <div className="btn" onClick={pauseFn}>pause</div>;
} }
return(<tr> return(<tr>
<td>{this.props.data.name}</td> <td><a className="filelink" target="_blank" href={filestreamer_url + this.props.data.hash + "/" + encodeURIComponent(this.props.data.name)}>{this.props.data.name}</a></td>
<td>{makeFriendlyUnit(this.props.data.size)}</td> <td>{makeFriendlyUnit(this.props.data.size)}</td>
<td><ProgressBar progress={this.props.data.transfered / this.props.data.size}/></td> <td><ProgressBar progress={this.props.data.transfered / this.props.data.size}/></td>
<td>{makeFriendlyUnit(this.props.data.transfer_rate*1e3)}/s</td> <td>{makeFriendlyUnit(this.props.data.transfer_rate*1e3)}/s</td>

View File

@ -66,6 +66,10 @@ td{
background-color: midnightblue; background-color: midnightblue;
} }
.filelink{
color: inherit;
}
input, textarea{ input, textarea{
color: lime; color: lime;
font-family: monospace; font-family: monospace;

View File

@ -571,7 +571,7 @@ var DownloadsWidget = React.createClass({
ctrlBtn = <div className="btn" onClick={pauseFn}>pause</div>; ctrlBtn = <div className="btn" onClick={pauseFn}>pause</div>;
} }
return(<tr> return(<tr>
<td>{this.props.data.name}</td> <td><a className="filelink" target="_blank" href={filestreamer_url + this.props.data.hash + "/" + encodeURIComponent(this.props.data.name)}>{this.props.data.name}</a></td>
<td>{makeFriendlyUnit(this.props.data.size)}</td> <td>{makeFriendlyUnit(this.props.data.size)}</td>
<td><ProgressBar progress={this.props.data.transfered / this.props.data.size}/></td> <td><ProgressBar progress={this.props.data.transfered / this.props.data.size}/></td>
<td>{makeFriendlyUnit(this.props.data.transfer_rate*1e3)}/s</td> <td>{makeFriendlyUnit(this.props.data.transfer_rate*1e3)}/s</td>