mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 01:35:11 +00:00
Small changes
Clicking support hides everything below fileActions Title of form is Support now One line helper sentence Moved Tx related component to internal Unfiltered -> Show All -> All Claims -> Publishes Fee below Amount(class meta) Dropped Credits everywhere.
This commit is contained in:
parent
f1bdb5e20d
commit
065d699a2d
9 changed files with 81 additions and 53 deletions
|
@ -1,10 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import { connect } from "react-redux";
|
|
||||||
import { doNavigate } from "actions/navigation";
|
|
||||||
import TransactionTableBody from "./view";
|
|
||||||
|
|
||||||
const perform = dispatch => ({
|
|
||||||
navigate: (path, params) => dispatch(doNavigate(path, params)),
|
|
||||||
});
|
|
||||||
|
|
||||||
export default connect(null, perform)(TransactionTableBody);
|
|
|
@ -71,6 +71,7 @@ export class CreditAmount extends React.PureComponent {
|
||||||
showFullPrice: React.PropTypes.bool,
|
showFullPrice: React.PropTypes.bool,
|
||||||
showPlus: React.PropTypes.bool,
|
showPlus: React.PropTypes.bool,
|
||||||
look: React.PropTypes.oneOf(["indicator", "plain"]),
|
look: React.PropTypes.oneOf(["indicator", "plain"]),
|
||||||
|
fee: React.PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
|
@ -81,6 +82,7 @@ export class CreditAmount extends React.PureComponent {
|
||||||
showFree: false,
|
showFree: false,
|
||||||
showFullPrice: false,
|
showFullPrice: false,
|
||||||
showPlus: false,
|
showPlus: false,
|
||||||
|
fee: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -117,7 +119,10 @@ export class CreditAmount extends React.PureComponent {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
className={`credit-amount credit-amount--${this.props.look}`}
|
className={`credit-amount credit-amount--${this.props.look} ${this.props
|
||||||
|
.fee
|
||||||
|
? " meta"
|
||||||
|
: ""}`}
|
||||||
title={fullPrice}
|
title={fullPrice}
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import { connect } from "react-redux";
|
|
||||||
import TransactionTableHeader from "./view";
|
|
||||||
|
|
||||||
export default connect(null, null)(TransactionTableHeader);
|
|
|
@ -32,7 +32,13 @@ class TipLink extends React.PureComponent {
|
||||||
return (
|
return (
|
||||||
<div className="card__content">
|
<div className="card__content">
|
||||||
<div className="card__title-primary">
|
<div className="card__title-primary">
|
||||||
<h4>{__("Support Claim")}</h4>
|
<h4>{__("Support")}</h4>
|
||||||
|
</div>
|
||||||
|
<div className="card__content">
|
||||||
|
{__(
|
||||||
|
"Support the creator and the success of their content by sending a tip. "
|
||||||
|
)}
|
||||||
|
<Link label={__("Learn more")} href="https://lbry.io/faq/tipping" />
|
||||||
</div>
|
</div>
|
||||||
<div className="card__content">
|
<div className="card__content">
|
||||||
<FormRow
|
<FormRow
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
import { doNavigate } from "actions/navigation";
|
||||||
import TransactionList from "./view";
|
import TransactionList from "./view";
|
||||||
|
|
||||||
export default connect(null, null)(TransactionList);
|
const perform = dispatch => ({
|
||||||
|
navigate: (path, params) => dispatch(doNavigate(path, params)),
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(null, perform)(TransactionList);
|
||||||
|
|
|
@ -11,10 +11,7 @@ class TransactionTableBody extends React.PureComponent {
|
||||||
let uri = `lbry://${claim_name}#${claim_id}`;
|
let uri = `lbry://${claim_name}#${claim_id}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a
|
<a className="button-text" onClick={() => this.props.navigate(uri)}>
|
||||||
className="button-text"
|
|
||||||
onClick={() => this.props.navigate("/show", { uri })}
|
|
||||||
>
|
|
||||||
{claim_name}
|
{claim_name}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
@ -37,6 +34,15 @@ class TransactionTableBody extends React.PureComponent {
|
||||||
const date = transaction.date;
|
const date = transaction.date;
|
||||||
const fee = transaction.fee;
|
const fee = transaction.fee;
|
||||||
const filter = this.props.filter;
|
const filter = this.props.filter;
|
||||||
|
const options = {
|
||||||
|
weekday: "short",
|
||||||
|
year: "2-digit",
|
||||||
|
month: "short",
|
||||||
|
day: "numeric",
|
||||||
|
hour: "2-digit",
|
||||||
|
minute: "2-digit",
|
||||||
|
second: "2-digit",
|
||||||
|
};
|
||||||
|
|
||||||
if (filter == "tipSupport")
|
if (filter == "tipSupport")
|
||||||
transaction["tipSupport_info"] = transaction["support_info"].filter(
|
transaction["tipSupport_info"] = transaction["support_info"].filter(
|
||||||
|
@ -49,7 +55,7 @@ class TransactionTableBody extends React.PureComponent {
|
||||||
<tr key={`${txid}:${item.nout}`}>
|
<tr key={`${txid}:${item.nout}`}>
|
||||||
<td>
|
<td>
|
||||||
{date
|
{date
|
||||||
? date.toLocaleDateString() + " " + date.toLocaleTimeString()
|
? date.toLocaleDateString("en-US", options)
|
||||||
: <span className="empty">
|
: <span className="empty">
|
||||||
{__("(Transaction pending)")}
|
{__("(Transaction pending)")}
|
||||||
</span>}
|
</span>}
|
||||||
|
@ -58,12 +64,18 @@ class TransactionTableBody extends React.PureComponent {
|
||||||
<CreditAmount
|
<CreditAmount
|
||||||
amount={item.amount}
|
amount={item.amount}
|
||||||
look="plain"
|
look="plain"
|
||||||
|
label={false}
|
||||||
showPlus={true}
|
showPlus={true}
|
||||||
precision={8}
|
precision={8}
|
||||||
/>{" "}
|
/>
|
||||||
</td>
|
<br />
|
||||||
<td>
|
<CreditAmount
|
||||||
<CreditAmount amount={fee} look="plain" precision={8} />{" "}
|
amount={fee}
|
||||||
|
look="plain"
|
||||||
|
fee={true}
|
||||||
|
label={false}
|
||||||
|
precision={8}
|
||||||
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{this.getClaimLink(item.claim_name, item.claim_id)}
|
{this.getClaimLink(item.claim_name, item.claim_id)}
|
||||||
|
@ -77,7 +89,7 @@ class TransactionTableBody extends React.PureComponent {
|
||||||
: <tr key={txid}>
|
: <tr key={txid}>
|
||||||
<td>
|
<td>
|
||||||
{date
|
{date
|
||||||
? date.toLocaleDateString() + " " + date.toLocaleTimeString()
|
? date.toLocaleDateString("en-US", options)
|
||||||
: <span className="empty">
|
: <span className="empty">
|
||||||
{__("(Transaction pending)")}
|
{__("(Transaction pending)")}
|
||||||
</span>}
|
</span>}
|
||||||
|
@ -86,12 +98,18 @@ class TransactionTableBody extends React.PureComponent {
|
||||||
<CreditAmount
|
<CreditAmount
|
||||||
amount={transaction.amount}
|
amount={transaction.amount}
|
||||||
look="plain"
|
look="plain"
|
||||||
|
label={false}
|
||||||
showPlus={true}
|
showPlus={true}
|
||||||
precision={8}
|
precision={8}
|
||||||
/>{" "}
|
/>
|
||||||
</td>
|
<br />
|
||||||
<td>
|
<CreditAmount
|
||||||
<CreditAmount amount={fee} look="plain" precision={8} />{" "}
|
amount={fee}
|
||||||
|
look="plain"
|
||||||
|
fee={true}
|
||||||
|
label={false}
|
||||||
|
precision={8}
|
||||||
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<LinkTransaction id={txid} />
|
<LinkTransaction id={txid} />
|
|
@ -7,8 +7,7 @@ class TransactionTableHeader extends React.PureComponent {
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{__("Date")}</th>
|
<th>{__("Date")}</th>
|
||||||
<th>{__("Amount")}</th>
|
<th>{__("Amount(Fee)")}</th>
|
||||||
<th>{__("Fee")}</th>
|
|
||||||
{filter != "unfiltered" && <th> {__("Claim Name")} </th>}
|
{filter != "unfiltered" && <th> {__("Claim Name")} </th>}
|
||||||
<th>{__("Transaction")}</th>
|
<th>{__("Transaction")}</th>
|
||||||
</tr>
|
</tr>
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import TransactionTableHeader from "component/headerTransactionList";
|
import TransactionTableHeader from "./internal/TransactionListHeader";
|
||||||
import TransactionTableBody from "component/bodyTransactionList";
|
import TransactionTableBody from "./internal/TransactionListBody";
|
||||||
import FormField from "component/formField";
|
import FormField from "component/formField";
|
||||||
|
|
||||||
class TransactionList extends React.PureComponent {
|
class TransactionList extends React.PureComponent {
|
||||||
|
@ -18,6 +18,10 @@ class TransactionList extends React.PureComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleClaimNameClicked(uri) {
|
||||||
|
this.props.navigate("/show", { uri });
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { emptyMessage, transactions } = this.props;
|
const { emptyMessage, transactions } = this.props;
|
||||||
const { filter } = this.state;
|
const { filter } = this.state;
|
||||||
|
@ -38,8 +42,8 @@ class TransactionList extends React.PureComponent {
|
||||||
type="select"
|
type="select"
|
||||||
onChange={this.handleFilterChanged.bind(this)}
|
onChange={this.handleFilterChanged.bind(this)}
|
||||||
>
|
>
|
||||||
<option value="unfiltered">{__("Unfiltered")}</option>
|
<option value="unfiltered">{__("All")}</option>
|
||||||
<option value="claim">{__("Claims")}</option>
|
<option value="claim">{__("Publishes")}</option>
|
||||||
<option value="support">{__("Supports")}</option>
|
<option value="support">{__("Supports")}</option>
|
||||||
<option value="tipSupport">{__("Tips")}</option>
|
<option value="tipSupport">{__("Tips")}</option>
|
||||||
<option value="update">{__("Updates")}</option>
|
<option value="update">{__("Updates")}</option>
|
||||||
|
@ -47,7 +51,11 @@ class TransactionList extends React.PureComponent {
|
||||||
</span>
|
</span>
|
||||||
<table className="table-standard table-stretch">
|
<table className="table-standard table-stretch">
|
||||||
<TransactionTableHeader filter={filter} />
|
<TransactionTableHeader filter={filter} />
|
||||||
<TransactionTableBody transactions={transactions} filter={filter} />
|
<TransactionTableBody
|
||||||
|
transactions={transactions}
|
||||||
|
filter={filter}
|
||||||
|
navigate={this.handleClaimNameClicked.bind(this)}
|
||||||
|
/>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -154,13 +154,14 @@ class FilePage extends React.PureComponent {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card__content card__subtext card__subtext card__subtext--allow-newlines">
|
{!showTipBox &&
|
||||||
<ReactMarkdown
|
<div className="card__content card__subtext card__subtext card__subtext--allow-newlines">
|
||||||
source={(metadata && metadata.description) || ""}
|
<ReactMarkdown
|
||||||
escapeHtml={true}
|
source={(metadata && metadata.description) || ""}
|
||||||
disallowedTypes={["Heading", "HtmlInline", "HtmlBlock"]}
|
escapeHtml={true}
|
||||||
/>
|
disallowedTypes={["Heading", "HtmlInline", "HtmlBlock"]}
|
||||||
</div>
|
/>
|
||||||
|
</div>}
|
||||||
</div>
|
</div>
|
||||||
{metadata && !showTipBox
|
{metadata && !showTipBox
|
||||||
? <div className="card__content">
|
? <div className="card__content">
|
||||||
|
@ -174,13 +175,14 @@ class FilePage extends React.PureComponent {
|
||||||
claim_id={claim.claim_id}
|
claim_id={claim.claim_id}
|
||||||
/>
|
/>
|
||||||
: ""}
|
: ""}
|
||||||
<div className="card__content">
|
{!showTipBox &&
|
||||||
<Link
|
<div className="card__content">
|
||||||
href={`https://lbry.io/dmca?claim_id=${claim.claim_id}`}
|
<Link
|
||||||
label={__("report")}
|
href={`https://lbry.io/dmca?claim_id=${claim.claim_id}`}
|
||||||
className="button-text-help"
|
label={__("report")}
|
||||||
/>
|
className="button-text-help"
|
||||||
</div>
|
/>
|
||||||
|
</div>}
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue