mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 01:35:11 +00:00
better label for submit button
This commit is contained in:
parent
dd5aada7ec
commit
a28b4b0c87
1 changed files with 11 additions and 3 deletions
|
@ -48,6 +48,7 @@ class PublishForm extends React.PureComponent {
|
||||||
isFee: false,
|
isFee: false,
|
||||||
customUrl: false,
|
customUrl: false,
|
||||||
source: null,
|
source: null,
|
||||||
|
mode: "publish",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,6 +284,7 @@ class PublishForm extends React.PureComponent {
|
||||||
} = claimInfo.value.stream.metadata;
|
} = claimInfo.value.stream.metadata;
|
||||||
|
|
||||||
let newState = {
|
let newState = {
|
||||||
|
mode: "edit",
|
||||||
meta_title: title,
|
meta_title: title,
|
||||||
meta_thumbnail: thumbnail,
|
meta_thumbnail: thumbnail,
|
||||||
meta_description: description,
|
meta_description: description,
|
||||||
|
@ -513,10 +515,18 @@ class PublishForm extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { mode, submitting } = this.state;
|
||||||
|
|
||||||
const lbcInputHelp = __(
|
const lbcInputHelp = __(
|
||||||
"This LBC remains yours and the deposit can be undone at any time."
|
"This LBC remains yours and the deposit can be undone at any time."
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let submitLabel = !submitting ? __("Publish") : __("Publishing...");
|
||||||
|
|
||||||
|
if (mode === "edit") {
|
||||||
|
submitLabel = !submitting ? __("Update") : __("Updating...");
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="main--single-column">
|
<main className="main--single-column">
|
||||||
<form
|
<form
|
||||||
|
@ -859,9 +869,7 @@ class PublishForm extends React.PureComponent {
|
||||||
<div className="card-series-submit">
|
<div className="card-series-submit">
|
||||||
<Link
|
<Link
|
||||||
button="primary"
|
button="primary"
|
||||||
label={
|
label={submitLabel}
|
||||||
!this.state.submitting ? __("Publish") : __("Publishing...")
|
|
||||||
}
|
|
||||||
onClick={event => {
|
onClick={event => {
|
||||||
this.handleSubmit(event);
|
this.handleSubmit(event);
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue