mirror of
https://github.com/RoboSats/robosats.git
synced 2025-02-20 20:29:02 +00:00
Add back lost duplicated tooltip message
This commit is contained in:
parent
423c816389
commit
c9649d58a8
@ -335,7 +335,7 @@ class BottomBar extends Component {
|
||||
</ListItemIcon>
|
||||
{!this.state.openClaimRewards ?
|
||||
<ListItemText secondary={t("Your earned rewards")}>
|
||||
<Grid container xs={12}>
|
||||
<Grid container>
|
||||
<Grid item xs={9}>
|
||||
<Typography>{this.state.earned_rewards+" Sats"}</Typography>
|
||||
</Grid>
|
||||
@ -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(
|
||||
<Paper elevation={6} style={{height:40}}>
|
||||
{this.StatsDialog()}
|
||||
{this.dialogProfile()}
|
||||
{this.exchangeSummaryDialog()}
|
||||
<Grid container xs={12}>
|
||||
<Grid container>
|
||||
|
||||
<Grid item xs={1.9}>
|
||||
<div style={{display: this.props.avatarLoaded ? '':'none'}}>
|
||||
<ListItemButton onClick={this.handleClickOpenProfile} >
|
||||
<Tooltip open={this.state.earned_rewards > 0 ? true: false} title={t("You can claim satoshis!")}>
|
||||
<Tooltip
|
||||
open={hasRewards || hasOrder}
|
||||
title={(hasRewards ? t("You can claim satoshis!")+" ": "" )+
|
||||
(hasOrder ? t("You have an active order"):"")}>
|
||||
<ListItemAvatar sx={{ width: 30, height: 30 }} >
|
||||
<Badge badgeContent={(this.state.active_order_id > 0 & !this.state.profileShown) ? "": null} color="primary">
|
||||
<Avatar className='flippedSmallAvatar' sx={{margin: 0, top: -13}}
|
||||
@ -621,7 +627,7 @@ bottomBarDesktop =()=>{
|
||||
<ListItemIcon size="small">
|
||||
<PercentIcon/>
|
||||
</ListItemIcon>
|
||||
<Grid container xs={12}>
|
||||
<Grid container >
|
||||
<Grid item xs={6}>
|
||||
<ListItemText
|
||||
primaryTypographyProps={{fontSize: '14px'}}
|
||||
@ -649,16 +655,20 @@ bottomBarDesktop =()=>{
|
||||
|
||||
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(
|
||||
<Paper elevation={6} style={{height:40}}>
|
||||
{this.StatsDialog()}
|
||||
{this.exchangeSummaryDialog()}
|
||||
{this.dialogProfile()}
|
||||
<Grid container xs={12}>
|
||||
<Grid container>
|
||||
|
||||
<Grid item xs={1.6}>
|
||||
<div style={{display: this.props.avatarLoaded ? '':'none'}}>
|
||||
<Tooltip open={this.state.earned_rewards > 0 ? true: false} title={t("You can claim satoshis!")}>
|
||||
<Tooltip open={hasRewards || hasOrder}
|
||||
title={(hasRewards ? t("You can claim satoshis!")+" ": "" )+
|
||||
(hasOrder ? t("You have an active order"):"")}>
|
||||
<IconButton onClick={this.handleClickOpenProfile} sx={{margin: 0, bottom: 17, right: 8}} >
|
||||
<Badge badgeContent={(this.state.active_order_id >0 & !this.state.profileShown) ? "": null} color="primary">
|
||||
<Avatar className='phoneFlippedSmallAvatar'
|
||||
|
@ -1,3 +1,4 @@
|
||||
import React from "react";
|
||||
import Flags from 'country-flag-icons/react/3x2'
|
||||
import SwapCallsIcon from '@mui/icons-material/SwapCalls';
|
||||
import GoldIcon from '../icons/GoldIcon';
|
||||
@ -77,6 +78,7 @@ const FlagWithProps = ({ code }: Props): JSX.Element => {
|
||||
if(code === 'TWD') flag = <Flags.TW {...defaultProps}/>;
|
||||
if(code === 'TZS') flag = <Flags.TZ {...defaultProps}/>;
|
||||
if(code === 'XAF') flag = <Flags.CM {...defaultProps}/>;
|
||||
if(code === 'UAH') flag = <Flags.UA {...defaultProps}/>;
|
||||
if(code === 'ANY') flag = <EarthIcon {...defaultProps}/>;
|
||||
if(code === 'XAU') flag = <GoldIcon {...defaultProps}/>;
|
||||
if(code === 'BTC') flag = <SwapCallsIcon color="primary"/>;
|
||||
|
@ -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?")}
|
||||
</FormHelperText>
|
||||
|
||||
<RadioGroup row defaultValue="0" onChange={this.handleTypeChange}>
|
||||
<RadioGroup row defaultValue={0} onChange={this.handleTypeChange}>
|
||||
<FormControlLabel
|
||||
value="0"
|
||||
value={0}
|
||||
control={<Radio icon={<BuySatsIcon sx={{width:"30px",height:"30px"}} color="text.secondary"/>} checkedIcon={<BuySatsCheckedIcon sx={{width:"30px",height:"30px"}} color="primary"/>}/>}
|
||||
label={this.state.type == 0 ? <Typography color="primary"><b>{t("Buy")}</b></Typography>: <Typography color="text.secondary">{t("Buy")}</Typography>}
|
||||
labelPlacement="end"
|
||||
/>
|
||||
<FormControlLabel
|
||||
value="1"
|
||||
value={1}
|
||||
control={<Radio color="secondary" icon={<SellSatsIcon sx={{width:"30px",height:"30px"}} color="text.secondary"/>} checkedIcon={<SellSatsCheckedIcon sx={{width:"30px",height:"30px"}} color="secondary"/>}/>}
|
||||
label={this.state.type == 1 ? <Typography color="secondary"><b>{t("Sell")}</b></Typography>: <Typography color="text.secondary">{t("Sell")}</Typography>}
|
||||
labelPlacement="end"
|
||||
@ -293,13 +294,13 @@ class MakerPage extends Component {
|
||||
</div>
|
||||
</Grid>
|
||||
|
||||
<Grid containter alignItems="stretch" style={{ display: "flex" }}>
|
||||
<Grid alignItems="stretch" style={{ display: "flex" }}>
|
||||
<div style={{maxWidth:150}}>
|
||||
<Tooltip placement="top" enterTouchDelay={500} enterDelay={700} enterNextDelay={2000} title={t("Amount of fiat to exchange for bitcoin")}>
|
||||
<TextField
|
||||
disabled = {this.state.enableAmountRange}
|
||||
variant = {this.state.enableAmountRange ? 'filled' : 'outlined'}
|
||||
error={this.state.amount <= 0 & this.state.amount != "" }
|
||||
error={this.state.amount <= 0 & this.state.amount != ""? true : false}
|
||||
helperText={this.state.amount <= 0 & this.state.amount != "" ? t("Invalid") : null}
|
||||
label={t("Amount")}
|
||||
type="number"
|
||||
@ -703,7 +704,7 @@ class MakerPage extends Component {
|
||||
size='small'
|
||||
InputProps={{
|
||||
endAdornment:
|
||||
<Tooltip disableHoverListener enterTouchDelay="0" title={t("Copied!")}>
|
||||
<Tooltip disableHoverListener enterTouchDelay={0} title={t("Copied!")}>
|
||||
<IconButton onClick= {()=> (navigator.clipboard.writeText(getCookie("robot_token")) & this.props.setAppState({copiedToken:true}))}>
|
||||
<ContentCopy color={this.props.copiedToken ? "inherit" : "primary"}/>
|
||||
</IconButton>
|
||||
|
@ -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 = <Flags.AU {...props}/>;
|
||||
if(code == 'ARS') flag = <Flags.AR {...props}/>;
|
||||
if(code == 'BRL') flag = <Flags.BR {...props}/>;
|
||||
if(code == 'CAD') flag = <Flags.CA {...props}/>;
|
||||
if(code == 'CHF') flag = <Flags.CH {...props}/>;
|
||||
if(code == 'CLP') flag = <Flags.CL {...props}/>;
|
||||
if(code == 'CNY') flag = <Flags.CN {...props}/>;
|
||||
if(code == 'EUR') flag = <Flags.EU {...props}/>;
|
||||
if(code == 'HRK') flag = <Flags.HR {...props}/>;
|
||||
if(code == 'CZK') flag = <Flags.CZ {...props}/>;
|
||||
if(code == 'DKK') flag = <Flags.DK {...props}/>;
|
||||
if(code == 'GBP') flag = <Flags.GB {...props}/>;
|
||||
if(code == 'HKD') flag = <Flags.HK {...props}/>;
|
||||
if(code == 'HUF') flag = <Flags.HU {...props}/>;
|
||||
if(code == 'INR') flag = <Flags.IN {...props}/>;
|
||||
if(code == 'ISK') flag = <Flags.IS {...props}/>;
|
||||
if(code == 'JPY') flag = <Flags.JP {...props}/>;
|
||||
if(code == 'KRW') flag = <Flags.KR {...props}/>;
|
||||
if(code == 'MXN') flag = <Flags.MX {...props}/>;
|
||||
if(code == 'NOK') flag = <Flags.NO {...props}/>;
|
||||
if(code == 'NZD') flag = <Flags.NZ {...props}/>;
|
||||
if(code == 'PLN') flag = <Flags.PL {...props}/>;
|
||||
if(code == 'RON') flag = <Flags.RO {...props}/>;
|
||||
if(code == 'RUB') flag = <Flags.RU {...props}/>;
|
||||
if(code == 'SEK') flag = <Flags.SE {...props}/>;
|
||||
if(code == 'SGD') flag = <Flags.SG {...props}/>;
|
||||
if(code == 'VES') flag = <Flags.VE {...props}/>;
|
||||
if(code == 'TRY') flag = <Flags.TR {...props}/>;
|
||||
if(code == 'USD') flag = <Flags.US {...props}/>;
|
||||
if(code == 'ZAR') flag = <Flags.ZA {...props}/>;
|
||||
if(code == 'COP') flag = <Flags.CO {...props}/>;
|
||||
if(code == 'PEN') flag = <Flags.PE {...props}/>;
|
||||
if(code == 'UYU') flag = <Flags.UY {...props}/>;
|
||||
if(code == 'PYG') flag = <Flags.PY {...props}/>;
|
||||
if(code == 'BOB') flag = <Flags.BO {...props}/>;
|
||||
if(code == 'IDR') flag = <Flags.ID {...props}/>;
|
||||
if(code == 'ANG') flag = <Flags.CW {...props}/>;
|
||||
if(code == 'CRC') flag = <Flags.CR {...props}/>;
|
||||
if(code == 'CUP') flag = <Flags.CU {...props}/>;
|
||||
if(code == 'DOP') flag = <Flags.DO {...props}/>;
|
||||
if(code == 'GHS') flag = <Flags.GH {...props}/>;
|
||||
if(code == 'GTQ') flag = <Flags.GT {...props}/>;
|
||||
if(code == 'ILS') flag = <Flags.IL {...props}/>;
|
||||
if(code == 'JMD') flag = <Flags.JM {...props}/>;
|
||||
if(code == 'KES') flag = <Flags.KE {...props}/>;
|
||||
if(code == 'KZT') flag = <Flags.KZ {...props}/>;
|
||||
if(code == 'MYR') flag = <Flags.MY {...props}/>;
|
||||
if(code == 'NAD') flag = <Flags.NA {...props}/>;
|
||||
if(code == 'NGN') flag = <Flags.NG {...props}/>;
|
||||
if(code == 'AZN') flag = <Flags.AZ {...props}/>;
|
||||
if(code == 'PAB') flag = <Flags.PA {...props}/>;
|
||||
if(code == 'PHP') flag = <Flags.PH {...props}/>;
|
||||
if(code == 'PKR') flag = <Flags.PK {...props}/>;
|
||||
if(code == 'QAR') flag = <Flags.QA {...props}/>;
|
||||
if(code == 'SAR') flag = <Flags.SA {...props}/>;
|
||||
if(code == 'THB') flag = <Flags.TH {...props}/>;
|
||||
if(code == 'TTD') flag = <Flags.TT {...props}/>;
|
||||
if(code == 'VND') flag = <Flags.VN {...props}/>;
|
||||
if(code == 'XOF') flag = <Flags.BJ {...props}/>;
|
||||
if(code == 'TWD') flag = <Flags.TW {...props}/>;
|
||||
if(code == 'TZS') flag = <Flags.TZ {...props}/>;
|
||||
if(code == 'XAF') flag = <Flags.CM {...props}/>;
|
||||
if(code == 'UAH') flag = <Flags.UA {...props}/>;
|
||||
if(code == 'ANY') flag = <EarthIcon {...props}/>;
|
||||
if(code == 'XAU') flag = <GoldIcon {...props}/>;
|
||||
if(code == 'BTC') flag = <SwapCallsIcon color="primary"/>;
|
||||
return <div style={{width:28, height: 20}}>{flag}</div>;
|
||||
}
|
Loading…
Reference in New Issue
Block a user