From 0b08e1e7e6a07acd21af71fd27f4c4acfa34dbba Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Wed, 16 Oct 2019 15:16:26 +0200 Subject: Add trialStatusBar & polishing --- .../trialStatusBar/components/ProgressBar.js | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/features/trialStatusBar/components/ProgressBar.js (limited to 'src/features/trialStatusBar/components/ProgressBar.js') diff --git a/src/features/trialStatusBar/components/ProgressBar.js b/src/features/trialStatusBar/components/ProgressBar.js new file mode 100644 index 000000000..80d478d8c --- /dev/null +++ b/src/features/trialStatusBar/components/ProgressBar.js @@ -0,0 +1,46 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import { observer } from 'mobx-react'; +import injectSheet from 'react-jss'; + +const styles = theme => ({ + root: { + background: theme.trialStatusBar.progressBar.background, + width: '25%', + maxWidth: 200, + height: 8, + display: 'flex', + alignItems: 'center', + borderRadius: theme.borderRadius, + overflow: 'hidden', + }, + progress: { + background: theme.trialStatusBar.progressBar.progressIndicator, + width: ({ percent }) => `${percent}%`, + height: '100%', + }, +}); + +@injectSheet(styles) @observer +class ProgressBar extends Component { + static propTypes = { + classes: PropTypes.object.isRequired, + percent: PropTypes.number.isRequired, + }; + + render() { + const { + classes, + } = this.props; + + return ( +
+
+
+ ); + } +} + +export default ProgressBar; -- cgit v1.2.3-70-g09d2 From fad0c62765b697e2a973368ff4cca862f99e70c9 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Wed, 16 Oct 2019 15:29:19 +0200 Subject: fix linting issues --- src/features/planSelection/store.js | 15 --------------- src/features/trialStatusBar/components/ProgressBar.js | 1 - 2 files changed, 16 deletions(-) (limited to 'src/features/trialStatusBar/components/ProgressBar.js') diff --git a/src/features/planSelection/store.js b/src/features/planSelection/store.js index 0d4672722..8622d4e5a 100644 --- a/src/features/planSelection/store.js +++ b/src/features/planSelection/store.js @@ -3,18 +3,14 @@ import { observable, computed, } from 'mobx'; -import { remote } from 'electron'; import { planSelectionActions } from './actions'; import { FeatureStore } from '../utils/FeatureStore'; -// import { createReactions } from '../../stores/lib/Reaction'; import { createActionBindings } from '../utils/ActionBinding'; import { downgradeUserRequest } from './api'; const debug = require('debug')('Franz:feature:planSelection:store'); -const { BrowserWindow } = remote; - export default class PlanSelectionStore extends FeatureStore { @observable isFeatureEnabled = false; @@ -46,17 +42,6 @@ export default class PlanSelectionStore extends FeatureStore { [planSelectionActions.hideOverlay, this._hideOverlay], ])); - // REACTIONS - - // this._allReactions = createReactions([ - // this._setFeatureEnabledReaction, - // this._updateTodosConfig, - // this._firstLaunchReaction, - // this._routeCheckReaction, - // ]); - - // this._registerReactions(this._allReactions); - this.isFeatureActive = true; } diff --git a/src/features/trialStatusBar/components/ProgressBar.js b/src/features/trialStatusBar/components/ProgressBar.js index 80d478d8c..41b74d396 100644 --- a/src/features/trialStatusBar/components/ProgressBar.js +++ b/src/features/trialStatusBar/components/ProgressBar.js @@ -25,7 +25,6 @@ const styles = theme => ({ class ProgressBar extends Component { static propTypes = { classes: PropTypes.object.isRequired, - percent: PropTypes.number.isRequired, }; render() { -- cgit v1.2.3-70-g09d2