mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 15:14:35 +01:00
improve downloads section again
This commit is contained in:
@@ -35,7 +35,7 @@ async function TESTDOWNLOAD() {
|
||||
download(
|
||||
'https://github.com/Grasscutters/Grasscutter/archive/refs/heads/stable.zip',
|
||||
'grasscutter.zip',
|
||||
'S:/Cultivation'
|
||||
'C:\\Users\\spike\\Documents\\dev\\Cultivation'
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
.DownloadSection span {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.DownloadSection {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -14,10 +14,14 @@ export default class MiniDialog extends React.Component<IProps, never> {
|
||||
super(props)
|
||||
}
|
||||
|
||||
getFilenameFromPath() {
|
||||
return this.props.downloadName.split('/').pop()
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="DownloadSection">
|
||||
<span>{this.props.downloadName} - {this.props.downloadManager.getDownloadSize(this.props.downloadName)}</span>
|
||||
<span>{this.getFilenameFromPath()} - {this.props.downloadManager.getDownloadSize(this.props.downloadName)}</span>
|
||||
<div className="DownloadSectionInner">
|
||||
<ProgressBar path={this.props.downloadName} downloadManager={this.props.downloadManager} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user