mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
fix commands and stylign
This commit is contained in:
@@ -58,14 +58,15 @@ class App extends React.Component<IProps, IState> {
|
||||
}}
|
||||
downFunc={() => {
|
||||
this.setState({ miniDownloadsOpen: !this.state.miniDownloadsOpen })
|
||||
console.log(this.state.miniDownloadsOpen)
|
||||
}}
|
||||
/>
|
||||
|
||||
{
|
||||
// Mini downloads section
|
||||
this.state.miniDownloadsOpen ?
|
||||
<MiniDialog>
|
||||
<MiniDialog closeFn={() => {
|
||||
this.setState({ miniDownloadsOpen: false })
|
||||
}}>
|
||||
<DownloadList downloadManager={downloadHandler} />
|
||||
</MiniDialog> : null
|
||||
}
|
||||
|
||||
@@ -16,3 +16,19 @@
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.MiniDialogTop {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.MiniDialogTop img {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.MiniDialogTop:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import React from 'react'
|
||||
|
||||
import Close from '../../resources/icons/close.svg'
|
||||
import './MiniDialog.css'
|
||||
|
||||
interface IProps {
|
||||
children: React.ReactNode[] | React.ReactNode;
|
||||
closeFn: () => void;
|
||||
}
|
||||
|
||||
export default class MiniDialog extends React.Component<IProps, never> {
|
||||
@@ -14,7 +16,13 @@ export default class MiniDialog extends React.Component<IProps, never> {
|
||||
render() {
|
||||
return (
|
||||
<div className="MiniDialog">
|
||||
{this.props.children}
|
||||
<div className="MiniDialogTop" onClick={this.props.closeFn}>
|
||||
<div></div>
|
||||
<img src={Close} className="MiniDialogClose" />
|
||||
</div>
|
||||
<div className="MiniDialogInner">
|
||||
{this.props.children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
height: 20px;
|
||||
width: 80%;
|
||||
background-color: #fff;
|
||||
color: #fff;
|
||||
color: #c5c5c5;
|
||||
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
@@ -23,5 +23,5 @@
|
||||
}
|
||||
|
||||
.ProgressText {
|
||||
color: #fff;
|
||||
color: #c5c5c5;
|
||||
}
|
||||
@@ -42,9 +42,8 @@ export default class DownloadHandler {
|
||||
}
|
||||
|
||||
addDownload(url: string, path: string) {
|
||||
// Begin download from rust backend
|
||||
// Begin download from rust backend, don't add if the download addition fails
|
||||
invoke('download_file', { url, path })
|
||||
|
||||
const obj = {
|
||||
path,
|
||||
progress: 0,
|
||||
|
||||
Reference in New Issue
Block a user