Blockers #2360
14 changed files with 72 additions and 72 deletions
|
@ -35,6 +35,7 @@
|
||||||
"standard/no-callback-literal": 0,
|
"standard/no-callback-literal": 0,
|
||||||
"comma-dangle": ["error", "always-multiline"],
|
"comma-dangle": ["error", "always-multiline"],
|
||||||
"space-before-function-paren": ["error", "never"],
|
"space-before-function-paren": ["error", "never"],
|
||||||
|
"jsx-quotes": ["error", "prefer-double"],
|
||||||
Nevermind. Not sure what I was doing earlier but if works. Nevermind. Not sure what I was doing earlier but if works.
|
|||||||
"semi": [
|
"semi": [
|
||||||
"error",
|
"error",
|
||||||
"always",
|
"always",
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
"lbrySettings": {
|
"lbrySettings": {
|
||||||
"lbrynetDaemonVersion": "0.32.4",
|
"lbrynetDaemonVersion": "0.32.4",
|
||||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
||||||
"lbrynetDaemonDir": "static",
|
"lbrynetDaemonDir": "static/daemon",
|
||||||
"lbrynetDaemonFileName": "lbrynet"
|
"lbrynetDaemonFileName": "lbrynet"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,11 @@ import { spawn, execSync } from 'child_process';
|
||||||
import { Lbry } from 'lbry-redux';
|
import { Lbry } from 'lbry-redux';
|
||||||
|
|
||||||
export default class Daemon {
|
export default class Daemon {
|
||||||
static path = process.env.LBRY_DAEMON || (
|
static path =
|
||||||
process.env.NODE_ENV === 'production' ? path.join(process.resourcesPath, 'static', 'lbrynet') : path.join(__static, 'lbrynet')
|
process.env.LBRY_DAEMON ||
|
||||||
);
|
(process.env.NODE_ENV === 'production'
|
||||||
|
? path.join(process.resourcesPath, 'static/daemon', 'lbrynet')
|
||||||
|
: path.join(__static, 'daemon/lbrynet'));
|
||||||
subprocess;
|
subprocess;
|
||||||
handlers;
|
handlers;
|
||||||
|
|
||||||
|
|
|
@ -90,20 +90,21 @@ app.on('ready', async() => {
|
||||||
const {
|
const {
|
||||||
default: installExtension,
|
default: installExtension,
|
||||||
REACT_DEVELOPER_TOOLS,
|
REACT_DEVELOPER_TOOLS,
|
||||||
REDUX_DEVTOOLS, REACT_PERF,
|
REDUX_DEVTOOLS,
|
||||||
|
REACT_PERF,
|
||||||
} = require('electron-devtools-installer');
|
} = require('electron-devtools-installer');
|
||||||
|
|
||||||
await installExtension(REACT_DEVELOPER_TOOLS)
|
await installExtension(REACT_DEVELOPER_TOOLS)
|
||||||
.then((name) => console.log(`Added Extension: ${name}`))
|
.then(name => console.log(`Added Extension: ${name}`))
|
||||||
.catch((err) => console.log('An error occurred: ', err));
|
.catch(err => console.log('An error occurred: ', err));
|
||||||
|
|
||||||
await installExtension(REDUX_DEVTOOLS)
|
await installExtension(REDUX_DEVTOOLS)
|
||||||
.then((name) => console.log(`Added Extension: ${name}`))
|
.then(name => console.log(`Added Extension: ${name}`))
|
||||||
.catch((err) => console.log('An error occurred: ', err));
|
.catch(err => console.log('An error occurred: ', err));
|
||||||
|
|
||||||
await installExtension(REACT_PERF)
|
await installExtension(REACT_PERF)
|
||||||
.then((name) => console.log(`Added Extension: ${name}`))
|
.then(name => console.log(`Added Extension: ${name}`))
|
||||||
.catch((err) => console.log('An error occurred: ', err));
|
.catch(err => console.log('An error occurred: ', err));
|
||||||
}
|
}
|
||||||
|
|
||||||
rendererWindow = createWindow(appState);
|
rendererWindow = createWindow(appState);
|
||||||
|
@ -262,17 +263,20 @@ ipcMain.on('version-info-requested', () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const requestLatestRelease = (alreadyRedirected = false) => {
|
const requestLatestRelease = (alreadyRedirected = false) => {
|
||||||
const req = https.get({
|
const req = https.get(
|
||||||
|
{
|
||||||
hostname: 'api.github.com',
|
hostname: 'api.github.com',
|
||||||
path: '/repos/lbryio/lbry-desktop/releases/latest',
|
path: '/repos/lbryio/lbry-desktop/releases/latest',
|
||||||
headers: { 'user-agent': `LBRY/${localVersion}` },
|
headers: { 'user-agent': `LBRY/${localVersion}` },
|
||||||
}, res => {
|
},
|
||||||
|
res => {
|
||||||
if (res.statusCode === 301 || res.statusCode === 302) {
|
if (res.statusCode === 301 || res.statusCode === 302) {
|
||||||
requestLatestRelease(res.headers.location, true);
|
requestLatestRelease(res.headers.location, true);
|
||||||
} else {
|
} else {
|
||||||
onSuccess(res);
|
onSuccess(res);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
if (alreadyRedirected) return;
|
if (alreadyRedirected) return;
|
||||||
req.on('error', err => {
|
req.on('error', err => {
|
||||||
|
|
|
@ -13,8 +13,8 @@ const { Lbry } = require('lbry-redux');
|
||||||
delete global.window;
|
delete global.window;
|
||||||
|
|
||||||
export default async function startSandbox() {
|
export default async function startSandbox() {
|
||||||
const sandbox = express();
|
|
||||||
const port = 5278;
|
const port = 5278;
|
||||||
|
const sandbox = express();
|
||||||
|
|
||||||
sandbox.get('/set/:outpoint', async(req, res) => {
|
sandbox.get('/set/:outpoint', async(req, res) => {
|
||||||
const { outpoint } = req.params;
|
const { outpoint } = req.params;
|
||||||
|
@ -26,5 +26,13 @@ export default async function startSandbox() {
|
||||||
res.send(`/sandbox/${outpoint}/`);
|
res.send(`/sandbox/${outpoint}/`);
|
||||||
});
|
});
|
||||||
|
|
||||||
sandbox.listen(port, 'localhost', () => console.log(`Sandbox listening on port ${port}.`));
|
sandbox
|
||||||
|
.listen(port, 'localhost', () => console.log(`Sandbox listening on port ${port}.`))
|
||||||
|
.on('error', err => {
|
||||||
|
if (err.code === 'EADDRINUSE') {
|
||||||
|
console.log(
|
||||||
|
'Server already listening at localhost://5278: This is probably another LBRY app running. If not, games in the app will not work.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { doResolveUri, makeSelectClaimForUri, makeSelectIsUriResolving } from 'lbry-redux';
|
import {
|
||||||
|
doResolveUri,
|
||||||
|
makeSelectClaimForUri,
|
||||||
|
makeSelectIsUriResolving,
|
||||||
|
makeSelectTotalItemsForChannel,
|
||||||
|
} from 'lbry-redux';
|
||||||
import { doNavigate } from 'redux/actions/navigation';
|
import { doNavigate } from 'redux/actions/navigation';
|
||||||
import { makeSelectTotalItemsForChannel } from 'redux/selectors/content';
|
|
||||||
import ChannelTile from './view';
|
import ChannelTile from './view';
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
|
|
@ -45,7 +45,7 @@ class ChannelTile extends React.PureComponent<Props> {
|
||||||
subscriptionUri = `lbry://${claim.permanent_url}`;
|
subscriptionUri = `lbry://${claim.permanent_url}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const onClick = () => navigate('/show', { uri });
|
const onClick = () => navigate('/show', { uri, page: 1 });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
|
|
|
@ -10,12 +10,14 @@ type Props = {
|
||||||
const WalletBalance = (props: Props) => {
|
const WalletBalance = (props: Props) => {
|
||||||
const { balance } = props;
|
const { balance } = props;
|
||||||
return (
|
return (
|
||||||
<section className="card card--section card--wallet-balance">
|
<section
|
||||||
|
className="card card--section card--wallet-balance"
|
||||||
|
style={{ backgroundImage: `url(${BalanceBackground})` }}
|
||||||
|
>
|
||||||
<header className="card__header">
|
<header className="card__header">
|
||||||
<h2 className="card__title">{__('Balance')}</h2>
|
<h2 className="card__title">{__('Balance')}</h2>
|
||||||
<p className="card__subtitle">{__('You currently have')}</p>
|
<p className="card__subtitle">{__('You currently have')}</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div className="card__content">
|
<div className="card__content">
|
||||||
{(balance || balance === 0) && (
|
{(balance || balance === 0) && (
|
||||||
<CreditAmount large badge={false} amount={balance} precision={8} />
|
<CreditAmount large badge={false} amount={balance} precision={8} />
|
||||||
|
|
|
@ -68,7 +68,6 @@ export const RESOLVE_URIS_COMPLETED = 'RESOLVE_URIS_COMPLETED';
|
||||||
export const FETCH_CHANNEL_CLAIMS_STARTED = 'FETCH_CHANNEL_CLAIMS_STARTED';
|
export const FETCH_CHANNEL_CLAIMS_STARTED = 'FETCH_CHANNEL_CLAIMS_STARTED';
|
||||||
export const FETCH_CHANNEL_CLAIMS_COMPLETED = 'FETCH_CHANNEL_CLAIMS_COMPLETED';
|
export const FETCH_CHANNEL_CLAIMS_COMPLETED = 'FETCH_CHANNEL_CLAIMS_COMPLETED';
|
||||||
export const FETCH_CHANNEL_CLAIM_COUNT_STARTED = 'FETCH_CHANNEL_CLAIM_COUNT_STARTED';
|
export const FETCH_CHANNEL_CLAIM_COUNT_STARTED = 'FETCH_CHANNEL_CLAIM_COUNT_STARTED';
|
||||||
export const FETCH_CHANNEL_CLAIM_COUNT_COMPLETED = 'FETCH_CHANNEL_CLAIM_COUNT_COMPLETED';
|
|
||||||
export const FETCH_CLAIM_LIST_MINE_STARTED = 'FETCH_CLAIM_LIST_MINE_STARTED';
|
export const FETCH_CLAIM_LIST_MINE_STARTED = 'FETCH_CLAIM_LIST_MINE_STARTED';
|
||||||
export const FETCH_CLAIM_LIST_MINE_COMPLETED = 'FETCH_CLAIM_LIST_MINE_COMPLETED';
|
export const FETCH_CLAIM_LIST_MINE_COMPLETED = 'FETCH_CLAIM_LIST_MINE_COMPLETED';
|
||||||
export const ABANDON_CLAIM_STARTED = 'ABANDON_CLAIM_STARTED';
|
export const ABANDON_CLAIM_STARTED = 'ABANDON_CLAIM_STARTED';
|
||||||
|
|
|
@ -32,11 +32,11 @@ class ChannelPage extends React.PureComponent<Props> {
|
||||||
fetchClaims(uri, page || 1);
|
fetchClaims(uri, page || 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps: Props) {
|
componentDidUpdate(prevProps: Props) {
|
||||||
const { page, fetchClaims } = this.props;
|
const { page, fetchClaims, uri } = this.props;
|
||||||
|
|
||||||
if (nextProps.page && page !== nextProps.page) {
|
if (prevProps.page && prevProps.page && page !== prevProps.page) {
|
||||||
fetchClaims(nextProps.uri, nextProps.page);
|
fetchClaims(uri, page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,7 @@ class FilePage extends React.Component<Props> {
|
||||||
|
|
||||||
<div className="media__actions media__actions--between">
|
<div className="media__actions media__actions--between">
|
||||||
<div className="media__action-group--large">
|
<div className="media__action-group--large">
|
||||||
{claimIsMine ? (
|
{claimIsMine && (
|
||||||
<Button
|
<Button
|
||||||
button="primary"
|
button="primary"
|
||||||
icon={icons.EDIT}
|
icon={icons.EDIT}
|
||||||
|
@ -236,16 +236,18 @@ class FilePage extends React.Component<Props> {
|
||||||
navigate('/publish');
|
navigate('/publish');
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
|
||||||
<SubscribeButton uri={channelUri} channelName={channelName} />
|
|
||||||
)}
|
)}
|
||||||
{!claimIsMine && (
|
{!claimIsMine && (
|
||||||
|
<React.Fragment>
|
||||||
|
{channelUri && <SubscribeButton uri={channelUri} channelName={channelName} />}
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
button="alt"
|
button="alt"
|
||||||
icon={icons.TIP}
|
icon={icons.TIP}
|
||||||
label={__('Send a tip')}
|
label={__('Send a tip')}
|
||||||
onClick={() => openModal(MODALS.SEND_TIP, { uri })}
|
onClick={() => openModal(MODALS.SEND_TIP, { uri })}
|
||||||
/>
|
/>
|
||||||
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
<Button
|
<Button
|
||||||
button="alt"
|
button="alt"
|
||||||
|
|
|
@ -13,17 +13,6 @@ reducers[ACTIONS.SET_PLAYING_URI] = (state, action) =>
|
||||||
playingUri: action.data.uri,
|
playingUri: action.data.uri,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_CHANNEL_CLAIM_COUNT_COMPLETED] = (state, action) => {
|
|
||||||
const channelClaimCounts = Object.assign({}, state.channelClaimCounts);
|
|
||||||
const { uri, totalClaims } = action.data;
|
|
||||||
|
|
||||||
channelClaimCounts[uri] = totalClaims;
|
|
||||||
|
|
||||||
return Object.assign({}, state, {
|
|
||||||
channelClaimCounts,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.SET_CONTENT_POSITION] = (state, action) => {
|
reducers[ACTIONS.SET_CONTENT_POSITION] = (state, action) => {
|
||||||
const { claimId, outpoint, position } = action.data;
|
const { claimId, outpoint, position } = action.data;
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -14,17 +14,6 @@ export const selectPlayingUri = createSelector(
|
||||||
state => state.playingUri
|
state => state.playingUri
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectChannelClaimCounts = createSelector(
|
|
||||||
selectState,
|
|
||||||
state => state.channelClaimCounts || {}
|
|
||||||
);
|
|
||||||
|
|
||||||
export const makeSelectTotalItemsForChannel = (uri: string) =>
|
|
||||||
createSelector(
|
|
||||||
selectChannelClaimCounts,
|
|
||||||
byUri => byUri && byUri[uri]
|
|
||||||
);
|
|
||||||
|
|
||||||
export const selectRewardContentClaimIds = createSelector(
|
export const selectRewardContentClaimIds = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => state.rewardedContentClaimIds
|
state => state.rewardedContentClaimIds
|
||||||
|
|
|
@ -136,6 +136,7 @@
|
||||||
display: inline;
|
display: inline;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
line-height: 1.33;
|
line-height: 1.33;
|
||||||
|
margin-right: var(--spacing-vertical-small);
|
||||||
}
|
}
|
||||||
|
|
||||||
// M E D I A
|
// M E D I A
|
||||||
|
@ -299,11 +300,10 @@
|
||||||
|
|
||||||
&:not(:empty) {
|
&:not(:empty) {
|
||||||
height: 2.55rem;
|
height: 2.55rem;
|
||||||
margin-top: -1px;
|
margin-top: 0px;
|
||||||
|
|
||||||
margin-bottom: var(--spacing-vertical-small);
|
margin-bottom: var(--spacing-vertical-small);
|
||||||
padding-top: var(--spacing-vertical-small);
|
padding-top: var(--spacing-vertical-small);
|
||||||
padding-left: var(--spacing-vertical-small);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
|
|
Loading…
Reference in a new issue
@skhameneh Do you know why this wouldn't be used? It's still using single quotes.