Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Show jar total amount in detail view #551

Merged
merged 3 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/components/jar_details/JarDetailsOverlay.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,6 @@
background-color: var(--bs-gray-800);
}

.overlayContainer .tabContainer .utxoListTitleBar .operationsContainer {
display: flex;
width: 100%;
justify-content: space-between;
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
}

.selectedUtxosSumContainer {
align-self: end;
}

@media only screen and (min-width: 576px) {
.overlayContainer .tabContainer .utxoListTitleBar .operationsContainer {
flex-direction: row;
align-items: center;
}
}

.overlayContainer .tabContainer .utxoListTitleBar .freezeUnfreezeButtonsContainer {
display: flex;
flex-direction: row;
Expand Down
29 changes: 21 additions & 8 deletions src/components/jar_details/JarDetailsOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,19 +352,32 @@ const JarDetailsOverlay = (props: JarDetailsOverlayProps) => {
{selectedTab === TABS.UTXOS ? (
<>
<div className={styles.utxoListTitleBar}>
<div className="d-flex justify-content-center align-items-center gap-2">
{refreshButton()}
{utxoListTitle()}
<div className="d-flex justify-content-between align-items-center w-100 flex-sm-row flex-column">
<div className="d-flex justify-content-center align-items-center gap-2">
{refreshButton()}
{utxoListTitle()}
</div>
<div>
<Trans i18nKey="jar_details.utxo_list.text_balance_sum_total">
<Balance
valueString={jar.account_balance}
convertToUnit={settings.unit}
showBalance={settings.showBalance}
/>
</Trans>
</div>
</div>
<div className={styles.operationsContainer}>
<div className="d-flex justify-content-between align-items-center w-100 flex-sm-row flex-column gap-2">
{utxos.length > 0 && (
<div className={styles.freezeUnfreezeButtonsContainer}>
{freezeUnfreezeButton({ freeze: true })}
{freezeUnfreezeButton({ freeze: false })}
<div className="order-1 order-sm-0">
<div className={styles.freezeUnfreezeButtonsContainer}>
{freezeUnfreezeButton({ freeze: true })}
{freezeUnfreezeButton({ freeze: false })}
</div>
</div>
)}
{selectedUtxosBalance > 0 && (
<div className={styles.selectedUtxosSumContainer}>
<div className="order-0 order-sm-1">
<Trans i18nKey="jar_details.utxo_list.text_balance_sum_selected">
<Balance
valueString={String(selectedUtxosBalance)}
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@
"title_zero": "No UTXOs in Jar {{ jar }}",
"title_one": "{{ count }} UTXO in Jar {{ jar }}",
"title_other": "{{ count }} UTXOs in Jar {{ jar }}",
"text_balance_sum_total": "<0></0> total",
"text_balance_sum_selected": "<0></0> selected",
"button_freeze": "Freeze",
"button_unfreeze": "Unfreeze",
Expand Down