commit
f6afb2e1e1
28 changed files with 361 additions and 561 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@
|
||||||
/static/daemon/lbrynet*
|
/static/daemon/lbrynet*
|
||||||
/static/locales
|
/static/locales
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
/build/daemon*
|
||||||
|
|
|
@ -12,17 +12,18 @@ type Props = {
|
||||||
label: ?string,
|
label: ?string,
|
||||||
errorMessage: ?string,
|
errorMessage: ?string,
|
||||||
reward: Reward,
|
reward: Reward,
|
||||||
|
button: ?boolean,
|
||||||
clearError: Reward => void,
|
clearError: Reward => void,
|
||||||
claimReward: Reward => void,
|
claimReward: Reward => void,
|
||||||
};
|
};
|
||||||
|
|
||||||
const RewardLink = (props: Props) => {
|
const RewardLink = (props: Props) => {
|
||||||
const { reward, claimReward, clearError, errorMessage, label, isPending } = props;
|
const { reward, claimReward, clearError, errorMessage, label, isPending, button } = props;
|
||||||
|
|
||||||
return !reward ? null : (
|
return !reward ? null : (
|
||||||
<div className="reward-link">
|
<div className="reward-link">
|
||||||
<Button
|
<Button
|
||||||
button="link"
|
button={button ? 'primary' : 'link'}
|
||||||
disabled={isPending}
|
disabled={isPending}
|
||||||
label={isPending ? __('Claiming...') : label || `${__('Get')} ${reward.reward_amount} LBC`}
|
label={isPending ? __('Claiming...') : label || `${__('Get')} ${reward.reward_amount} LBC`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
@ -36,7 +36,7 @@ const RewardTile = (props: Props) => {
|
||||||
<Icon icon={icons.CHECK} /> {__('Reward claimed.')}
|
<Icon icon={icons.CHECK} /> {__('Reward claimed.')}
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<RewardLink reward_type={reward.reward_type} />
|
<RewardLink button reward_type={reward.reward_type} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { CSSTransitionGroup } from 'react-transition-group';
|
|
||||||
import * as icons from 'constants/icons';
|
import * as icons from 'constants/icons';
|
||||||
import * as NOTIFICATION_TYPES from 'constants/notification_types';
|
import * as NOTIFICATION_TYPES from 'constants/notification_types';
|
||||||
|
|
||||||
|
@ -20,11 +19,13 @@ type Props = {
|
||||||
forward: any => void,
|
forward: any => void,
|
||||||
isBackDisabled: boolean,
|
isBackDisabled: boolean,
|
||||||
isForwardDisabled: boolean,
|
isForwardDisabled: boolean,
|
||||||
isHome: boolean,
|
|
||||||
navLinks: {
|
navLinks: {
|
||||||
primary: Array<SideBarLink>,
|
primary: Array<SideBarLink>,
|
||||||
secondary: Array<SideBarLink>,
|
secondary: Array<SideBarLink>,
|
||||||
},
|
},
|
||||||
|
notifications: {
|
||||||
|
type: string,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const SideBar = (props: Props) => {
|
const SideBar = (props: Props) => {
|
||||||
|
@ -100,16 +101,14 @@ const SideBar = (props: Props) => {
|
||||||
>
|
>
|
||||||
<Button navigate={path} label={label} icon={icon} />
|
<Button navigate={path} label={label} icon={icon} />
|
||||||
|
|
||||||
|
{
|
||||||
|
// The sublinks should be animated on open close
|
||||||
|
// Removing it because the current implementation with CSSTransitionGroup
|
||||||
|
// was really slow and looked pretty bad. Possible fix is upgrading to v2
|
||||||
|
// Not sure if that has better performance
|
||||||
|
}
|
||||||
{!!subLinks.length &&
|
{!!subLinks.length &&
|
||||||
active && (
|
active && (
|
||||||
<CSSTransitionGroup
|
|
||||||
transitionAppear
|
|
||||||
transitionLeave
|
|
||||||
transitionAppearTimeout={300}
|
|
||||||
transitionEnterTimeout={300}
|
|
||||||
transitionLeaveTimeout={300}
|
|
||||||
transitionName="nav__sub"
|
|
||||||
>
|
|
||||||
<ul key="0" className="nav__sub-links">
|
<ul key="0" className="nav__sub-links">
|
||||||
{subLinks.map(({ label: subLabel, path: subPath, active: subLinkActive }) => (
|
{subLinks.map(({ label: subLabel, path: subPath, active: subLinkActive }) => (
|
||||||
<li
|
<li
|
||||||
|
@ -126,7 +125,6 @@ const SideBar = (props: Props) => {
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</CSSTransitionGroup>
|
|
||||||
)}
|
)}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { selectCurrentModal, selectDaemonVersionMatched } from 'redux/selectors/app';
|
import { selectDaemonVersionMatched } from 'redux/selectors/app';
|
||||||
|
import { selectNotification } from 'lbry-redux';
|
||||||
import { doCheckDaemonVersion } from 'redux/actions/app';
|
import { doCheckDaemonVersion } from 'redux/actions/app';
|
||||||
import SplashScreen from './view';
|
import SplashScreen from './view';
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
modal: selectCurrentModal(state),
|
notification: selectNotification(state),
|
||||||
daemonVersionMatched: selectDaemonVersionMatched(state),
|
daemonVersionMatched: selectDaemonVersionMatched(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,9 @@ import * as modals from 'constants/modal_types';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
checkDaemonVersion: () => Promise<any>,
|
checkDaemonVersion: () => Promise<any>,
|
||||||
modal: string,
|
notification: ?{
|
||||||
|
id: string,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
|
@ -100,9 +102,11 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { modal } = this.props;
|
const { notification } = this.props;
|
||||||
const { message, details, isLagging, isRunning } = this.state;
|
const { message, details, isLagging, isRunning } = this.state;
|
||||||
|
|
||||||
|
const notificationId = notification && notification.id;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<LoadScreen message={message} details={details} isWarning={isLagging} />
|
<LoadScreen message={message} details={details} isWarning={isLagging} />
|
||||||
|
@ -111,9 +115,9 @@ export class SplashScreen extends React.PureComponent<Props, State> {
|
||||||
in the modals won't work. */}
|
in the modals won't work. */}
|
||||||
{isRunning && (
|
{isRunning && (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
{modal === modals.INCOMPATIBLE_DAEMON && <ModalIncompatibleDaemon />}
|
{notificationId === modals.INCOMPATIBLE_DAEMON && <ModalIncompatibleDaemon />}
|
||||||
{modal === modals.UPGRADE && <ModalUpgrade />}
|
{notificationId === modals.UPGRADE && <ModalUpgrade />}
|
||||||
{modal === modals.DOWNLOADING && <ModalDownloading />}
|
{notificationId === modals.DOWNLOADING && <ModalDownloading />}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import Button from 'component/button';
|
||||||
import { buildURI } from 'lbry-redux';
|
import { buildURI } from 'lbry-redux';
|
||||||
import * as txnTypes from 'constants/transaction_types';
|
import * as txnTypes from 'constants/transaction_types';
|
||||||
import type { Transaction } from '../view';
|
import type { Transaction } from '../view';
|
||||||
|
import * as ICONS from 'constants/icons';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
transaction: Transaction,
|
transaction: Transaction,
|
||||||
|
@ -32,9 +33,9 @@ class TransactionListItem extends React.PureComponent<Props> {
|
||||||
|
|
||||||
getLink(type: string) {
|
getLink(type: string) {
|
||||||
if (type === txnTypes.TIP) {
|
if (type === txnTypes.TIP) {
|
||||||
return <Button button="link" onClick={this.abandonClaim} label={__('Unlock Tip')} />;
|
return <Button icon={ICONS.UNLOCK} onClick={this.abandonClaim} title={__('Unlock Tip')} />;
|
||||||
}
|
}
|
||||||
return <Button button="link" onClick={this.abandonClaim} label={__('Abandon Claim')} />;
|
return <Button icon={ICONS.TRASH} onClick={this.abandonClaim} title={__('Abandon Claim')} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
capitalize(string: string) {
|
capitalize(string: string) {
|
||||||
|
|
|
@ -100,8 +100,9 @@ class TransactionList extends React.PureComponent<Props, State> {
|
||||||
postfix={
|
postfix={
|
||||||
<Button
|
<Button
|
||||||
button="link"
|
button="link"
|
||||||
|
icon={icons.HELP}
|
||||||
href="https://lbry.io/faq/transaction-types"
|
href="https://lbry.io/faq/transaction-types"
|
||||||
label={__('Help')}
|
title={__('Help')}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
|
@ -8,7 +8,6 @@ import {
|
||||||
selectIdentityVerifyErrorMessage,
|
selectIdentityVerifyErrorMessage,
|
||||||
} from 'redux/selectors/user';
|
} from 'redux/selectors/user';
|
||||||
import UserVerify from './view';
|
import UserVerify from './view';
|
||||||
import { selectCurrentModal } from 'redux/selectors/app';
|
|
||||||
import { doNotify } from 'lbry-redux';
|
import { doNotify } from 'lbry-redux';
|
||||||
import { PHONE_COLLECTION } from 'constants/modal_types';
|
import { PHONE_COLLECTION } from 'constants/modal_types';
|
||||||
|
|
||||||
|
@ -19,7 +18,6 @@ const select = (state, props) => {
|
||||||
isPending: selectIdentityVerifyIsPending(state),
|
isPending: selectIdentityVerifyIsPending(state),
|
||||||
errorMessage: selectIdentityVerifyErrorMessage(state),
|
errorMessage: selectIdentityVerifyErrorMessage(state),
|
||||||
reward: selectReward(state, { reward_type: rewards.TYPE_NEW_USER }),
|
reward: selectReward(state, { reward_type: rewards.TYPE_NEW_USER }),
|
||||||
modal: selectCurrentModal(state),
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,3 +23,4 @@ export const HOME = 'Home';
|
||||||
export const PHONE = 'Phone';
|
export const PHONE = 'Phone';
|
||||||
export const CHECK = 'CheckCircle';
|
export const CHECK = 'CheckCircle';
|
||||||
export const HEART = 'Heart';
|
export const HEART = 'Heart';
|
||||||
|
export const UNLOCK = 'Unlock';
|
||||||
|
|
|
@ -129,7 +129,7 @@ export class ExpandableModal extends React.PureComponent<ModalProps, State> {
|
||||||
onClick={this.props.onConfirmed}
|
onClick={this.props.onConfirmed}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
button="alt"
|
button="link"
|
||||||
label={!this.state.expanded ? this.props.expandButtonLabel : this.props.hideButtonLabel}
|
label={!this.state.expanded ? this.props.expandButtonLabel : this.props.hideButtonLabel}
|
||||||
className="modal__button"
|
className="modal__button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import * as settings from 'constants/settings';
|
import * as settings from 'constants/settings';
|
||||||
import { selectCurrentModal, selectModalProps, selectModalsAllowed } from 'redux/selectors/app';
|
|
||||||
import {
|
import {
|
||||||
doNotify,
|
doNotify,
|
||||||
selectCostForCurrentPageUri,
|
selectCostForCurrentPageUri,
|
||||||
|
@ -17,8 +16,6 @@ import ModalRouter from './view';
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
balance: selectBalance(state),
|
balance: selectBalance(state),
|
||||||
showPageCost: selectCostForCurrentPageUri(state),
|
showPageCost: selectCostForCurrentPageUri(state),
|
||||||
modal: selectCurrentModal(state),
|
|
||||||
modalProps: selectModalProps(state),
|
|
||||||
page: selectCurrentPage(state),
|
page: selectCurrentPage(state),
|
||||||
isVerificationCandidate: selectUserIsVerificationCandidate(state),
|
isVerificationCandidate: selectUserIsVerificationCandidate(state),
|
||||||
isCreditIntroAcknowledged: makeSelectClientSetting(settings.CREDIT_REQUIRED_ACKNOWLEDGED)(state),
|
isCreditIntroAcknowledged: makeSelectClientSetting(settings.CREDIT_REQUIRED_ACKNOWLEDGED)(state),
|
||||||
|
@ -27,7 +24,6 @@ const select = state => ({
|
||||||
),
|
),
|
||||||
isWelcomeAcknowledged: makeSelectClientSetting(settings.NEW_USER_ACKNOWLEDGED)(state),
|
isWelcomeAcknowledged: makeSelectClientSetting(settings.NEW_USER_ACKNOWLEDGED)(state),
|
||||||
user: selectUser(state),
|
user: selectUser(state),
|
||||||
modalsAllowed: selectModalsAllowed(state),
|
|
||||||
notification: selectNotification(state),
|
notification: selectNotification(state),
|
||||||
notificationProps: selectNotificationProps(state),
|
notificationProps: selectNotificationProps(state),
|
||||||
});
|
});
|
||||||
|
|
|
@ -107,6 +107,11 @@ class ModalRouter extends React.PureComponent {
|
||||||
if (!notification) {
|
if (!notification) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (notification.error) {
|
||||||
|
return <ModalError {...notification} {...notificationProps} />;
|
||||||
|
}
|
||||||
|
|
||||||
switch (notification.id) {
|
switch (notification.id) {
|
||||||
case modals.UPGRADE:
|
case modals.UPGRADE:
|
||||||
return <ModalUpgrade {...notificationProps} />;
|
return <ModalUpgrade {...notificationProps} />;
|
||||||
|
|
|
@ -67,7 +67,7 @@ class ChannelPage extends React.PureComponent<Props> {
|
||||||
} else {
|
} else {
|
||||||
contentList =
|
contentList =
|
||||||
claimsInChannel && claimsInChannel.length ? (
|
claimsInChannel && claimsInChannel.length ? (
|
||||||
<FileList hideFilter fileInfos={claimsInChannel} />
|
<FileList sortByHeight hideFilter fileInfos={claimsInChannel} />
|
||||||
) : (
|
) : (
|
||||||
<span className="empty">{__('No content found.')}</span>
|
<span className="empty">{__('No content found.')}</span>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { selectMyClaimsWithoutChannels } from 'lbry-redux';
|
import { selectMyClaimsWithoutChannels } from 'lbry-redux';
|
||||||
import { selectPendingPublishesLessEdits } from 'redux/selectors/publish';
|
import { selectPendingPublishes } from 'redux/selectors/publish';
|
||||||
import { doNavigate } from 'redux/actions/navigation';
|
import { doNavigate } from 'redux/actions/navigation';
|
||||||
import { doCheckPendingPublishes } from 'redux/actions/publish';
|
import { doCheckPendingPublishes } from 'redux/actions/publish';
|
||||||
import FileListPublished from './view';
|
import FileListPublished from './view';
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
claims: selectMyClaimsWithoutChannels(state),
|
claims: selectMyClaimsWithoutChannels(state),
|
||||||
pendingPublishes: selectPendingPublishesLessEdits(state),
|
pendingPublishes: selectPendingPublishes(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -3,7 +3,14 @@ import isDev from 'electron-is-dev';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import * as MODALS from 'constants/modal_types';
|
import * as MODALS from 'constants/modal_types';
|
||||||
import { ipcRenderer, remote } from 'electron';
|
import { ipcRenderer, remote } from 'electron';
|
||||||
import { ACTIONS, Lbry, doBalanceSubscribe, doFetchFileInfosAndPublishedClaims } from 'lbry-redux';
|
import {
|
||||||
|
ACTIONS,
|
||||||
|
Lbry,
|
||||||
|
doBalanceSubscribe,
|
||||||
|
doFetchFileInfosAndPublishedClaims,
|
||||||
|
doNotify,
|
||||||
|
selectNotification,
|
||||||
|
} from 'lbry-redux';
|
||||||
import Native from 'native';
|
import Native from 'native';
|
||||||
import { doFetchRewardedContent } from 'redux/actions/content';
|
import { doFetchRewardedContent } from 'redux/actions/content';
|
||||||
import { doFetchDaemonSettings } from 'redux/actions/settings';
|
import { doFetchDaemonSettings } from 'redux/actions/settings';
|
||||||
|
@ -12,7 +19,6 @@ import { doAuthenticate } from 'redux/actions/user';
|
||||||
import { doPause } from 'redux/actions/media';
|
import { doPause } from 'redux/actions/media';
|
||||||
import { doCheckSubscriptions } from 'redux/actions/subscriptions';
|
import { doCheckSubscriptions } from 'redux/actions/subscriptions';
|
||||||
import {
|
import {
|
||||||
selectCurrentModal,
|
|
||||||
selectIsUpgradeSkipped,
|
selectIsUpgradeSkipped,
|
||||||
selectUpdateUrl,
|
selectUpdateUrl,
|
||||||
selectUpgradeDownloadItem,
|
selectUpgradeDownloadItem,
|
||||||
|
@ -83,12 +89,11 @@ export function doDownloadUpgrade() {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.UPGRADE_DOWNLOAD_STARTED,
|
type: ACTIONS.UPGRADE_DOWNLOAD_STARTED,
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch(
|
||||||
type: ACTIONS.CREATE_NOTIFICATION,
|
doNotify({
|
||||||
data: {
|
id: MODALS.DOWNLOADING,
|
||||||
modal: MODALS.DOWNLOADING,
|
})
|
||||||
},
|
);
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,17 +115,19 @@ export function doDownloadUpgradeRequested() {
|
||||||
// electron-updater behavior
|
// electron-updater behavior
|
||||||
if (autoUpdateDeclined) {
|
if (autoUpdateDeclined) {
|
||||||
// The user declined an update before, so show the "confirm" dialog
|
// The user declined an update before, so show the "confirm" dialog
|
||||||
dispatch({
|
dispatch(
|
||||||
type: ACTIONS.CREATE_NOTIFICATION,
|
doNotify({
|
||||||
data: { modal: MODALS.AUTO_UPDATE_CONFIRM },
|
id: MODALS.AUTO_UPDATE_CONFIRM,
|
||||||
});
|
})
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
// The user was never shown the original update dialog (e.g. because they were
|
// The user was never shown the original update dialog (e.g. because they were
|
||||||
// watching a video). So show the inital "update downloaded" dialog.
|
// watching a video). So show the inital "update downloaded" dialog.
|
||||||
dispatch({
|
dispatch(
|
||||||
type: ACTIONS.CREATE_NOTIFICATION,
|
doNotify({
|
||||||
data: { modal: MODALS.AUTO_UPDATE_DOWNLOADED },
|
id: MODALS.AUTO_UPDATE_DOWNLOADED,
|
||||||
});
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Old behavior for Linux
|
// Old behavior for Linux
|
||||||
|
@ -135,10 +142,11 @@ export function doAutoUpdate() {
|
||||||
type: ACTIONS.AUTO_UPDATE_DOWNLOADED,
|
type: ACTIONS.AUTO_UPDATE_DOWNLOADED,
|
||||||
});
|
});
|
||||||
|
|
||||||
dispatch({
|
dispatch(
|
||||||
type: ACTIONS.CREATE_NOTIFICATION,
|
doNotify({
|
||||||
data: { modal: MODALS.AUTO_UPDATE_DOWNLOADED },
|
id: MODALS.AUTO_UPDATE_DOWNLOADED,
|
||||||
});
|
})
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,15 +211,14 @@ export function doCheckUpgradeAvailable() {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
upgradeAvailable &&
|
upgradeAvailable &&
|
||||||
!selectCurrentModal(state) &&
|
!selectNotification(state) &&
|
||||||
(!selectIsUpgradeSkipped(state) || remoteVersion !== selectRemoteVersion(state))
|
(!selectIsUpgradeSkipped(state) || remoteVersion !== selectRemoteVersion(state))
|
||||||
) {
|
) {
|
||||||
dispatch({
|
dispatch(
|
||||||
type: ACTIONS.CREATE_NOTIFICATION,
|
doNotify({
|
||||||
data: {
|
id: MODALS.UPGRADE,
|
||||||
modal: MODALS.UPGRADE,
|
})
|
||||||
},
|
);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -256,13 +263,12 @@ export function doCheckDaemonVersion() {
|
||||||
|
|
||||||
export function doAlertError(errorList) {
|
export function doAlertError(errorList) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch(
|
||||||
type: ACTIONS.CREATE_NOTIFICATION,
|
doNotify({
|
||||||
data: {
|
id: MODALS.ERROR,
|
||||||
modal: MODALS.ERROR,
|
error: errorList,
|
||||||
modalProps: { error: errorList },
|
})
|
||||||
},
|
);
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,7 +334,9 @@ export function doChangeVolume(volume) {
|
||||||
export function doConditionalAuthNavigate(newSession) {
|
export function doConditionalAuthNavigate(newSession) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
if (newSession || selectCurrentModal(state) !== 'email_collection') {
|
const notification = selectNotification(state);
|
||||||
|
|
||||||
|
if (newSession || (notification && notification.id !== 'email_collection')) {
|
||||||
dispatch(doAuthNavigate());
|
dispatch(doAuthNavigate());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -150,7 +150,7 @@ export const doPublish = (params: PublishParams) => (dispatch: Dispatch, getStat
|
||||||
|
|
||||||
const failure = error => {
|
const failure = error => {
|
||||||
dispatch({ type: ACTIONS.PUBLISH_FAIL });
|
dispatch({ type: ACTIONS.PUBLISH_FAIL });
|
||||||
dispatch(doNotify({ id: MODALS.ERROR }, { error: error.message }));
|
dispatch(doNotify({ id: MODALS.ERROR, error: error.message }));
|
||||||
};
|
};
|
||||||
|
|
||||||
return Lbry.publish(publishPayload).then(success, failure);
|
return Lbry.publish(publishPayload).then(success, failure);
|
||||||
|
|
|
@ -136,8 +136,12 @@ export default handleActions(
|
||||||
[ACTIONS.PUBLISH_SUCCESS]: (state: PublishState, action): PublishState => {
|
[ACTIONS.PUBLISH_SUCCESS]: (state: PublishState, action): PublishState => {
|
||||||
const { pendingPublish } = action.data;
|
const { pendingPublish } = action.data;
|
||||||
|
|
||||||
|
// If it's an edit, don't create a pending publish
|
||||||
|
// It will take some more work to know when an edit is confirmed
|
||||||
const newPendingPublishes = state.pendingPublishes.slice();
|
const newPendingPublishes = state.pendingPublishes.slice();
|
||||||
|
if (!pendingPublish.isEdit) {
|
||||||
newPendingPublishes.push(pendingPublish);
|
newPendingPublishes.push(pendingPublish);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
|
|
|
@ -41,8 +41,6 @@ export const selectUpgradeFilename = createSelector(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectCurrentModal = createSelector(selectState, state => state.modal);
|
|
||||||
|
|
||||||
export const selectDownloadProgress = createSelector(selectState, state => state.downloadProgress);
|
export const selectDownloadProgress = createSelector(selectState, state => state.downloadProgress);
|
||||||
|
|
||||||
export const selectDownloadComplete = createSelector(
|
export const selectDownloadComplete = createSelector(
|
||||||
|
@ -66,10 +64,6 @@ export const selectAutoUpdateDeclined = createSelector(
|
||||||
state => state.autoUpdateDeclined
|
state => state.autoUpdateDeclined
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectModalsAllowed = createSelector(selectState, state => state.modalsAllowed);
|
|
||||||
|
|
||||||
export const selectModalProps = createSelector(selectState, state => state.modalProps);
|
|
||||||
|
|
||||||
export const selectDaemonVersionMatched = createSelector(
|
export const selectDaemonVersionMatched = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => state.daemonVersionMatched
|
state => state.daemonVersionMatched
|
||||||
|
|
|
@ -8,11 +8,6 @@ export const selectPendingPublishes = createSelector(
|
||||||
state => state.pendingPublishes.map(pendingClaim => ({ ...pendingClaim, pending: true })) || []
|
state => state.pendingPublishes.map(pendingClaim => ({ ...pendingClaim, pending: true })) || []
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectPendingPublishesLessEdits = createSelector(
|
|
||||||
selectPendingPublishes,
|
|
||||||
pendingPublishes => pendingPublishes.filter(pendingPublish => !pendingPublish.isEdit)
|
|
||||||
);
|
|
||||||
|
|
||||||
export const selectPublishFormValues = createSelector(selectState, state => {
|
export const selectPublishFormValues = createSelector(selectState, state => {
|
||||||
const { pendingPublish, ...formValues } = state;
|
const { pendingPublish, ...formValues } = state;
|
||||||
return formValues;
|
return formValues;
|
||||||
|
@ -27,6 +22,6 @@ export const selectPendingPublish = uri =>
|
||||||
}
|
}
|
||||||
|
|
||||||
return pendingPublishes.filter(
|
return pendingPublishes.filter(
|
||||||
publish => publish.name === claimName || publish.name === contentName
|
publish => (publish.name === claimName || publish.name === contentName) && !publish.isEdit
|
||||||
)[0];
|
)[0];
|
||||||
});
|
});
|
||||||
|
|
|
@ -160,6 +160,7 @@ p {
|
||||||
'nav header'
|
'nav header'
|
||||||
'nav content';
|
'nav content';
|
||||||
background-color: var(--color-bg);
|
background-color: var(--color-bg);
|
||||||
|
height: 100vh;
|
||||||
|
|
||||||
@media only screen and (min-width: $medium-breakpoint) {
|
@media only screen and (min-width: $medium-breakpoint) {
|
||||||
grid-template-columns: var(--side-nav-width-m) auto;
|
grid-template-columns: var(--side-nav-width-m) auto;
|
||||||
|
@ -246,7 +247,7 @@ p {
|
||||||
|
|
||||||
/* Custom text selection */
|
/* Custom text selection */
|
||||||
*::selection {
|
*::selection {
|
||||||
background: var(--text-selection-bg);
|
background: var(--color-primary-light);
|
||||||
color: var(--text-selection-color);
|
color: var(--text-selection-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ $large-breakpoint: 1760px;
|
||||||
--color-green: #399483;
|
--color-green: #399483;
|
||||||
--color-green-light: #effbe4;
|
--color-green-light: #effbe4;
|
||||||
--color-green-blue: #2ec1a8;
|
--color-green-blue: #2ec1a8;
|
||||||
|
--color-purple: #8165b0;
|
||||||
|
|
||||||
/* Colors */
|
/* Colors */
|
||||||
--color-divider: #e3e3e3;
|
--color-divider: #e3e3e3;
|
||||||
|
@ -57,7 +58,7 @@ $large-breakpoint: 1760px;
|
||||||
--text-help-color: var(--color-help);
|
--text-help-color: var(--color-help);
|
||||||
--text-max-width: 660px;
|
--text-max-width: 660px;
|
||||||
--text-link-padding: 4px;
|
--text-link-padding: 4px;
|
||||||
--text-selection-bg: rgba(saturate(lighten(#155b4a, 20%), 20%), 1); // temp color
|
--text-selection-bg: var(--color-purple);
|
||||||
--text-selection-color: #fff;
|
--text-selection-color: #fff;
|
||||||
|
|
||||||
/* Form */
|
/* Form */
|
||||||
|
@ -111,7 +112,7 @@ $large-breakpoint: 1760px;
|
||||||
--header-bg: var(--color-white);
|
--header-bg: var(--color-white);
|
||||||
--header-color: var(--color-text);
|
--header-color: var(--color-text);
|
||||||
--header-active-color: rgba(0, 0, 0, 0.85);
|
--header-active-color: rgba(0, 0, 0, 0.85);
|
||||||
--header-height: $spacing-width * 3;
|
--header-height: 75px;
|
||||||
--header-button-bg: transparent;
|
--header-button-bg: transparent;
|
||||||
--header-button-hover-bg: rgba(100, 100, 100, 0.15);
|
--header-button-hover-bg: rgba(100, 100, 100, 0.15);
|
||||||
--header-primary-color: var(--color-primary);
|
--header-primary-color: var(--color-primary);
|
||||||
|
@ -139,7 +140,6 @@ $large-breakpoint: 1760px;
|
||||||
--card-bg: var(--color-white);
|
--card-bg: var(--color-white);
|
||||||
--card-text-color: var(--color-grey-dark);
|
--card-text-color: var(--color-grey-dark);
|
||||||
--card-radius: 2px;
|
--card-radius: 2px;
|
||||||
--card-margin: $spacing-vertical * 2/3;
|
|
||||||
--card-wallet-color: var(--text-color-inverse);
|
--card-wallet-color: var(--text-color-inverse);
|
||||||
--success-msg-color: var(--color-green);
|
--success-msg-color: var(--color-green);
|
||||||
--success-msg-border: var(--color-green-blue);
|
--success-msg-border: var(--color-green-blue);
|
||||||
|
|
|
@ -169,15 +169,11 @@ button:disabled {
|
||||||
|
|
||||||
.btn.btn--header-balance {
|
.btn.btn--header-balance {
|
||||||
font-family: 'metropolis-medium';
|
font-family: 'metropolis-medium';
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
color: var(--header-primary-color);
|
color: var(--header-primary-color);
|
||||||
|
|
||||||
@media only screen and (min-width: $medium-breakpoint) {
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (min-width: $large-breakpoint) {
|
@media only screen and (min-width: $large-breakpoint) {
|
||||||
font-size: 21px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn__label--balance {
|
.btn__label--balance {
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.card__content {
|
.card__content {
|
||||||
margin-top: var(--card-margin);
|
margin-top: $spacing-vertical * 2/3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card__subtext-title {
|
.card__subtext-title {
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.card__actions {
|
.card__actions {
|
||||||
margin-top: var(--card-margin);
|
margin-top: $spacing-vertical * 2/3;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
&:not(.card__actions--vertical) .btn:nth-child(n + 2) {
|
&:not(.card__actions--vertical) .btn:nth-child(n + 2) {
|
||||||
|
|
|
@ -86,7 +86,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal__button {
|
.modal__button {
|
||||||
margin: 0px 6px;
|
margin: 0px $spacing-vertical * 1/3;
|
||||||
|
|
||||||
|
&.btn--link {
|
||||||
|
// So the text isn't bigger than the text inside the button
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-modal-overlay {
|
.error-modal-overlay {
|
||||||
|
@ -119,7 +124,7 @@
|
||||||
list-style: none;
|
list-style: none;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
max-width: var(--modal-width);
|
max-width: var(--modal-width);
|
||||||
overflow-y: hidden;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-modal__content p {
|
.error-modal__content p {
|
||||||
|
|
|
@ -82,10 +82,10 @@ table.table--help {
|
||||||
|
|
||||||
table.table--transactions {
|
table.table--transactions {
|
||||||
td:nth-of-type(1) {
|
td:nth-of-type(1) {
|
||||||
width: 17.5%;
|
width: 25%;
|
||||||
}
|
}
|
||||||
td:nth-of-type(2) {
|
td:nth-of-type(2) {
|
||||||
width: 27.5%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
td:nth-of-type(3) {
|
td:nth-of-type(3) {
|
||||||
width: 22.5%;
|
width: 22.5%;
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
--header-active-color: rgba(0, 0, 0, 0.85);
|
--header-active-color: rgba(0, 0, 0, 0.85);
|
||||||
--header-button-bg: transparent;
|
--header-button-bg: transparent;
|
||||||
--header-button-hover-bg: rgba(100, 100, 100, 0.15);
|
--header-button-hover-bg: rgba(100, 100, 100, 0.15);
|
||||||
--header-primary-color: #8165B0;
|
--header-primary-color: var(--color-purple);
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
--header-color: #CCC;
|
--header-color: #CCC;
|
||||||
|
|
Loading…
Add table
Reference in a new issue