Rebranding: 'Publish' --> 'Upload'; Use LBC icon
This commit is contained in:
parent
985aada5e4
commit
ef12914cad
2 changed files with 21 additions and 6 deletions
|
@ -7,6 +7,7 @@ import Card from 'component/common/card';
|
||||||
import Tag from 'component/tag';
|
import Tag from 'component/tag';
|
||||||
import MarkdownPreview from 'component/common/markdown-preview';
|
import MarkdownPreview from 'component/common/markdown-preview';
|
||||||
import { COPYRIGHT, OTHER } from 'constants/licenses';
|
import { COPYRIGHT, OTHER } from 'constants/licenses';
|
||||||
|
import LbcSymbol from 'component/common/lbc-symbol';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
filePath: string | WebFile,
|
filePath: string | WebFile,
|
||||||
|
@ -97,8 +98,8 @@ class ModalPublishPreview extends React.PureComponent<Props> {
|
||||||
isStillEditing,
|
isStillEditing,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const modalTitle = isStillEditing ? __('Confirm Edit') : __('Confirm Publish');
|
const modalTitle = isStillEditing ? __('Confirm Edit') : __('Confirm Upload');
|
||||||
const confirmBtnText = isStillEditing ? __('Save') : __('Publish');
|
const confirmBtnText = isStillEditing ? __('Save') : __('Upload');
|
||||||
const txFee = previewResponse ? previewResponse['total_fee'] : null;
|
const txFee = previewResponse ? previewResponse['total_fee'] : null;
|
||||||
const isOptimizeAvail = filePath && filePath !== '' && isVid && ffmpegStatus.available;
|
const isOptimizeAvail = filePath && filePath !== '' && isVid && ffmpegStatus.available;
|
||||||
|
|
||||||
|
@ -125,6 +126,17 @@ class ModalPublishPreview extends React.PureComponent<Props> {
|
||||||
// Do nothing for onClick(). Setting to 'null' results in "View Tag" action -- we don't want to leave the modal.
|
// Do nothing for onClick(). Setting to 'null' results in "View Tag" action -- we don't want to leave the modal.
|
||||||
tags.map(tag => <Tag key={tag.name} title={tag.name} name={tag.name} type={'flow'} onClick={() => {}} />);
|
tags.map(tag => <Tag key={tag.name} title={tag.name} name={tag.name} type={'flow'} onClick={() => {}} />);
|
||||||
|
|
||||||
|
const depositValue = bid ? <LbcSymbol postfix={`${bid}`} size={14} /> : <p>---</p>;
|
||||||
|
|
||||||
|
let priceValue = __('Free');
|
||||||
|
if (!contentIsFree) {
|
||||||
|
if (fee.currency === 'LBC') {
|
||||||
|
priceValue = <LbcSymbol postfix={fee.amount} />;
|
||||||
|
} else {
|
||||||
|
priceValue = `${fee.amount} ${fee.currency}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal isOpen contentLabel={modalTitle} type="card" onAborted={closeModal}>
|
<Modal isOpen contentLabel={modalTitle} type="card" onAborted={closeModal}>
|
||||||
<Form onSubmit={() => this.onConfirmed()}>
|
<Form onSubmit={() => this.onConfirmed()}>
|
||||||
|
@ -141,8 +153,8 @@ class ModalPublishPreview extends React.PureComponent<Props> {
|
||||||
{this.createRow(__('Description'), descriptionValue)}
|
{this.createRow(__('Description'), descriptionValue)}
|
||||||
{this.createRow(__('Channel'), channel)}
|
{this.createRow(__('Channel'), channel)}
|
||||||
{this.createRow(__('URL'), uri)}
|
{this.createRow(__('URL'), uri)}
|
||||||
{this.createRow(__('Deposit'), bid ? `${bid} LBC` : '---')}
|
{this.createRow(__('Deposit'), depositValue)}
|
||||||
{this.createRow(__('Price'), contentIsFree ? __('Free') : `${fee.amount} ${fee.currency}`)}
|
{this.createRow(__('Price'), priceValue)}
|
||||||
{this.createRow(__('Language'), language)}
|
{this.createRow(__('Language'), language)}
|
||||||
{this.createRow(__('License'), licenseValue)}
|
{this.createRow(__('License'), licenseValue)}
|
||||||
{this.createRow(__('Tags'), tagsValue)}
|
{this.createRow(__('Tags'), tagsValue)}
|
||||||
|
@ -151,7 +163,10 @@ class ModalPublishPreview extends React.PureComponent<Props> {
|
||||||
</div>
|
</div>
|
||||||
{txFee && (
|
{txFee && (
|
||||||
<div className="section" aria-label={__('Estimated transaction fee:')}>
|
<div className="section" aria-label={__('Estimated transaction fee:')}>
|
||||||
<b>{__('Est. transaction fee:')}</b> <em>{txFee}</em> LBC
|
<b>{__('Est. transaction fee:')}</b>
|
||||||
|
<em>
|
||||||
|
<LbcSymbol postfix={txFee} />
|
||||||
|
</em>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -507,7 +507,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Card title={__('Publish Settings')} actions={<PublishSettings />} />
|
<Card title={__('Upload Settings')} actions={<PublishSettings />} />
|
||||||
|
|
||||||
{/* @if TARGET='app' */}
|
{/* @if TARGET='app' */}
|
||||||
{/* Auto launch in a hidden state doesn't work on mac https://github.com/Teamwork/node-auto-launch/issues/81 */}
|
{/* Auto launch in a hidden state doesn't work on mac https://github.com/Teamwork/node-auto-launch/issues/81 */}
|
||||||
|
|
Loading…
Add table
Reference in a new issue