mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 15:44:35 +01:00
improve downloads section again
This commit is contained in:
@@ -35,7 +35,7 @@ async function TESTDOWNLOAD() {
|
|||||||
download(
|
download(
|
||||||
'https://github.com/Grasscutters/Grasscutter/archive/refs/heads/stable.zip',
|
'https://github.com/Grasscutters/Grasscutter/archive/refs/heads/stable.zip',
|
||||||
'grasscutter.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)
|
super(props)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getFilenameFromPath() {
|
||||||
|
return this.props.downloadName.split('/').pop()
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="DownloadSection">
|
<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">
|
<div className="DownloadSectionInner">
|
||||||
<ProgressBar path={this.props.downloadName} downloadManager={this.props.downloadManager} />
|
<ProgressBar path={this.props.downloadName} downloadManager={this.props.downloadManager} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user