Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 3997850

Browse files
committed
Disable/enable summary clear correctly
1 parent e64e49f commit 3997850

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

src/botPage/view/TradeInfoPanel/ClearButton.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default class ClearButton extends React.PureComponent {
1111
componentDidMount() {
1212
globalObserver.register('summary.enable_clear', () => this.setState({ isButtonDisabled: false }));
1313
globalObserver.register('summary.disable_clear', () => this.setState({ isButtonDisabled: true }));
14+
globalObserver.register('bot.running', () => this.setState({ isButtonDisabled: true }));
1415
}
1516
// eslint-disable-next-line class-methods-use-this
1617
confirmClearLog() {

src/botPage/view/TradeInfoPanel/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class AnimateTrade extends Component {
6767
indicatorMessage: this.indicatorMessages.starting,
6868
stopMessage : this.indicatorMessages.stopped,
6969
});
70+
globalObserver.emit('summary.disable_clear');
7071
globalObserver.register('contract.status', contractStatus => {
7172
this.animateStage(contractStatus);
7273
});

src/botPage/view/View.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,6 @@ export default class View {
534534
elStopButton.style.display = 'inline-block';
535535
});
536536

537-
globalObserver.emit('summary.disable_clear');
538537
showSummary();
539538
this.blockly.run(limitations);
540539
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy