Skip to content

Commit

Permalink
fix(invest-box): checkbox; units;
Browse files Browse the repository at this point in the history
Corrections regarding terms and conditions. Update value units.

fix #1864
  • Loading branch information
migbash committed Dec 15, 2023
1 parent 22e35d0 commit 4fa2576
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 15 deletions.
3 changes: 3 additions & 0 deletions src/lib/components/page/profile/assets/checkbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 41 additions & 15 deletions src/lib/components/page/profile/investor/Main-InvestBox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import { passByValue } from '@betarena/scores-lib/dist/functions/func.common.js';
import { tryCatchAsync } from '@betarena/scores-lib/dist/util/util.common.js';
import icon_checkbox from '../assets/checkbox.svg';
import icon_arrow_down_dark from '../assets/common/arrow-down-dark.svg';
import icon_arrow_down from '../assets/common/arrow-down.svg';
import icon_arrow_right_dark from '../assets/common/arrow-right-dark.svg';
Expand Down Expand Up @@ -1153,23 +1154,48 @@
"
>

<!-- [🐞] -->
<!-- {agreeTermsAndConditions} -->

<!--
▓ NOTE:
▓ > Terms & Conditions INPUT.
-->
<input
id=""
name=""
type="checkbox"
class=
"
v-1
m-r-12
cursor-pointer
"
required
bind:value={agreeTermsAndConditions}
/>
<label
class="container"
>
<input
id=""
name=""
type="checkbox"
class=
"
v-1
m-r-12
cursor-pointer
"
required
bind:checked={agreeTermsAndConditions}
/>

<span
class="checkmark"
>
{#if agreeTermsAndConditions}
<img
id=''
class=
"
box-center
"
src={icon_checkbox}
alt=''
title=''
loading='lazy'
/>
{/if}
</span>
</label>

<!--
▓ NOTE:
Expand Down Expand Up @@ -1344,7 +1370,7 @@
>
<!-- ▓ [🐞] -->
<!-- {console.log(cryptoPrices?.data?.['USDC']?.quote?.USD?.price)} -->
{depositAmount ?? 0} {cryptoDepositOptionSelect?.name} ≈ {cryptoPrice} $
{depositAmount ?? 0} {cryptoDepositOptionSelect?.name} ≈ {cryptoPrice} USD
</p>

</div>
Expand Down Expand Up @@ -1512,7 +1538,7 @@
m-t-5
"
>
{1 - (tierDiscountObject.discount / 100)} {cryptoDepositOptionSelect?.name} ≈ 1.00 BTA
{toDecimalFix(1 - (tierDiscountObject.discount / 100))} {cryptoDepositOptionSelect?.name} ≈ 1.00 BTA
</p>

</div>
Expand Down
58 changes: 58 additions & 0 deletions static/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,64 @@ img.google-aspect-ratio
transition: all 0.15s ease;
}

/* The container */
.container {
display: block;
position: relative;
padding-left: 35px;
margin-bottom: 12px;
cursor: pointer;
font-size: 22px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* Hide the browser's default checkbox */
.container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 1px;
width: 1px;
}
/* Create a custom checkbox */
.checkmark {
position: absolute;
top: 0;
left: 0;
height: 20px;
width: 20px;
background-color: transparent;
border: 1.5px solid #A9B8AE;
border-radius: 3.25px;
}
/* On mouse-over */
/* .container:hover input ~ .checkmark {
background-color: #ccc;
} */
/* When the checkbox is checked */
.container input:checked ~ .checkmark {
background-color: var(--primary);
}

/*
╭──────────────────────────────────────────────────────────────────╮
│ 📌 POSITIONS │
╰──────────────────────────────────────────────────────────────────╯
*/

.box-center
{
/* 📌 position */
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
margin: auto;
}

/* #endregion ➤ [MAIN] [OTHER STYLES] Website Layout */

/* #region ➤ [MAIN] [DARK MODE (OVERRIDES) STYLES] Website Layout */
Expand Down

0 comments on commit 4fa2576

Please sign in to comment.