cleanup publish modal behavior to work better on lbry.tv
This commit is contained in:
parent
39f0f97be0
commit
0fb4f6f96d
4 changed files with 14 additions and 10 deletions
|
@ -55,7 +55,6 @@ export default function apiPublishCallViaWeb(
|
|||
|
||||
xhr.onabort = () => {
|
||||
window.store.dispatch(doUpdateUploadProgress(undefined, params));
|
||||
reject(new Error(__('You aborted your publish upload')));
|
||||
};
|
||||
xhr.send(body);
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@ import { CHANNEL_NEW, CHANNEL_ANONYMOUS, INVALID_NAME_ERROR } from 'constants/cl
|
|||
|
||||
type Props = {
|
||||
channel: string, // currently selected channel
|
||||
channels: ?Array<{ name: string }>,
|
||||
channels: ?Array<ChannelClaim>,
|
||||
balance: number,
|
||||
onChannelChange: string => void,
|
||||
createChannel: (string, number) => Promise<any>,
|
||||
|
@ -168,8 +168,8 @@ class ChannelSection extends React.PureComponent<Props, State> {
|
|||
>
|
||||
<option value={CHANNEL_ANONYMOUS}>{__('Anonymous')}</option>
|
||||
{channels &&
|
||||
channels.map(({ name }) => (
|
||||
<option key={name} value={name}>
|
||||
channels.map(({ name, claim_id: claimId }) => (
|
||||
<option key={claimId} value={name}>
|
||||
{name}
|
||||
</option>
|
||||
))}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import { Modal } from 'modal/modal';
|
||||
import ClaimPreview from 'component/claimPreview';
|
||||
|
||||
type Props = {
|
||||
closeModal: () => void,
|
||||
|
@ -27,16 +28,18 @@ class ModalPublishSuccess extends React.PureComponent<Props> {
|
|||
navigate('/$/published');
|
||||
closeModal();
|
||||
}}
|
||||
confirmButtonLabel={'Show me!'}
|
||||
confirmButtonLabel={'View My Publishes'}
|
||||
abortButtonLabel={'Thanks!'}
|
||||
onAborted={() => {
|
||||
clearPublish();
|
||||
closeModal();
|
||||
}}
|
||||
>
|
||||
<p>{__(`Your ${publishMessage} published to LBRY at the address`)}</p>
|
||||
<blockquote>{uri}</blockquote>
|
||||
<p>
|
||||
<p className="card__subtitle">{__(`Your %publishMessage% published to LBRY.`, { publishMessage })}</p>
|
||||
<div className="card--inline">
|
||||
<ClaimPreview uri={uri} />
|
||||
</div>
|
||||
<p className="help">
|
||||
{__(
|
||||
`The ${publishType} will take a few minutes to appear for other LBRY users. Until then it will be listed as "pending" under your published files.`
|
||||
)}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
// @flow
|
||||
import * as MODALS from 'constants/modal_types';
|
||||
import { batchActions, doError, selectMyClaims, doPublish, doCheckPendingPublishes } from 'lbry-redux';
|
||||
import * as ACTIONS from 'constants/action_types';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import { batchActions, doError, selectMyClaims, doPublish, doCheckPendingPublishes } from 'lbry-redux';
|
||||
import { selectosNotificationsEnabled } from 'redux/selectors/settings';
|
||||
import { push } from 'connected-react-router';
|
||||
import analytics from 'analytics';
|
||||
|
@ -46,7 +47,8 @@ export const doPublishDesktop = () => (dispatch: Dispatch, getState: () => {}) =
|
|||
dispatch(batchActions(...actions));
|
||||
};
|
||||
|
||||
return dispatch(doPublish(publishSuccess, publishFail));
|
||||
dispatch(push(`/$/${PAGES.PUBLISHED}`));
|
||||
dispatch(doPublish(publishSuccess, publishFail));
|
||||
};
|
||||
|
||||
// Calls claim_list_mine until any pending publishes are confirmed
|
||||
|
|
Loading…
Add table
Reference in a new issue