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, [{
key: "shouldComponentUpdate",
value: function shouldComponentUpdate() {
return false;
}
}, {
key: "render",
value: function render() {
return _react.default.createElement("div", {

View file

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

View file

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

View file

@ -37,11 +37,6 @@ function (_React$Component) {
}
_createClass(VerticalSplit, [{
key: "shouldComponentUpdate",
value: function shouldComponentUpdate() {
return false;
}
}, {
key: "render",
value: function render() {
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 _SpaceAround = _interopRequireDefault(require("@components/SpaceAround"));
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; } }
@ -53,7 +51,9 @@ function (_React$Component) {
status = _this$props.status,
message = _this$props.message,
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'
}, "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'

View file

@ -37,6 +37,7 @@
@import 'containers/_dropzone';
@import 'containers/_publish-url-input';
@import 'containers/_publish-status';
@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';
class HorizontalSplit extends React.Component {
shouldComponentUpdate () {
return false;
}
render () {
return (
<div className={'horizontal-split'}>

View file

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

View file

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

View file

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

View file

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