Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 7, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 17 additions & 25 deletions app/windows/Settings/Components/RepositoryPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@ import { runGarbageCollector } from '../../../api'

@observer
class RepositoryPanel extends React.Component {
/** Perform garbage collector and reload the view when done */
_handleButtonGarbageCollectorClick (event) {
/** Perform garbage collection and refetch the data when done */
_handleButtonGarbageCollectorClick = (event) => {
event.preventDefault()
runGarbageCollector()
.then(this.props.informationStore.loadData)
.then(this.forceUpdate)
}

_handelOnSubit (event) {

.then(() => this.props.informationStore.loadData())
Copy link
Member

@koalalorenzo koalalorenzo Jun 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this line is correct? why not:

.then(this.props.informationStore.loadData)

}

render () {
Expand All @@ -32,23 +28,19 @@ class RepositoryPanel extends React.Component {

return (
<Pane className="settings">
<form onSubmit={this._handelOnSubit.bind(this)}>

<Input
label="Repository Size:"
type="text"
value={repoSize}
placeholder="Hey girl..." readOnly
/>

<Button
onClick={this._handleButtonGarbageCollectorClick.bind(this)}
ptSize="large"
glyph="trash"
text="Run Garbage Collector"
/>

</form>
<Input
label="Repository Size:"
type="text"
value={repoSize}
placeholder="Hey girl..." readOnly
/>

<Button
onClick={this._handleButtonGarbageCollectorClick}
ptSize="large"
glyph="trash"
text="Run Garbage Collector"
/>
</Pane>
)
}
Expand Down