From 3a57363b8acdfdafe60b71eb73e9edf6eec4ae29 Mon Sep 17 00:00:00 2001
From: 6ea86b96 <6ea86b96@gmail.com>
Date: Fri, 23 Jun 2017 23:17:07 +0700
Subject: [PATCH 1/2] Use array to build classes in video view
---
ui/js/component/video/view.jsx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/ui/js/component/video/view.jsx b/ui/js/component/video/view.jsx
index c0a1a4948..f7f9007ac 100644
--- a/ui/js/component/video/view.jsx
+++ b/ui/js/component/video/view.jsx
@@ -46,20 +46,20 @@ class Video extends React.PureComponent {
loadStatusMessage = __("Downloading stream... not long left now!");
}
- let klassName = "";
- if (isLoading || isDownloading) klassName += "video-embedded video";
+ let klasses = [];
+ if (isLoading || isDownloading) klasses.push("video-embedded", "video");
if (mediaType === "video") {
- klassName += "video-embedded video";
- klassName += isPlaying ? " video--active" : " video--hidden";
+ klasses.push("video-embedded", "video");
+ klasses.push(isPlaying ? "video--active" : "video--hidden");
} else if (mediaType === "application") {
- klassName += "video-embedded";
+ klasses.push("video-embedded");
} else {
- if (!isPlaying) klassName += "video-embedded";
+ if (!isPlaying) klasses.push("video-embedded");
}
const poster = metadata.thumbnail;
return (
-
+
{isPlaying &&
(!isReadyToPlay
?
From 9c9d685be6573cd97d20f87dae0e182fba70d56f Mon Sep 17 00:00:00 2001
From: Alex Grintsvayg
Date: Fri, 23 Jun 2017 13:47:07 -0400
Subject: [PATCH 2/2] trim verification token
---
ui/js/actions/user.js | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/ui/js/actions/user.js b/ui/js/actions/user.js
index da7f351ff..ebfa8ed4b 100644
--- a/ui/js/actions/user.js
+++ b/ui/js/actions/user.js
@@ -85,7 +85,7 @@ export function doUserEmailNew(email) {
.catch(error => {
dispatch({
type: types.USER_EMAIL_NEW_FAILURE,
- data: { error: error.message },
+ data: { error },
});
});
};
@@ -103,19 +103,13 @@ export function doUserEmailDecline() {
export function doUserEmailVerify(verificationToken) {
return function(dispatch, getState) {
const email = selectEmailToVerify(getState());
+ verificationToken = verificationToken.toString().trim();
dispatch({
type: types.USER_EMAIL_VERIFY_STARTED,
code: verificationToken,
});
- const failure = error => {
- dispatch({
- type: types.USER_EMAIL_VERIFY_FAILURE,
- data: { error: error.message },
- });
- };
-
lbryio
.call(
"user_email",
@@ -131,8 +125,14 @@ export function doUserEmailVerify(verificationToken) {
});
dispatch(doUserFetch());
} else {
- failure(new Error("Your email is still not verified.")); //shouldn't happen?
+ throw new Error("Your email is still not verified."); //shouldn't happen
}
- }, failure);
+ })
+ .catch(error => {
+ dispatch({
+ type: types.USER_EMAIL_VERIFY_FAILURE,
+ data: { error },
+ });
+ });
};
}