From cdf567e8ee3b089fc79155e5cd4af063cfa7bc01 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Mon, 26 Feb 2018 16:34:02 -0800 Subject: [PATCH 1/2] fixed publish form because it was not reset on success --- react/components/PublishStatus/index.jsx | 24 ++++++++++++------------ react/containers/PublishForm/view.jsx | 5 +---- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/react/components/PublishStatus/index.jsx b/react/components/PublishStatus/index.jsx index e20de9d6..669be0cb 100644 --- a/react/components/PublishStatus/index.jsx +++ b/react/components/PublishStatus/index.jsx @@ -5,39 +5,39 @@ import * as publishStates from 'constants/publish_claim_states'; function PublishStatus ({ status, message }) { return ( -
+
{(status === publishStates.LOAD_START) && -
+

File is loading to server

-

{message}

+

{message}

} {(status === publishStates.LOADING) &&
-
+

File is loading to server

-

{message}

+

{message}

} {(status === publishStates.PUBLISHING) && -
+

Upload complete. Your file is now being published on the blockchain...

- -

Curious what magic is happening here? Learn more.

+ +

Curious what magic is happening here? Learn more.

} {(status === publishStates.SUCCESS) && -
+

Your publish is complete! You are being redirected to it now.

-

If you are not automatically redirected, click here.

+

If you are not automatically redirected, click here.

} {(status === publishStates.FAILED) && -
+

Something went wrong...

{message}

-

For help, post the above error text in the #speech channel on the lbry discord

+

For help, post the above error text in the #speech channel on the lbry discord

}
diff --git a/react/containers/PublishForm/view.jsx b/react/containers/PublishForm/view.jsx index 45cf367d..96bcc152 100644 --- a/react/containers/PublishForm/view.jsx +++ b/react/containers/PublishForm/view.jsx @@ -72,7 +72,7 @@ class PublishForm extends React.Component { console.log('publish response:', response); if ((xhr.status === 200) && response.success) { this.props.history.push(`/${response.data.claimId}/${response.data.name}`); - this.props.onPublishStatusChange(publishStates.SUCCESS, response.data.url); + this.props.onFileClear(); } else { this.props.onPublishStatusChange(publishStates.FAILED, response.message); } @@ -119,9 +119,6 @@ class PublishForm extends React.Component { // publish the claim return this.makePublishRequest(this.props.file, metadata); }) - .then(() => { - this.props.onPublishStatusChange('publish request made'); - }) .catch((error) => { this.props.onPublishSubmitError(error.message); }); From fa750c6f472ab4d135144fb44c44c1733c0f606b Mon Sep 17 00:00:00 2001 From: bill bittner Date: Mon, 26 Feb 2018 17:00:54 -0800 Subject: [PATCH 2/2] fixed css width issue on details page --- public/assets/css/general.css | 14 +++++++------- react/components/ShowAssetDetails/view.jsx | 2 +- react/components/ShowAssetLite/view.jsx | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/assets/css/general.css b/public/assets/css/general.css index 7b4f2af4..fcf621d7 100644 --- a/public/assets/css/general.css +++ b/public/assets/css/general.css @@ -542,10 +542,6 @@ table { /* show */ -.asset { - max-width: 100%; -} - #video { cursor: pointer; background-color: #ffffff; @@ -556,15 +552,19 @@ table { } /* show lite */ -#show-lite-container { +.show-lite-container { text-align: center; } -#show-lite-container #asset-display-component { +.show-lite-container #asset-display-component { max-height: calc(100vh - 3em); } -#show-lite-container #asset-display-component .asset { +.show-details-container #asset-display-component .asset { + width: 100% +} + +.show-lite-container #asset-display-component .asset { max-height: calc(100vh - 3em); max-width: 100vw; } diff --git a/react/components/ShowAssetDetails/view.jsx b/react/components/ShowAssetDetails/view.jsx index 25f8a4e2..991f1243 100644 --- a/react/components/ShowAssetDetails/view.jsx +++ b/react/components/ShowAssetDetails/view.jsx @@ -20,7 +20,7 @@ class ShowAssetDetails extends React.Component {
-
+
diff --git a/react/components/ShowAssetLite/view.jsx b/react/components/ShowAssetLite/view.jsx index f8049c97..8241a31b 100644 --- a/react/components/ShowAssetLite/view.jsx +++ b/react/components/ShowAssetLite/view.jsx @@ -9,7 +9,7 @@ class ShowLite extends React.Component { if (asset) { const { name, claimId } = asset.claimData; return ( -
+
hosted