@@ -249,29 +250,6 @@ class OrderPage extends Component {
}
};
- LinearDeterminate =()=> {
- const [progress, setProgress] = React.useState(0);
-
- React.useEffect(() => {
- const timer = setInterval(() => {
- setProgress((oldProgress) => {
- var left = calcTimeDelta( new Date(this.state.expires_at)).total /1000;
- return (left / this.state.total_secs_exp) * 100;
- });
- }, 1000);
-
- return () => {
- clearInterval(timer);
- };
- }, []);
-
- return (
-
-
-
- );
- }
-
takeOrder=()=>{
this.setState({loading:true})
const requestOptions = {
@@ -378,7 +356,7 @@ class OrderPage extends Component {
StoreTokenDialog = () =>{
const { t } = this.props;
-
+
// If there is a robot cookie, prompt user to store it
// Else, prompt user to generate a robot
if (getCookie("robot_token")){
@@ -517,7 +495,7 @@ class OrderPage extends Component {
return(
-
+ {this.CancelDialog()}
@@ -528,7 +506,7 @@ class OrderPage extends Component {
if ([8,9].includes(this.state.status)){
return(
-
+ {this.CollaborativeCancelDialog()}
)}
@@ -682,7 +660,7 @@ class OrderPage extends Component {
-
+
{/* If the user has a penalty/limit */}
@@ -728,8 +706,8 @@ class OrderPage extends Component {
{/* Participants can see the "Cancel" Button, but cannot see the "Back" or "Take Order" buttons */}
{this.state.is_participant ?
<>
-
-
+ {this.CancelButton()}
+ {this.BackButton()}
>
:
@@ -768,27 +746,21 @@ class OrderPage extends Component {
doubleOrderPagePhone=()=>{
const { t } = this.props;
- const [value, setValue] = React.useState(this.state.showContractBox);
-
- const handleChange = (event, newValue) => {
- this.setState({showContractBox:newValue})
- setValue(newValue);
- };
return(
-
-
-
+
+ this.setState({tabValue:0})}/>
+ this.setState({tabValue:1})}/>
-
+
{this.orderBox()}
-
+
@@ -813,12 +785,12 @@ class OrderPage extends Component {
<>
{/* Desktop View */}
-
+ {this.doubleOrderPageDesktop()}
{/* SmarPhone View */}
-
+ {this.doubleOrderPagePhone()}
>
:
diff --git a/frontend/src/components/TradeBox.js b/frontend/src/components/TradeBox.js
index c4b0fa08..325c60e3 100644
--- a/frontend/src/components/TradeBox.js
+++ b/frontend/src/components/TradeBox.js
@@ -271,7 +271,7 @@ class TradeBox extends Component {
return (
{/* Make confirmation sound for HTLC received. */}
-
+ {this.Sound(soundFileName="locked-invoice")}
@@ -308,7 +308,7 @@ class TradeBox extends Component {
return (
{/* Make bell sound when taker is found */}
-
+ {this.Sound(soundFileName="taker-found")}
{t("A taker has been found!")} {" " + this.stepXofY()}
@@ -387,8 +387,8 @@ class TradeBox extends Component {
return (
{/* Make confirmation sound for HTLC received. */}
-
-
+ {this.Sound(soundFileName="locked-invoice")}
+ {this.EnableTelegramDialog()}
{t("Your order is public")} {" " + this.stepXofY()}
@@ -566,7 +566,7 @@ class TradeBox extends Component {
{/* Make confirmation sound for HTLC received. */}
-
+ {this.Sound(soundFileName="locked-invoice")}
{t("Submit an invoice for {{amountSats}} Sats",{amountSats: pn(this.props.data.invoice_amount)})}
{" " + this.stepXofY()}
@@ -762,7 +762,7 @@ class TradeBox extends Component {
return(
{/* Make confirmation sound for HTLC received. */}
-
+ {this.Sound(soundFileName="locked-invoice")}
{t("The trade collateral is locked!")} {" " + this.stepXofY()}
@@ -945,7 +945,7 @@ handleRatingRobosatsChange=(e)=>{
return(
{/* Make confirmation sound for Chat Open. */}
-
+ {this.Sound(soundFileName="chat-open")}
{this.props.data.is_seller ? t("Chat with the buyer"): t("Chat with the seller")} {" " + this.stepXofY()}
@@ -989,7 +989,7 @@ handleRatingRobosatsChange=(e)=>{
return(
{/* Make confirmation sound for Chat Open. */}
-
+ {this.Sound(soundFileName="successful")}
{t("🎉Trade finished!🥳")}
@@ -1152,8 +1152,8 @@ handleRatingRobosatsChange=(e)=>{
const { t } = this.props;
return (
-
-
+ {this.ConfirmDisputeDialog()}
+ {this.ConfirmFiatReceivedDialog()}
diff --git a/frontend/src/components/UserGenPage.js b/frontend/src/components/UserGenPage.js
index 1170b1fc..291d5251 100644
--- a/frontend/src/components/UserGenPage.js
+++ b/frontend/src/components/UserGenPage.js
@@ -237,7 +237,7 @@ class UserGenPage extends Component {
-
+ {this.InfoDialog()}