Merge pull request #2136 from lbryio/rc-fixes

RC fixes
This commit is contained in:
Sean Yesmunt 2018-12-07 16:11:32 -05:00 committed by GitHub
commit 10fb9a29c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 39 additions and 26 deletions

View file

@ -49,7 +49,7 @@
"formik": "^0.10.4", "formik": "^0.10.4",
"hast-util-sanitize": "^1.1.2", "hast-util-sanitize": "^1.1.2",
"keytar": "^4.2.1", "keytar": "^4.2.1",
"lbry-redux": "lbryio/lbry-redux#84b7d396934d57a37802aadbef71db91230a9404", "lbry-redux": "lbryio/lbry-redux#820b6eeadf9e58c1e5027fd4d92808ba817b410e",
"lbryinc": "lbryio/lbryinc#68c8ce6b7608dabc9180fff9b4841d10e1c62284", "lbryinc": "lbryio/lbryinc#68c8ce6b7608dabc9180fff9b4841d10e1c62284",
"localforage": "^1.7.1", "localforage": "^1.7.1",
"mammoth": "^1.4.6", "mammoth": "^1.4.6",

View file

@ -65,8 +65,14 @@ class FileCard extends React.PureComponent<Props> {
isSubscribed, isSubscribed,
isNew, isNew,
showSubscribedLogo, showSubscribedLogo,
isResolvingUri,
} = this.props; } = this.props;
if (!isResolvingUri && !claim && !pending) {
// abandoned
return null;
}
if (!claim && !pending) { if (!claim && !pending) {
return ( return (
<div className="card card--small"> <div className="card card--small">

View file

@ -25,7 +25,6 @@ type Props = {
type State = { type State = {
details: string, details: string,
message: string, message: string,
isRunning: boolean,
launchedModal: boolean, launchedModal: boolean,
error: boolean, error: boolean,
}; };
@ -37,7 +36,6 @@ export class SplashScreen extends React.PureComponent<Props, State> {
this.state = { this.state = {
details: __('Starting up'), details: __('Starting up'),
message: __('Connecting'), message: __('Connecting'),
isRunning: false,
launchedModal: false, launchedModal: false,
error: false, error: false,
}; };
@ -52,12 +50,7 @@ export class SplashScreen extends React.PureComponent<Props, State> {
this.adjustErrorTimeout(); this.adjustErrorTimeout();
Lbry.connect() Lbry.connect()
.then(() => { .then(checkDaemonVersion)
this.setState({
isRunning: true,
});
checkDaemonVersion();
})
.then(() => { .then(() => {
this.updateStatus(); this.updateStatus();
}) })
@ -94,16 +87,13 @@ export class SplashScreen extends React.PureComponent<Props, State> {
} }
updateStatus() { updateStatus() {
const { daemonVersionMatched } = this.props; Lbry.status().then(status => {
if (daemonVersionMatched) { this.updateStatusCallback(status);
Lbry.status().then(status => { });
this.updateStatusCallback(status);
});
}
} }
updateStatusCallback(status: Status) { updateStatusCallback(status: Status) {
const { notifyUnlockWallet, authenticate } = this.props; const { notifyUnlockWallet, authenticate, modal } = this.props;
const { launchedModal } = this.state; const { launchedModal } = this.state;
if (status.error) { if (status.error) {
@ -127,7 +117,8 @@ export class SplashScreen extends React.PureComponent<Props, State> {
clearTimeout(this.timeout); clearTimeout(this.timeout);
} }
if (launchedModal === false) { // Make sure there isn't another active modal (like INCOMPATIBLE_DAEMON)
if (launchedModal === false && !modal) {
this.setState({ launchedModal: true }, () => notifyUnlockWallet()); this.setState({ launchedModal: true }, () => notifyUnlockWallet());
} }
} else if (status.is_running) { } else if (status.is_running) {
@ -135,13 +126,6 @@ export class SplashScreen extends React.PureComponent<Props, State> {
if (!this.timeout) { if (!this.timeout) {
this.adjustErrorTimeout(); this.adjustErrorTimeout();
} }
// Wait until we are able to resolve a name before declaring
// that we are done.
// TODO: This is a hack, and the logic should live in the daemon
// to give us a better sense of when we are actually started
this.setState({
isRunning: true,
});
Lbry.resolve({ uri: 'lbry://one' }).then(() => { Lbry.resolve({ uri: 'lbry://one' }).then(() => {
// Only leave the load screen if the daemon version matched; // Only leave the load screen if the daemon version matched;
@ -207,7 +191,7 @@ export class SplashScreen extends React.PureComponent<Props, State> {
} }
render() { render() {
const { message, details, isRunning, error } = this.state; const { message, details, error } = this.state;
return ( return (
<React.Fragment> <React.Fragment>
@ -215,7 +199,7 @@ export class SplashScreen extends React.PureComponent<Props, State> {
{/* Temp hack: don't show any modals on splash screen daemon is running; {/* Temp hack: don't show any modals on splash screen daemon is running;
daemon doesn't let you quit during startup, so the "Quit" buttons daemon doesn't let you quit during startup, so the "Quit" buttons
in the modals won't work. */} in the modals won't work. */}
{isRunning && this.renderModals()} {this.renderModals()}
</React.Fragment> </React.Fragment>
); );
} }

View file

@ -28,6 +28,12 @@ button {
font-weight: inherit; font-weight: inherit;
} }
h1 {
// Paul - Remove this in your changes
// This should be added to the media-title (or whatever that is called)
word-break: break-word;
}
ul { ul {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;

View file

@ -54,6 +54,10 @@
padding-top: var(--video-aspect-ratio); padding-top: var(--video-aspect-ratio);
width: 100%; width: 100%;
.card__media-text {
margin-top: calc(-1 * var(--video-aspect-ratio));
}
&.content__empty--nsfw { &.content__empty--nsfw {
background-color: $lbry-grape-3; background-color: $lbry-grape-3;
} }

View file

@ -59,6 +59,7 @@
.file-tile__title { .file-tile__title {
font-size: 1.1em; font-size: 1.1em;
word-break: break-word;
} }
.file-tile__uri { .file-tile__uri {

View file

@ -165,6 +165,10 @@ html[data-theme='dark'] {
a { a {
color: $lbry-white !important; // We need to use !important to override the CodeMirror styles color: $lbry-white !important; // We need to use !important to override the CodeMirror styles
&.active {
background-color: rgba($lbry-black, 0.4);
}
&:hover { &:hover {
color: $lbry-black !important; color: $lbry-black !important;
} }

View file

@ -5663,6 +5663,14 @@ lazy-val@^1.0.3:
version "1.0.3" version "1.0.3"
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.3.tgz#bb97b200ef00801d94c317e29dc6ed39e31c5edc" resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.3.tgz#bb97b200ef00801d94c317e29dc6ed39e31c5edc"
lbry-redux@lbryio/lbry-redux#820b6eeadf9e58c1e5027fd4d92808ba817b410e:
version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/820b6eeadf9e58c1e5027fd4d92808ba817b410e"
dependencies:
proxy-polyfill "0.1.6"
reselect "^3.0.0"
uuid "^3.3.2"
lbry-redux@lbryio/lbry-redux#84b7d396934d57a37802aadbef71db91230a9404: lbry-redux@lbryio/lbry-redux#84b7d396934d57a37802aadbef71db91230a9404:
version "0.0.1" version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/84b7d396934d57a37802aadbef71db91230a9404" resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/84b7d396934d57a37802aadbef71db91230a9404"