Skip to content

Commit

Permalink
[DDW-269] Remove typos and console log
Browse files Browse the repository at this point in the history
  • Loading branch information
thedanheller committed Sep 24, 2020
1 parent 2d1f9ad commit 69038d1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
6 changes: 3 additions & 3 deletions source/renderer/app/components/appUpdate/AppUpdateOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ type Props = {
onInstallUpdate: Function,
onExternalLinkClick: Function,
onPostponeUpdate: Function,
instalationProgress: number,
installationProgress: number,
isLinux: boolean,
};

Expand Down Expand Up @@ -187,7 +187,7 @@ export default class AppUpdateOverlay extends Component<Props, State> {
onPostponeUpdate,
isWaitingToQuitDaedalus,
isLinux,
instalationProgress,
installationProgress,
} = this.props;
const { areTermsOfUseAccepted } = this.state;
const isCheckboxDisabled = isWaitingToQuitDaedalus;
Expand Down Expand Up @@ -257,7 +257,7 @@ export default class AppUpdateOverlay extends Component<Props, State> {
{intl.formatMessage(messages.installingUpdateLabel)}
</p>
</div>
<ProgressBarLarge progress={instalationProgress} />
<ProgressBarLarge progress={installationProgress} />
</>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class AppUpdateContainer extends Component<InjectedProps> {
availableUpdateVersion,
isAutomaticUpdateFailed,
isWaitingToQuitDaedalus,
instalationProgress,
installationProgress,
} = appUpdate;
const {
installUpdate,
Expand All @@ -50,7 +50,7 @@ export default class AppUpdateContainer extends Component<InjectedProps> {
onExternalLinkClick={openExternalLink}
onPostponeUpdate={postponeUpdate.trigger}
isWaitingToQuitDaedalus={isWaitingToQuitDaedalus}
instalationProgress={instalationProgress}
installationProgress={installationProgress}
isLinux={isLinux}
/>
);
Expand Down
17 changes: 3 additions & 14 deletions source/renderer/app/stores/AppUpdateStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ export default class AppUpdateStore extends Store {
@observable availableUpdateVersion: string = '';
@observable isUpdateDownloading: boolean = false;
@observable isUpdateDownloaded: boolean = false;
@observable isUpdateInstalled: boolean = false;
@observable isUpdateProgressOpen: boolean = false;
@observable isAutomaticUpdateFailed: boolean = false;
@observable isUpdatePostponed: boolean = false;
@observable isWaitingToQuitDaedalus: boolean = false;
@observable instalationProgress: number = 0;
@observable instalationMessages: Array<any> = [];
@observable installationProgress: number = 0;

@observable downloadInfo: ?DownloadInfo = null;
@observable downloadData: ?DownloadData = null;
Expand Down Expand Up @@ -351,7 +349,7 @@ export default class AppUpdateStore extends Store {
status,
data,
}: ManageAppUpdateMainResponse) => {
const { message, progress, code, info, error } = data;
const { message, progress, error } = data;
if (status === statuses.ERROR) {
logger.error(message || '', { error });
runInAction(() => {
Expand All @@ -361,18 +359,9 @@ export default class AppUpdateStore extends Store {
} else if (status === statuses.PROGRESS) {
if (progress) {
runInAction(() => {
this.instalationProgress = progress;
this.installationProgress = progress;
});
}
// eslint-disable-next-line
console.log('--- INSTALLATION ', {
status,
message,
progress,
code,
info,
error,
});
}
return Promise.resolve({ filePath: '', hash: '' });
};
Expand Down
6 changes: 3 additions & 3 deletions storybook/stories/news/AppUpdateOverlay.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ storiesOf('News|Overlays', module)
let isAutomaticUpdateFailed = false;
let isLinux = false;
let isWaitingToQuitDaedalus = false;
let instalationProgress = 0;
let installationProgress = 0;

if (scenario === 'downloading') {
isUpdateDownloaded = false;
Expand All @@ -36,7 +36,7 @@ storiesOf('News|Overlays', module)
isLinux = boolean('isLinux', false);
isWaitingToQuitDaedalus = boolean('isWaitingToQuitDaedalus', false);
if (isLinux && isWaitingToQuitDaedalus)
instalationProgress = number('instalationProgress', 30, {
installationProgress = number('installationProgress', 30, {
range: true,
min: 0,
max: 100,
Expand Down Expand Up @@ -81,7 +81,7 @@ storiesOf('News|Overlays', module)
onExternalLinkClick={action('onExternalLinkClick')}
isWaitingToQuitDaedalus={isWaitingToQuitDaedalus}
isLinux={isLinux}
instalationProgress={instalationProgress}
installationProgress={installationProgress}
/>
);
});

0 comments on commit 69038d1

Please sign in to comment.