mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 09:45:10 +00:00
Merge branch 'master' into dock-badge
This commit is contained in:
commit
6ff423a760
2 changed files with 17 additions and 17 deletions
|
@ -85,7 +85,7 @@ export function doUserEmailNew(email) {
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.USER_EMAIL_NEW_FAILURE,
|
type: types.USER_EMAIL_NEW_FAILURE,
|
||||||
data: { error: error.message },
|
data: { error },
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -103,19 +103,13 @@ export function doUserEmailDecline() {
|
||||||
export function doUserEmailVerify(verificationToken) {
|
export function doUserEmailVerify(verificationToken) {
|
||||||
return function(dispatch, getState) {
|
return function(dispatch, getState) {
|
||||||
const email = selectEmailToVerify(getState());
|
const email = selectEmailToVerify(getState());
|
||||||
|
verificationToken = verificationToken.toString().trim();
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.USER_EMAIL_VERIFY_STARTED,
|
type: types.USER_EMAIL_VERIFY_STARTED,
|
||||||
code: verificationToken,
|
code: verificationToken,
|
||||||
});
|
});
|
||||||
|
|
||||||
const failure = error => {
|
|
||||||
dispatch({
|
|
||||||
type: types.USER_EMAIL_VERIFY_FAILURE,
|
|
||||||
data: { error: error.message },
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
lbryio
|
lbryio
|
||||||
.call(
|
.call(
|
||||||
"user_email",
|
"user_email",
|
||||||
|
@ -131,8 +125,14 @@ export function doUserEmailVerify(verificationToken) {
|
||||||
});
|
});
|
||||||
dispatch(doUserFetch());
|
dispatch(doUserFetch());
|
||||||
} else {
|
} 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 },
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,20 +46,20 @@ class Video extends React.PureComponent {
|
||||||
loadStatusMessage = __("Downloading stream... not long left now!");
|
loadStatusMessage = __("Downloading stream... not long left now!");
|
||||||
}
|
}
|
||||||
|
|
||||||
let klassName = "";
|
let klasses = [];
|
||||||
if (isLoading || isDownloading) klassName += "video-embedded video";
|
if (isLoading || isDownloading) klasses.push("video-embedded", "video");
|
||||||
if (mediaType === "video") {
|
if (mediaType === "video") {
|
||||||
klassName += "video-embedded video";
|
klasses.push("video-embedded", "video");
|
||||||
klassName += isPlaying ? " video--active" : " video--hidden";
|
klasses.push(isPlaying ? "video--active" : "video--hidden");
|
||||||
} else if (mediaType === "application") {
|
} else if (mediaType === "application") {
|
||||||
klassName += "video-embedded";
|
klasses.push("video-embedded");
|
||||||
} else {
|
} else {
|
||||||
if (!isPlaying) klassName += "video-embedded";
|
if (!isPlaying) klasses.push("video-embedded");
|
||||||
}
|
}
|
||||||
const poster = metadata.thumbnail;
|
const poster = metadata.thumbnail;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={klassName}>
|
<div className={klasses.join(" ")}>
|
||||||
{isPlaying &&
|
{isPlaying &&
|
||||||
(!isReadyToPlay
|
(!isReadyToPlay
|
||||||
? <LoadingScreen status={loadStatusMessage} />
|
? <LoadingScreen status={loadStatusMessage} />
|
||||||
|
|
Loading…
Add table
Reference in a new issue