Fix grid-template-columns (#7366)

* Fix grid-template-columns

* Add fullscreen check
feature/default_network_editable
ricky 5 years ago committed by Mark Stacey
parent 728115171e
commit 78224601b9
  1. 2
      ui/app/components/app/transaction-list-item/index.scss
  2. 9
      ui/app/components/app/transaction-list-item/transaction-list-item.component.js

@ -13,7 +13,7 @@
width: 100%; width: 100%;
padding: 16px 20px; padding: 16px 20px;
display: grid; display: grid;
grid-template-columns: 45px 1fr 1fr 1fr; grid-template-columns: 45px 1fr 1fr 1fr 1fr;
grid-template-areas: grid-template-areas:
"identicon action status estimated-time primary-amount" "identicon action status estimated-time primary-amount"
"identicon nonce status estimated-time secondary-amount"; "identicon nonce status estimated-time secondary-amount";

@ -12,6 +12,8 @@ import { CONFIRM_TRANSACTION_ROUTE } from '../../../helpers/constants/routes'
import { UNAPPROVED_STATUS, TOKEN_METHOD_TRANSFER } from '../../../helpers/constants/transactions' import { UNAPPROVED_STATUS, TOKEN_METHOD_TRANSFER } from '../../../helpers/constants/transactions'
import { PRIMARY, SECONDARY } from '../../../helpers/constants/common' import { PRIMARY, SECONDARY } from '../../../helpers/constants/common'
import { getStatusKey } from '../../../helpers/utils/transactions.util' import { getStatusKey } from '../../../helpers/utils/transactions.util'
import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../app/scripts/lib/enums'
import { getEnvironmentType } from '../../../../../app/scripts/lib/util'
export default class TransactionListItem extends PureComponent { export default class TransactionListItem extends PureComponent {
static propTypes = { static propTypes = {
@ -196,6 +198,11 @@ export default class TransactionListItem extends PureComponent {
? tokenData.params && tokenData.params[0] && tokenData.params[0].value || txParams.to ? tokenData.params && tokenData.params[0] && tokenData.params[0].value || txParams.to
: txParams.to : txParams.to
const isFullScreen = getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_FULLSCREEN
const showEstimatedTime = transactionTimeFeatureActive &&
(transaction.id === firstPendingTransactionId) &&
isFullScreen
return ( return (
<div className="transaction-list-item"> <div className="transaction-list-item">
<div <div
@ -228,7 +235,7 @@ export default class TransactionListItem extends PureComponent {
: primaryTransaction.err && primaryTransaction.err.message : primaryTransaction.err && primaryTransaction.err.message
)} )}
/> />
{ transactionTimeFeatureActive && (transaction.id === firstPendingTransactionId) { showEstimatedTime
? <TransactionTimeRemaining ? <TransactionTimeRemaining
className="transaction-list-item__estimated-time" className="transaction-list-item__estimated-time"
transaction={ primaryTransaction } transaction={ primaryTransaction }

Loading…
Cancel
Save