commit
10fb9a29c6
8 changed files with 39 additions and 26 deletions
|
@ -49,7 +49,7 @@
|
|||
"formik": "^0.10.4",
|
||||
"hast-util-sanitize": "^1.1.2",
|
||||
"keytar": "^4.2.1",
|
||||
"lbry-redux": "lbryio/lbry-redux#84b7d396934d57a37802aadbef71db91230a9404",
|
||||
"lbry-redux": "lbryio/lbry-redux#820b6eeadf9e58c1e5027fd4d92808ba817b410e",
|
||||
"lbryinc": "lbryio/lbryinc#68c8ce6b7608dabc9180fff9b4841d10e1c62284",
|
||||
"localforage": "^1.7.1",
|
||||
"mammoth": "^1.4.6",
|
||||
|
|
|
@ -65,8 +65,14 @@ class FileCard extends React.PureComponent<Props> {
|
|||
isSubscribed,
|
||||
isNew,
|
||||
showSubscribedLogo,
|
||||
isResolvingUri,
|
||||
} = this.props;
|
||||
|
||||
if (!isResolvingUri && !claim && !pending) {
|
||||
// abandoned
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!claim && !pending) {
|
||||
return (
|
||||
<div className="card card--small">
|
||||
|
|
|
@ -25,7 +25,6 @@ type Props = {
|
|||
type State = {
|
||||
details: string,
|
||||
message: string,
|
||||
isRunning: boolean,
|
||||
launchedModal: boolean,
|
||||
error: boolean,
|
||||
};
|
||||
|
@ -37,7 +36,6 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
|||
this.state = {
|
||||
details: __('Starting up'),
|
||||
message: __('Connecting'),
|
||||
isRunning: false,
|
||||
launchedModal: false,
|
||||
error: false,
|
||||
};
|
||||
|
@ -52,12 +50,7 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
|||
|
||||
this.adjustErrorTimeout();
|
||||
Lbry.connect()
|
||||
.then(() => {
|
||||
this.setState({
|
||||
isRunning: true,
|
||||
});
|
||||
checkDaemonVersion();
|
||||
})
|
||||
.then(checkDaemonVersion)
|
||||
.then(() => {
|
||||
this.updateStatus();
|
||||
})
|
||||
|
@ -94,16 +87,13 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
|||
}
|
||||
|
||||
updateStatus() {
|
||||
const { daemonVersionMatched } = this.props;
|
||||
if (daemonVersionMatched) {
|
||||
Lbry.status().then(status => {
|
||||
this.updateStatusCallback(status);
|
||||
});
|
||||
}
|
||||
Lbry.status().then(status => {
|
||||
this.updateStatusCallback(status);
|
||||
});
|
||||
}
|
||||
|
||||
updateStatusCallback(status: Status) {
|
||||
const { notifyUnlockWallet, authenticate } = this.props;
|
||||
const { notifyUnlockWallet, authenticate, modal } = this.props;
|
||||
const { launchedModal } = this.state;
|
||||
|
||||
if (status.error) {
|
||||
|
@ -127,7 +117,8 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
|||
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());
|
||||
}
|
||||
} else if (status.is_running) {
|
||||
|
@ -135,13 +126,6 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
|||
if (!this.timeout) {
|
||||
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(() => {
|
||||
// Only leave the load screen if the daemon version matched;
|
||||
|
@ -207,7 +191,7 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { message, details, isRunning, error } = this.state;
|
||||
const { message, details, error } = this.state;
|
||||
|
||||
return (
|
||||
<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;
|
||||
daemon doesn't let you quit during startup, so the "Quit" buttons
|
||||
in the modals won't work. */}
|
||||
{isRunning && this.renderModals()}
|
||||
{this.renderModals()}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,12 @@ button {
|
|||
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 {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
padding-top: var(--video-aspect-ratio);
|
||||
width: 100%;
|
||||
|
||||
.card__media-text {
|
||||
margin-top: calc(-1 * var(--video-aspect-ratio));
|
||||
}
|
||||
|
||||
&.content__empty--nsfw {
|
||||
background-color: $lbry-grape-3;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
|
||||
.file-tile__title {
|
||||
font-size: 1.1em;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.file-tile__uri {
|
||||
|
|
|
@ -165,6 +165,10 @@ html[data-theme='dark'] {
|
|||
a {
|
||||
color: $lbry-white !important; // We need to use !important to override the CodeMirror styles
|
||||
|
||||
&.active {
|
||||
background-color: rgba($lbry-black, 0.4);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $lbry-black !important;
|
||||
}
|
||||
|
|
|
@ -5663,6 +5663,14 @@ lazy-val@^1.0.3:
|
|||
version "1.0.3"
|
||||
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:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/84b7d396934d57a37802aadbef71db91230a9404"
|
||||
|
|
Loading…
Reference in a new issue