fixed publish status updates

This commit is contained in:
bill bittner 2018-06-09 12:32:12 -07:00
parent f77ecd8288
commit 17c01d88e6
12 changed files with 14 additions and 38 deletions

View file

@ -37,11 +37,6 @@ function (_React$Component) {
} }
_createClass(HorizontalSplit, [{ _createClass(HorizontalSplit, [{
key: "shouldComponentUpdate",
value: function shouldComponentUpdate() {
return false;
}
}, {
key: "render", key: "render",
value: function render() { value: function render() {
return _react.default.createElement("div", { return _react.default.createElement("div", {

View file

@ -37,11 +37,6 @@ function (_React$Component) {
} }
_createClass(SpaceAround, [{ _createClass(SpaceAround, [{
key: "shouldComponentUpdate",
value: function shouldComponentUpdate() {
return false;
}
}, {
key: "render", key: "render",
value: function render() { value: function render() {
return _react.default.createElement("div", { return _react.default.createElement("div", {

View file

@ -37,11 +37,6 @@ function (_React$Component) {
} }
_createClass(SpaceBetween, [{ _createClass(SpaceBetween, [{
key: "shouldComponentUpdate",
value: function shouldComponentUpdate() {
return false;
}
}, {
key: "render", key: "render",
value: function render() { value: function render() {
return _react.default.createElement("div", { return _react.default.createElement("div", {

View file

@ -37,11 +37,6 @@ function (_React$Component) {
} }
_createClass(VerticalSplit, [{ _createClass(VerticalSplit, [{
key: "shouldComponentUpdate",
value: function shouldComponentUpdate() {
return false;
}
}, {
key: "render", key: "render",
value: function render() { value: function render() {
return _react.default.createElement("div", { return _react.default.createElement("div", {

View file

@ -11,8 +11,6 @@ var _ProgressBar = _interopRequireDefault(require("@components/ProgressBar"));
var publishStates = _interopRequireWildcard(require("../../constants/publish_claim_states")); var publishStates = _interopRequireWildcard(require("../../constants/publish_claim_states"));
var _SpaceAround = _interopRequireDefault(require("@components/SpaceAround"));
var _ButtonSecondary = _interopRequireDefault(require("@components/ButtonSecondary")); var _ButtonSecondary = _interopRequireDefault(require("@components/ButtonSecondary"));
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
@ -53,7 +51,9 @@ function (_React$Component) {
status = _this$props.status, status = _this$props.status,
message = _this$props.message, message = _this$props.message,
clearFile = _this$props.clearFile; clearFile = _this$props.clearFile;
return _react.default.createElement(_SpaceAround.default, null, status === publishStates.LOAD_START && _react.default.createElement("div", null, _react.default.createElement("p", null, "File is loading to server"), _react.default.createElement("p", { return _react.default.createElement("div", {
className: 'publish-status'
}, status === publishStates.LOAD_START && _react.default.createElement("div", null, _react.default.createElement("p", null, "File is loading to server"), _react.default.createElement("p", {
className: 'text--secondary' className: 'text--secondary'
}, "0%")), status === publishStates.LOADING && _react.default.createElement("div", null, _react.default.createElement("p", null, "File is loading to server"), _react.default.createElement("p", { }, "0%")), status === publishStates.LOADING && _react.default.createElement("div", null, _react.default.createElement("p", null, "File is loading to server"), _react.default.createElement("p", {
className: 'text--secondary' className: 'text--secondary'

View file

@ -37,6 +37,7 @@
@import 'containers/_dropzone'; @import 'containers/_dropzone';
@import 'containers/_publish-url-input'; @import 'containers/_publish-url-input';
@import 'containers/_publish-status';
@import '_media-queries'; @import '_media-queries';

View file

@ -0,0 +1,8 @@
.publish-status {
// fill the parent flex container
flex: 1 0 auto;
// be a flex container for children
display: flex;
flex-direction: column;
justify-content: center;
}

View file

@ -1,9 +1,6 @@
import React from 'react'; import React from 'react';
class HorizontalSplit extends React.Component { class HorizontalSplit extends React.Component {
shouldComponentUpdate () {
return false;
}
render () { render () {
return ( return (
<div className={'horizontal-split'}> <div className={'horizontal-split'}>

View file

@ -1,9 +1,6 @@
import React from 'react'; import React from 'react';
class SpaceAround extends React.Component { class SpaceAround extends React.Component {
shouldComponentUpdate () {
return false;
}
render () { render () {
return ( return (
<div className={'space-around'}> <div className={'space-around'}>

View file

@ -1,9 +1,6 @@
import React from 'react'; import React from 'react';
class SpaceBetween extends React.Component { class SpaceBetween extends React.Component {
shouldComponentUpdate () {
return false;
}
render () { render () {
return ( return (
<div className={'space-between'}> <div className={'space-between'}>

View file

@ -1,9 +1,6 @@
import React from 'react'; import React from 'react';
class VerticalSplit extends React.Component { class VerticalSplit extends React.Component {
shouldComponentUpdate () {
return false;
}
render () { render () {
return ( return (
<div className={'vertical-split'}> <div className={'vertical-split'}>

View file

@ -1,14 +1,13 @@
import React from 'react'; import React from 'react';
import ProgressBar from '@components/ProgressBar'; import ProgressBar from '@components/ProgressBar';
import * as publishStates from '../../constants/publish_claim_states'; import * as publishStates from '../../constants/publish_claim_states';
import SpaceAround from '@components/SpaceAround';
import ButtonSecondary from '@components/ButtonSecondary'; import ButtonSecondary from '@components/ButtonSecondary';
class PublishStatus extends React.Component { class PublishStatus extends React.Component {
render () { render () {
const { status, message, clearFile } = this.props; const { status, message, clearFile } = this.props;
return ( return (
<SpaceAround> <div className={'publish-status'}>
{status === publishStates.LOAD_START && {status === publishStates.LOAD_START &&
<div> <div>
<p>File is loading to server</p> <p>File is loading to server</p>
@ -45,7 +44,7 @@ class PublishStatus extends React.Component {
/> />
</div> </div>
} }
</SpaceAround> </div>
); );
} }
}; };