diff --git a/frontend/src/components/BookPage.js b/frontend/src/components/BookPage.js index 771b9f4e..c2fe2713 100644 --- a/frontend/src/components/BookPage.js +++ b/frontend/src/components/BookPage.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { Paper, Button , CircularProgress, ListItemButton, Typography, Grid, Select, MenuItem, FormControl, FormHelperText, List, ListItem, ListItemText, Avatar, RouterLink, ListItemAvatar} from "@mui/material"; +import { Tooltip, Paper, Button , CircularProgress, ListItemButton, Typography, Grid, Select, MenuItem, FormControl, FormHelperText, List, ListItem, ListItemText, Avatar, RouterLink, ListItemAvatar, IconButton} from "@mui/material"; import { Link } from 'react-router-dom' import { DataGrid } from '@mui/x-data-grid'; import MediaQuery from 'react-responsive' @@ -79,7 +79,7 @@ export default class BookPage extends Component { ({id: order.id, avatar: window.location.origin +'/static/assets/avatars/' + order.maker_nick + '.png', robosat: order.maker_nick, - type: order.type ? "Sell": "Buy", + type: order.type ? "Seller": "Buyer", amount: parseFloat(parseFloat(order.amount).toFixed(4)), currency: this.getCurrencyCode(order.currency), payment_method: order.payment_method, @@ -108,7 +108,7 @@ export default class BookPage extends Component { ); } }, - { field: 'type', headerName: 'Type', width: 60 }, + { field: 'type', headerName: 'Is', width: 60 }, { field: 'amount', headerName: 'Amount', type: 'number', width: 80 }, { field: 'currency', headerName: 'Currency', width: 100, renderCell: (params) => {return ( @@ -135,14 +135,14 @@ export default class BookPage extends Component { bookListTablePhone=()=>{ return ( -
+
({id: order.id, avatar: window.location.origin +'/static/assets/avatars/' + order.maker_nick + '.png', robosat: order.maker_nick, - type: order.type ? "Sell": "Buy", + type: order.type ? "Seller": "Buyer", amount: parseFloat(parseFloat(order.amount).toFixed(4)), currency: this.getCurrencyCode(order.currency), payment_method: order.payment_method, @@ -155,9 +155,8 @@ export default class BookPage extends Component { // { field: 'id', headerName: 'ID', width: 40 }, { field: 'robosat', headerName: 'Robot', width: 80, renderCell: (params) => {return ( - - -
+ +
- - +
); } }, - { field: 'type', headerName: 'Type', width: 60, hide:'true'}, + { field: 'type', headerName: 'Is', width: 60, hide:'true'}, { field: 'amount', headerName: 'Amount', type: 'number', width: 80 }, { field: 'currency', headerName: 'Currency', width: 100, renderCell: (params) => {return ( +
{params.row.currency + " " + getFlags(params.row.currency)}
+
)} }, { field: 'payment_method', headerName: 'Payment Method', width: 180, hide:'true'}, { field: 'price', headerName: 'Price', type: 'number', width: 140, hide:'true', @@ -183,7 +183,9 @@ export default class BookPage extends Component { )} }, { field: 'premium', headerName: 'Premium', type: 'number', width: 85, renderCell: (params) => {return ( +
{parseFloat(parseFloat(params.row.premium).toFixed(4))+"%" }
+
)} }, ]} diff --git a/frontend/src/components/BottomBar.js b/frontend/src/components/BottomBar.js index e704d502..42cb7c86 100644 --- a/frontend/src/components/BottomBar.js +++ b/frontend/src/components/BottomBar.js @@ -484,10 +484,10 @@ bottomBarPhone =()=>{
0 & !this.state.profileShown & this.props.avatarLoaded) ? true: false} title="You have an active order"> - + 0 & !this.state.profileShown) ? "": null} color="primary"> this.props.setAppState({avatarLoaded: true}), diff --git a/frontend/src/components/MakerPage.js b/frontend/src/components/MakerPage.js index c6e2aad6..34d0ab70 100644 --- a/frontend/src/components/MakerPage.js +++ b/frontend/src/components/MakerPage.js @@ -184,7 +184,7 @@ export default class MakerPage extends Component {
- +
- + - + } @@ -251,7 +251,7 @@ export default class MakerPage extends Component { onClick={this.handleClickRelative} /> - + } @@ -304,18 +304,19 @@ export default class MakerPage extends Component { - -
-
+ {/* conditions to disable the make button */} + {(this.state.amount == null || + this.state.amount <= 0 || + (this.state.is_explicit & (this.state.badSatoshis != null || this.state.satoshis == null)) || + (!this.state.is_explicit & this.state.badPremium != null)) + ? + +
+
+ : + + } +
{this.state.badRequest ? diff --git a/frontend/src/components/OrderPage.js b/frontend/src/components/OrderPage.js index a104b372..daa68cf2 100644 --- a/frontend/src/components/OrderPage.js +++ b/frontend/src/components/OrderPage.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { Badge, Tab, Tabs, Alert, Paper, CircularProgress, Button , Grid, Typography, List, ListItem, ListItemIcon, ListItemText, ListItemAvatar, Avatar, Divider, Box, LinearProgress, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle} from "@mui/material" +import { Chip, Tooltip, Badge, Tab, Tabs, Alert, Paper, CircularProgress, Button , Grid, Typography, List, ListItem, ListItemIcon, ListItemText, ListItemAvatar, Avatar, Divider, Box, LinearProgress, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle} from "@mui/material" import Countdown, { zeroPad, calcTimeDelta } from 'react-countdown'; import MediaQuery from 'react-responsive' @@ -161,7 +161,10 @@ export default class OrderPage extends Component { // Render a completed state return (); } else{ - return() + return( +
+ +
) } }; @@ -352,15 +355,16 @@ export default class OrderPage extends Component { // Colors for the status badges statusBadgeColor(status){ - if(status=='active'){ - return("success") - } - if(status=='seen_recently'){ - return("warning") - } - if(status=='inactive'){ - return('error') - } + if(status=='active'){return("success")} + if(status=='seen_recently'){return("warning")} + if(status=='inactive'){return('error')} + } + + // Colors for the status badges + statusTooltip(status){ + if(status=='active'){return("Active")} + if(status=='seen_recently'){return("Seen recently")} + if(status=='inactive'){return('Inactive')} } orderBox=()=>{ @@ -369,52 +373,56 @@ export default class OrderPage extends Component { - Order Details + Order Box + + - {this.state.is_participant ? <> {this.state.taker_nick!='None' ? <> + + + - - + : "" } + - + - :"" + : } @@ -559,8 +567,8 @@ export default class OrderPage extends Component { - - + + diff --git a/frontend/src/components/UserGenPage.js b/frontend/src/components/UserGenPage.js index 540dc314..463aa633 100644 --- a/frontend/src/components/UserGenPage.js +++ b/frontend/src/components/UserGenPage.js @@ -92,6 +92,7 @@ export default class UserGenPage extends Component { this.setState({ token: this.genBase62Token(34), tokenHasChanged: true, + copied: true, }); } @@ -192,7 +193,7 @@ export default class UserGenPage extends Component { startAdornment: (navigator.clipboard.writeText(this.state.token) & this.setState({copied:true}))}> - + , endAdornment: @@ -204,10 +205,19 @@ export default class UserGenPage extends Component { - + : + + + + } diff --git a/frontend/static/css/index.css b/frontend/static/css/index.css index 98693333..01a9d265 100644 --- a/frontend/static/css/index.css +++ b/frontend/static/css/index.css @@ -73,6 +73,13 @@ body { filter: drop-shadow(0.7px 0.7px 0.7px #000000); } +.phoneFlippedSmallAvatar:after { + content: ''; + position: absolute; + top: 0; left: 0; bottom: 0; right: 0; + box-shadow: inset 0px 0px 35px rgb(255, 255, 255); +} + .bookAvatar { border-radius: 50%; transform: scaleX(-1);