web cleanup

This commit is contained in:
Sean Yesmunt 2019-03-08 14:20:17 -05:00
parent 584f923491
commit 8ee1d2319d
15 changed files with 28 additions and 28 deletions

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
/node_modules
/dist
/static/lbrynet
/static/daemon
/static/locales
yarn-error.log
package-lock.json

View file

@ -24,7 +24,7 @@
"compile:web": "webpack --config webpack.web.config.js",
"compile": "yarn compile:electron && yarn compile:web",
"dev:electron": "webpack-dev-server --hot --progress --config webpack.electron.config.js",
"dev:web": "webpack-dev-server --hot --progress --config webpack.web.config.js",
"dev:web": "webpack-dev-server --open --hot --progress --config webpack.web.config.js",
"dev:internal-apis": "LBRY_API_URL='http://localhost:8080' yarn dev:electron",
"run:electron": "electron ./dist/electron/main.js",
"run:web": "yarn compile:web && node ./dist/web/server.js",

View file

@ -38,7 +38,8 @@ export default class ErrorBoundary extends React.Component<Props, State> {
}
render() {
if (!this.state.hasError) {
console.log('app.env', app.env);
if (this.state.hasError) {
return (
<div className="load-screen">
<Yrbl

View file

@ -3,11 +3,13 @@ import { remote } from 'electron';
import React from 'react';
import LoadingScreen from 'component/common/loading-screen';
import PdfViewer from 'component/viewers/pdfViewer';
import ThreeViewer from 'component/viewers/threeViewer';
import DocumentViewer from 'component/viewers/documentViewer';
import DocxViewer from 'component/viewers/docxViewer';
import HtmlViewer from 'component/viewers/htmlViewer';
import AudioVideoViewer from 'component/viewers/audioVideoViewer';
// @if TARGET='app'
import ThreeViewer from 'component/viewers/threeViewer';
// @endif
type Props = {
mediaType: string,
@ -101,7 +103,10 @@ class FileRender extends React.PureComponent<Props> {
// Supported mediaTypes
const mediaTypes = {
// @if TARGET='app'
'3D-file': <ThreeViewer source={{ fileType, downloadPath }} theme={currentTheme} />,
// @endif
application: !source.url ? null : (
<webview
ref={element => this.processSandboxRef(element)}

View file

@ -40,7 +40,7 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
details: __('Starting up'),
message: __('Connecting'),
launchedModal: false,
error: true,
error: false,
launchWithIncompatibleDaemon: false,
isRunning: false,
};
@ -213,7 +213,7 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
return (
<React.Fragment>
<LoadScreen message={message} details={details} error={error} />;
<LoadScreen message={message} details={details} error={error} />
{/* 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. */}

View file

@ -1,4 +1,3 @@
/* eslint-disable no-console */
import ErrorBoundary from 'component/errorBoundary';
import App from 'component/app';
import SnackBar from 'component/snackBar';
@ -215,8 +214,8 @@ const init = () => {
// @if TARGET='app'
moment.locale(remote.app.getLocale());
/* eslint-disable no-console */
autoUpdater.on('error', error => {
// eslint-disable-next-line no-console
console.error(error.message);
});
@ -232,6 +231,7 @@ const init = () => {
app.store.dispatch(doAutoUpdate());
});
}
/* eslint-enable no-console */
app.store.dispatch(doUpdateIsNightAsync());
// @endif
@ -257,16 +257,14 @@ const init = () => {
// @endif
}
if (false && window.sessionStorage.getItem('loaded') === 'y') {
if (window.sessionStorage.getItem('loaded') === 'y') {
onDaemonReady();
} else {
ReactDOM.render(
<Provider store={store}>
<SplashScreen
authenticate={() => app.store.dispatch(doAuthenticate(pjson.version))}
onReadyToLaunch={() => {
// onDaemonReady
}}
onReadyToLaunch={onDaemonReady}
/>
</Provider>,
document.getElementById('app')
@ -275,6 +273,3 @@ const init = () => {
};
init();
/* eslint-enable react/jsx-filename-extension */
/* eslint-enable no-console */

View file

@ -234,7 +234,7 @@ class HelpPage extends React.PureComponent<Props, State> {
</tr>
<tr>
<td>{__('Daemon (lbrynet)')}</td>
<td>{ver ? ver.lbrynet_version : __('Loading')}</td>
<td>{ver ? ver.lbrynet_version : __('Loading...')}</td>
</tr>
<tr>
<td>{__('Connected Email')}</td>

View file

@ -18,22 +18,12 @@
}
.load-screen__button {
transition: none;
color: $lbry-white;
// border-bottom: 1px solid $lbry-white;
border-bottom: 1px solid $lbry-white;
&:hover {
// border-bottom: 1px solid $lbry-blue-1;
color: $lbry-blue-1;
}
}
.load-screen__button:not(:disabled) {
&:not(:hover) {
color: $lbry-white;
// border-bottom: 1px solid $lbry-white;
}
&:hover {
// border-bottom: 1px solid $lbry-blue-1;
border-bottom: 1px solid $lbry-blue-1;
color: $lbry-blue-1;
}
}

View file

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 992 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View file

@ -16,6 +16,7 @@ const baseConfig = {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
},
{
@ -51,6 +52,9 @@ const baseConfig = {
test: /\.glsl/,
use: {
loader: 'file-loader',
options: {
outputPath: 'ui/three',
},
},
},
],

View file

@ -46,6 +46,10 @@ const webConfig = {
from: `${STATIC_ROOT}/index.html`,
to: `${DIST_ROOT}/web/index.html`,
},
{
from: `${STATIC_ROOT}/img/favicon.ico`,
to: `${DIST_ROOT}/web/favicon.ico`,
},
{
from: `${WEB_PLATFORM_ROOT}/server.js`,
to: `${DIST_ROOT}/web/server.js`,