From c9649d58a801a75a579c0f66886feaf27c1fa463 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sat, 7 May 2022 11:24:38 -0700 Subject: [PATCH] Add back lost duplicated tooltip message --- frontend/src/components/BottomBar.js | 22 ++++-- .../FlagWithProps/FlagWithProps.tsx | 2 + frontend/src/components/MakerPage.js | 21 ++--- frontend/src/components/getFlags.js | 78 ------------------- 4 files changed, 29 insertions(+), 94 deletions(-) delete mode 100644 frontend/src/components/getFlags.js diff --git a/frontend/src/components/BottomBar.js b/frontend/src/components/BottomBar.js index 8209ab6d..1eed0055 100644 --- a/frontend/src/components/BottomBar.js +++ b/frontend/src/components/BottomBar.js @@ -335,7 +335,7 @@ class BottomBar extends Component { {!this.state.openClaimRewards ? - + {this.state.earned_rewards+" Sats"} @@ -389,17 +389,23 @@ class BottomBar extends Component { bottomBarDesktop =()=>{ const { t } = this.props; + var hasRewards = this.state.earned_rewards > 0 ? true: false; + var hasOrder = this.state.active_order_id > 0 & !this.state.profileShown & this.props.avatarLoaded ? true : false; + return( {this.StatsDialog()} {this.dialogProfile()} {this.exchangeSummaryDialog()} - +
- 0 ? true: false} title={t("You can claim satoshis!")}> + 0 & !this.state.profileShown) ? "": null} color="primary"> { - + { bottomBarPhone =()=>{ const { t } = this.props; + var hasRewards = this.state.earned_rewards > 0 ? true: false; + var hasOrder = this.state.active_order_id > 0 & !this.state.profileShown & this.props.avatarLoaded ? true : false; return( {this.StatsDialog()} {this.exchangeSummaryDialog()} {this.dialogProfile()} - +
- 0 ? true: false} title={t("You can claim satoshis!")}> + 0 & !this.state.profileShown) ? "": null} color="primary"> { if(code === 'TWD') flag = ; if(code === 'TZS') flag = ; if(code === 'XAF') flag = ; + if(code === 'UAH') flag = ; if(code === 'ANY') flag = ; if(code === 'XAU') flag = ; if(code === 'BTC') flag = ; diff --git a/frontend/src/components/MakerPage.js b/frontend/src/components/MakerPage.js index 1d02d695..eb162865 100644 --- a/frontend/src/components/MakerPage.js +++ b/frontend/src/components/MakerPage.js @@ -39,13 +39,14 @@ class MakerPage extends Component { super(props); this.state={ tabValue: 0, + openStoreToken: false, is_explicit: false, type: 0, currency: this.defaultCurrency, currencyCode: this.defaultCurrencyCode, payment_method: this.defaultPaymentMethod, premium: 0, - satoshis: null, + satoshis: "", showAdvanced: false, allowBondless: false, publicExpiryTime: new Date(0, 0, 0, 23, 59), @@ -54,11 +55,11 @@ class MakerPage extends Component { minAmount: null, bondSize: 1, limits: null, - minAmount: null, - maxAmount: null, + minAmount: "", + maxAmount: "", loadingLimits: true, amount: "", - badPaymentMethod: false, + badPaymentMethod: "", } } @@ -275,15 +276,15 @@ class MakerPage extends Component { {t("Buy or Sell Bitcoin?")} - + } checkedIcon={}/>} label={this.state.type == 0 ? {t("Buy")}: {t("Buy")}} labelPlacement="end" /> } checkedIcon={}/>} label={this.state.type == 1 ? {t("Sell")}: {t("Sell")}} labelPlacement="end" @@ -293,13 +294,13 @@ class MakerPage extends Component {
- +
+ (navigator.clipboard.writeText(getCookie("robot_token")) & this.props.setAppState({copiedToken:true}))}> diff --git a/frontend/src/components/getFlags.js b/frontend/src/components/getFlags.js deleted file mode 100644 index 8f33c2af..00000000 --- a/frontend/src/components/getFlags.js +++ /dev/null @@ -1,78 +0,0 @@ -import React from 'react'; -import Flags from 'country-flag-icons/react/3x2' -import SwapCallsIcon from '@mui/icons-material/SwapCalls'; -import GoldIcon from './icons/GoldIcon'; -import EarthIcon from './icons/EarthIcon' - -export default function getFlags(code){ - const props = {width:20,height:20} - var flag = ""; - - if(code == 'AUD') flag = ; - if(code == 'ARS') flag = ; - if(code == 'BRL') flag = ; - if(code == 'CAD') flag = ; - if(code == 'CHF') flag = ; - if(code == 'CLP') flag = ; - if(code == 'CNY') flag = ; - if(code == 'EUR') flag = ; - if(code == 'HRK') flag = ; - if(code == 'CZK') flag = ; - if(code == 'DKK') flag = ; - if(code == 'GBP') flag = ; - if(code == 'HKD') flag = ; - if(code == 'HUF') flag = ; - if(code == 'INR') flag = ; - if(code == 'ISK') flag = ; - if(code == 'JPY') flag = ; - if(code == 'KRW') flag = ; - if(code == 'MXN') flag = ; - if(code == 'NOK') flag = ; - if(code == 'NZD') flag = ; - if(code == 'PLN') flag = ; - if(code == 'RON') flag = ; - if(code == 'RUB') flag = ; - if(code == 'SEK') flag = ; - if(code == 'SGD') flag = ; - if(code == 'VES') flag = ; - if(code == 'TRY') flag = ; - if(code == 'USD') flag = ; - if(code == 'ZAR') flag = ; - if(code == 'COP') flag = ; - if(code == 'PEN') flag = ; - if(code == 'UYU') flag = ; - if(code == 'PYG') flag = ; - if(code == 'BOB') flag = ; - if(code == 'IDR') flag = ; - if(code == 'ANG') flag = ; - if(code == 'CRC') flag = ; - if(code == 'CUP') flag = ; - if(code == 'DOP') flag = ; - if(code == 'GHS') flag = ; - if(code == 'GTQ') flag = ; - if(code == 'ILS') flag = ; - if(code == 'JMD') flag = ; - if(code == 'KES') flag = ; - if(code == 'KZT') flag = ; - if(code == 'MYR') flag = ; - if(code == 'NAD') flag = ; - if(code == 'NGN') flag = ; - if(code == 'AZN') flag = ; - if(code == 'PAB') flag = ; - if(code == 'PHP') flag = ; - if(code == 'PKR') flag = ; - if(code == 'QAR') flag = ; - if(code == 'SAR') flag = ; - if(code == 'THB') flag = ; - if(code == 'TTD') flag = ; - if(code == 'VND') flag = ; - if(code == 'XOF') flag = ; - if(code == 'TWD') flag = ; - if(code == 'TZS') flag = ; - if(code == 'XAF') flag = ; - if(code == 'UAH') flag = ; - if(code == 'ANY') flag = ; - if(code == 'XAU') flag = ; - if(code == 'BTC') flag = ; - return
{flag}
; -}