0.0.7
This commit is contained in:
parent
c9e1abb380
commit
7a7e0ef727
89
css/main.css
89
css/main.css
@ -385,6 +385,7 @@ textarea {
|
||||
border-radius: 0.2rem;
|
||||
background: rgba(var(--text), 0.1);
|
||||
border: 0.1em solid transparent;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.input:last-of-type {
|
||||
@ -395,7 +396,7 @@ textarea {
|
||||
border: 0.1em solid var(--primary-color);
|
||||
}
|
||||
|
||||
.input label {
|
||||
.input .placeholder {
|
||||
opacity: .7;
|
||||
font-weight: 500;
|
||||
font-size: 1em;
|
||||
@ -427,7 +428,7 @@ textarea {
|
||||
transform: translateY(0.5em);
|
||||
}
|
||||
|
||||
.animate-label label {
|
||||
.animate-label .placeholder {
|
||||
-webkit-transform: translateY(-60%) scale(0.7);
|
||||
transform: translateY(-60%) scale(0.7);
|
||||
opacity: 1;
|
||||
@ -585,6 +586,10 @@ form {
|
||||
padding: 0.6em 1.2em;
|
||||
}
|
||||
|
||||
.popup-container .popup .container-header h3 {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.popup-container .popup p {
|
||||
margin-bottom: 1.5rem !important;
|
||||
}
|
||||
@ -654,6 +659,10 @@ form {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#show_message span::first-letter {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#show_message button {
|
||||
padding: 1rem;
|
||||
margin: 0 1em 0 0;
|
||||
@ -868,12 +877,13 @@ form {
|
||||
}
|
||||
|
||||
.options-tab {
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
margin-top: 1rem;
|
||||
-ms-grid-columns: (10rem)[2];
|
||||
grid-template-columns: repeat(2, 10rem);
|
||||
margin-bottom: 1rem;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.options-tab .option {
|
||||
@ -888,6 +898,7 @@ form {
|
||||
padding: 1.5rem;
|
||||
margin-right: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
width: 9rem;
|
||||
border: solid 1px rgba(var(--text), 0.2);
|
||||
text-transform: capitalize;
|
||||
cursor: pointer;
|
||||
@ -952,6 +963,10 @@ form {
|
||||
background: linear-gradient(rgba(var(--foreground), 1) 90%, transparent);
|
||||
}
|
||||
|
||||
.secondary-btn {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.request {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
@ -960,14 +975,14 @@ form {
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
padding: 2em 1.5em;
|
||||
padding: 1.5em;
|
||||
border-radius: 0.4em;
|
||||
border: solid 1px rgba(var(--text), 0.2);
|
||||
}
|
||||
|
||||
.request h5 {
|
||||
color: rgba(var(--text-light), 1);
|
||||
margin-bottom: 0.6rem;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.request h3, .request h4 {
|
||||
@ -993,6 +1008,8 @@ form {
|
||||
width: auto;
|
||||
-ms-flex-item-align: end;
|
||||
align-self: flex-end;
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.request .copy-row {
|
||||
@ -1003,9 +1020,9 @@ form {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
justify-content: flex-end;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
@ -1013,6 +1030,10 @@ form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.request .flex button {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.deposited {
|
||||
color: #00C853;
|
||||
}
|
||||
@ -1021,6 +1042,10 @@ form {
|
||||
content: '+ ';
|
||||
}
|
||||
|
||||
.decline-request {
|
||||
margin-right: 0.5rem !important;
|
||||
}
|
||||
|
||||
.withdrawn {
|
||||
color: #F44336;
|
||||
}
|
||||
@ -1053,6 +1078,7 @@ form {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: rgba(var(--foreground), 1);
|
||||
will-change: auto;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
@ -1139,6 +1165,7 @@ form {
|
||||
|
||||
.time {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
margin-bottom: 1.5rem !important;
|
||||
}
|
||||
|
||||
#report_popup h4 {
|
||||
@ -1149,6 +1176,21 @@ form {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
#profile_page {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#profile_page button {
|
||||
-ms-flex-item-align: start;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 640px) {
|
||||
body {
|
||||
padding: 1rem 6vw;
|
||||
@ -1228,14 +1270,12 @@ form {
|
||||
#sign_in_popup {
|
||||
width: 24rem;
|
||||
}
|
||||
.options-tab {
|
||||
-ms-grid-columns: (10rem)[3];
|
||||
grid-template-columns: repeat(3, 10rem);
|
||||
}
|
||||
}
|
||||
|
||||
#profile_page h5 {
|
||||
margin-bottom: 0.5rem;
|
||||
#profile_page .copy-row {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
#main_loader {
|
||||
@ -1297,10 +1337,6 @@ form {
|
||||
-ms-grid-columns: (1fr)[3];
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
.options-tab {
|
||||
-ms-grid-columns: (10rem)[4];
|
||||
grid-template-columns: repeat(4, 10rem);
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1920px) {
|
||||
@ -1360,15 +1396,4 @@ form {
|
||||
--dark-shade: #dadada;
|
||||
}
|
||||
}
|
||||
|
||||
@media (any-hover: hover) {
|
||||
.request button {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.3s;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
.request:hover button {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
/*# sourceMappingURL=main.css.map */
|
||||
File diff suppressed because one or more lines are too long
@ -243,13 +243,14 @@ textarea{
|
||||
border-radius: 0.2rem;
|
||||
background: rgba(var(--text), 0.1);
|
||||
border: 0.1em solid transparent;
|
||||
cursor: text;
|
||||
&:last-of-type{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
&:focus-within{
|
||||
border: 0.1em solid var(--primary-color);
|
||||
}
|
||||
label{
|
||||
.placeholder{
|
||||
opacity: .7;
|
||||
font-weight: 500;
|
||||
font-size: 1em;
|
||||
@ -273,7 +274,7 @@ textarea{
|
||||
input{
|
||||
transform: translateY(0.5em);
|
||||
}
|
||||
label{
|
||||
.placeholder{
|
||||
transform: translateY(-60%) scale(0.7);
|
||||
opacity: 1;
|
||||
color: var(--primary-color);
|
||||
@ -377,6 +378,9 @@ form{
|
||||
.btn{
|
||||
padding: 0.6em 1.2em;
|
||||
}
|
||||
h3{
|
||||
text-transform: capitalize;
|
||||
}
|
||||
}
|
||||
p{
|
||||
margin-bottom: 1.5rem !important;
|
||||
@ -424,6 +428,9 @@ form{
|
||||
font-weight: 500;
|
||||
flex: 1;
|
||||
}
|
||||
span::first-letter{
|
||||
text-transform: uppercase;
|
||||
}
|
||||
button{
|
||||
padding: 1rem;
|
||||
margin: 0 1em 0 0;
|
||||
@ -585,10 +592,10 @@ form{
|
||||
}
|
||||
}
|
||||
.options-tab{
|
||||
display: grid;
|
||||
display: flex;
|
||||
margin-top: 1rem;
|
||||
grid-template-columns: repeat(2, 10rem);
|
||||
margin-bottom: 1rem;
|
||||
flex-wrap: wrap;
|
||||
.option{
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
@ -596,6 +603,7 @@ form{
|
||||
padding: 1.5rem;
|
||||
margin-right: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
width: 9rem;
|
||||
border: solid 1px rgba(var(--text), 0.2);
|
||||
text-transform: capitalize;
|
||||
cursor: pointer;
|
||||
@ -656,15 +664,18 @@ form{
|
||||
background: linear-gradient(rgba(var(--foreground), 1) 90%, transparent);
|
||||
}
|
||||
}
|
||||
.secondary-btn{
|
||||
background: none;
|
||||
}
|
||||
.request{
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
padding: 2em 1.5em;
|
||||
padding: 1.5em;
|
||||
border-radius: 0.4em;
|
||||
border: solid 1px rgba(var(--text), 0.2);
|
||||
h5{
|
||||
color: rgba(var(--text-light), 1);
|
||||
margin-bottom: 0.6rem;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
h3,h4{
|
||||
margin-bottom: 1.5rem;
|
||||
@ -683,17 +694,22 @@ form{
|
||||
button{
|
||||
width: auto;
|
||||
align-self: flex-end;
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.copy-row{
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.flex{
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-end;
|
||||
margin-top: 1.5rem;
|
||||
h5{
|
||||
margin: 0;
|
||||
}
|
||||
button{
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.deposited{
|
||||
@ -702,6 +718,9 @@ form{
|
||||
content: '+ ';
|
||||
}
|
||||
}
|
||||
.decline-request{
|
||||
margin-right: 0.5rem !important;
|
||||
}
|
||||
.withdrawn{
|
||||
color: #F44336;
|
||||
&::before{
|
||||
@ -725,6 +744,7 @@ form{
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: rgba(var(--foreground), 1);
|
||||
will-change: auto;
|
||||
z-index: 2;
|
||||
h2{
|
||||
font-weight: 600;
|
||||
@ -791,6 +811,7 @@ form{
|
||||
}
|
||||
.time{
|
||||
font-family: 'Roboto', sans-serif;
|
||||
margin-bottom: 1.5rem !important;
|
||||
}
|
||||
#report_popup{
|
||||
h4{
|
||||
@ -800,6 +821,13 @@ form{
|
||||
margin-top: 1rem;
|
||||
}
|
||||
}
|
||||
#profile_page{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
button{
|
||||
align-self: flex-start;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 640px){
|
||||
body{
|
||||
padding: 1rem 6vw;
|
||||
@ -872,13 +900,10 @@ form{
|
||||
#sign_in_popup{
|
||||
width: 24rem;
|
||||
}
|
||||
.options-tab{
|
||||
grid-template-columns: repeat(3, 10rem);
|
||||
}
|
||||
}
|
||||
#profile_page{
|
||||
h5{
|
||||
margin-bottom: 0.5rem;
|
||||
.copy-row{
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
#main_loader{
|
||||
@ -924,9 +949,6 @@ form{
|
||||
.container{
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
.options-tab{
|
||||
grid-template-columns: repeat(4, 10rem);
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1920px){
|
||||
body{
|
||||
@ -979,16 +1001,5 @@ form{
|
||||
}
|
||||
}
|
||||
@media (any-hover: hover){
|
||||
.request{
|
||||
button{
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
&:hover{
|
||||
button{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
522
index.html
522
index.html
@ -82,10 +82,10 @@
|
||||
</div>
|
||||
<h4 class="expand light-text">Welcome to RanchiMall Blockchain UPI</h4>
|
||||
<form class="expand" autocomplete="off" onsubmit="return false">
|
||||
<div class="input">
|
||||
<label class="input">
|
||||
<input id="get_priv_key_field" type="password" minlength="40" required>
|
||||
<label>Private Key</label>
|
||||
</div>
|
||||
<div class="placeholder">Private Key</div>
|
||||
</label>
|
||||
<button id="sign_in_btn" class="primary-btn expand" type="submit" disabled>
|
||||
Sign In
|
||||
</button>
|
||||
@ -93,7 +93,160 @@
|
||||
<p>*Sign in button will not be activated until correct value is entered.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Report popuo-->
|
||||
<div class="popup-container hide">
|
||||
<div id="cash_transfer" class="popup">
|
||||
<div class="container-header">
|
||||
<svg class="icon" onclick="hidePopup()" viewBox="0 0 64 64">
|
||||
<title>close</title>
|
||||
<line x1="64" y1="0" x2="0" y2="64" />
|
||||
<line x1="64" y1="64" x2="0" y2="0" />
|
||||
</svg>
|
||||
<h3>Transfer Rupee</h3>
|
||||
<div id="send_tokens_btn" class="action expand">
|
||||
<button class="primary-btn expand" type="submit" disabled>
|
||||
transfer
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Transfer your deposited Rupee tokens to any FLO address.<br>
|
||||
*Requires token to be deposited first.
|
||||
</p>
|
||||
<form autocomplete="off" onsubmit="return false">
|
||||
<label class="input">
|
||||
<input id="token_receiver" type="text" required>
|
||||
<div class="placeholder">Reciever's FLO ID</div>
|
||||
</label>
|
||||
<label class="input">
|
||||
<input id="token_amount" inputmode="numeric" type="number" min="1" required>
|
||||
<div class="placeholder">Amount</div>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-container hide">
|
||||
<div id="deposit_rupee" class="popup">
|
||||
<div class="container-header">
|
||||
<svg class="icon" onclick="hidePopup()" viewBox="0 0 64 64">
|
||||
<title>close</title>
|
||||
<line x1="64" y1="0" x2="0" y2="64" />
|
||||
<line x1="64" y1="64" x2="0" y2="0" />
|
||||
</svg>
|
||||
<h3>Deposit rupee</h3>
|
||||
<div id="request_tokens_btn" class="action expand">
|
||||
<button class="primary-btn expand" type="submit" disabled>
|
||||
deposit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Deposit rupee through UPI to use as Digital currency powered by blockchain.
|
||||
</p>
|
||||
<form autocomplete="off" onsubmit="return false">
|
||||
<label class="input">
|
||||
<input id="token_amount_to_buy" inputmode="numeric" type="number" min="1" required>
|
||||
<div class="placeholder">Amount</div>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-container hide">
|
||||
<div id="withdraw_rupee" class="popup">
|
||||
<div class="container-header">
|
||||
<svg class="icon" onclick="hidePopup()" viewBox="0 0 64 64">
|
||||
<title>close</title>
|
||||
<line x1="64" y1="0" x2="0" y2="64" />
|
||||
<line x1="64" y1="64" x2="0" y2="0" />
|
||||
</svg>
|
||||
<h3>Withdraw rupee</h3>
|
||||
<div id="withdraw_cash_btn" class="action expand">
|
||||
<button class="primary-btn expand" type="submit" disabled>
|
||||
withdraw
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Withdraw or redeem your rupee tokens back to your specified UPI address.
|
||||
</p>
|
||||
<form autocomplete="off" onsubmit="return false">
|
||||
<label class="input">
|
||||
<input id="user_withdraw_upi" pattern="^[a-zA-z0-9]+@[a-zA-z0-9]+" type="text" required>
|
||||
<div class="placeholder">Reciever's UPI address</div>
|
||||
</label>
|
||||
<label class="input">
|
||||
<input id="withdraw_cash_amount" type="number" min="1" inputmode="numeric" required>
|
||||
<div class="placeholder">amount</div>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-container hide">
|
||||
<div id="request_rupee" class="popup">
|
||||
<div class="container-header">
|
||||
<svg class="icon" onclick="hidePopup()" viewBox="0 0 64 64">
|
||||
<title>close</title>
|
||||
<line x1="64" y1="0" x2="0" y2="64" />
|
||||
<line x1="64" y1="64" x2="0" y2="0" />
|
||||
</svg>
|
||||
<h3>Request rupee</h3>
|
||||
<div id="request_rupee_btn" class="action expand">
|
||||
<button class="primary-btn expand" type="submit" disabled>
|
||||
request
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Request for rupee tokens from other's using FLO address.
|
||||
</p>
|
||||
<form autocomplete="off" onsubmit="return false">
|
||||
<label class="input">
|
||||
<input id="requested_address" minlength="20" type="text" required>
|
||||
<div class="placeholder">Request from</div>
|
||||
</label>
|
||||
<label class="input">
|
||||
<input id="requested_amount" type="number" min="1" inputmode="numeric" required>
|
||||
<div class="placeholder">amount</div>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-container hide">
|
||||
<div id="pay_anyone" class="popup">
|
||||
<div class="container-header">
|
||||
<svg class="icon" onclick="hidePopup()" viewBox="0 0 64 64">
|
||||
<title>close</title>
|
||||
<line x1="64" y1="0" x2="0" y2="64" />
|
||||
<line x1="64" y1="64" x2="0" y2="0" />
|
||||
</svg>
|
||||
<h3>Pay through cashier</h3>
|
||||
<div id="cnf_cash_payment" class="action expand">
|
||||
<button class="primary-btn expand" type="submit" disabled>
|
||||
pay
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Don't have enough token balance? Pay to our cashier through UPI and your cash will be
|
||||
transfered as Rupee tokens.
|
||||
</p>
|
||||
<p><strong id="pay_cashier_info"></strong></p>
|
||||
<form autocomplete="off" onsubmit="return false">
|
||||
<label class="input">
|
||||
<input id="recvr_id" type="text" required>
|
||||
<div class="placeholder">Reciever's FLO ID</div>
|
||||
</label>
|
||||
<label class="input">
|
||||
<input id="recvr_amount_to_pay" type="number" min="1" inputmode="numeric" required>
|
||||
<div class="placeholder">Amount</div>
|
||||
</label>
|
||||
<label class="input">
|
||||
<input id="paid_cashier_upi_txid" type="text" required>
|
||||
<div class="placeholder">UPI Txid/Ref Number</div>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Report popup-->
|
||||
<div class="popup-container hide">
|
||||
<div class="popup" id="report_popup">
|
||||
<div class="container-header">
|
||||
@ -103,10 +256,10 @@
|
||||
<line x1="64" y1="64" x2="0" y2="0" />
|
||||
</svg>
|
||||
<h3>Report</h3>
|
||||
<button>report</button>
|
||||
<button id="report_btn">report</button>
|
||||
</div>
|
||||
<h4>Please add any message you want to send us regarding this issue</h4>
|
||||
<textarea name="complaint" id="complaint_field" rows="10"></textarea>
|
||||
<textarea name="complaint" id="complaint_field" rows="6"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -141,7 +294,8 @@
|
||||
</div>
|
||||
</header>
|
||||
<nav id="navbar">
|
||||
<div title="homepage" id="home_page_btn" class="user-option navbar-item active" onclick="showPage(this, 'home_page')">
|
||||
<div title="homepage" id="home_page_btn" class="user-option navbar-item active"
|
||||
onclick="showPage(this, 'home_page')">
|
||||
<svg class="icon" viewBox="0 0 64 64">
|
||||
<path
|
||||
d="M24.77,44.15H40.06V63.5H53.4V36h5.66a3.38,3.38,0,0,0,2.53-5.68l-6.73-7.16V11.26H46.48v3L34.53,1.59a3.49,3.49,0,0,0-5.06,0L2.41,30.35A3.38,3.38,0,0,0,4.94,36H10.6V63.5H24.77" />
|
||||
@ -189,9 +343,19 @@
|
||||
</svg>
|
||||
<h5>pay</h5>
|
||||
</div>
|
||||
<div title="requests page" class="navbar-item user-option" onclick="showPage(this, 'request_page')">
|
||||
<svg class="icon" viewBox="0 0 64 64">
|
||||
<title>request</title>
|
||||
<path
|
||||
d="M24,26.19a8.67,8.67,0,0,1-.24-3.61,8.34,8.34,0,0,1,16.59,1.27c0,8.35-8.66,8.16-8.34,11.58,0,.09,0,4.73,0,4.73" />
|
||||
<line x1="32" y1="47.08" x2="32" y2="48.99" />
|
||||
<path
|
||||
d="M32,.5h0A31.5,31.5,0,0,1,63.5,32v0A31.5,31.5,0,0,1,32,63.5H2.48a2,2,0,0,1-2-2V32A31.5,31.5,0,0,1,32,.5Z" />
|
||||
</svg>
|
||||
<h5>requests</h5>
|
||||
</div>
|
||||
<div title="activity page" class="navbar-item user-option" onclick="showPage(this, 'activity_page')">
|
||||
<svg class="icon" viewBox="0 0 64 64">
|
||||
<title>Asset 1</title>
|
||||
<path
|
||||
d="M60.38,1,32.8,33.23a1.77,1.77,0,0,0,1.34,2.92h9.63a.79.79,0,0,1,.71,1.13L33,61.36A1.49,1.49,0,0,0,35.49,63l27.58-32.2a1.77,1.77,0,0,0-1.34-2.92H52.1a.79.79,0,0,1-.71-1.13L62.85,2.64A1.49,1.49,0,0,0,60.38,1Z" />
|
||||
<line x1="10" y1="16" x2="29" y2="16" />
|
||||
@ -263,20 +427,13 @@
|
||||
<h4>Withdraw rupee</h4>
|
||||
</div>
|
||||
<div class="option" onclick="showPopup('request_rupee')">
|
||||
<svg class="icon banking" viewBox="0 0 52 60">
|
||||
<line x1="4" y1="33.5" x2="4" y2="25" />
|
||||
<polyline points="41.52 6.5 51 6.5 51 53.5 41.69 53.5" />
|
||||
<line x1="9" y1="55.5" x2="14" y2="55.5" />
|
||||
<line x1="43" y1="55.5" x2="45" y2="55.5" />
|
||||
<rect x="1" y="11.5" width="6" height="13.5" rx="2.76" />
|
||||
<rect x="1" y="33.5" width="6" height="13.5" rx="2.76" />
|
||||
<polyline points="3.81 11.5 3.81 6.5 41.5 1 41.69 59 3.81 53.5 3.81 47" />
|
||||
<svg class="icon" viewBox="0 0 64 64">
|
||||
<title>request</title>
|
||||
<path
|
||||
d="M35.64,39.19c0,6.31-3.25,11.45-7.22,11.48s-7-4.92-7-11.07,3.13-11.29,7.05-11.48S35.64,32.88,35.64,39.19Z"
|
||||
transform="translate(-6 -2)" />
|
||||
d="M24,26.19a8.67,8.67,0,0,1-.24-3.61,8.34,8.34,0,0,1,16.59,1.27c0,8.35-8.66,8.16-8.34,11.58,0,.09,0,4.73,0,4.73" />
|
||||
<line x1="32" y1="47.08" x2="32" y2="48.99" />
|
||||
<path
|
||||
d="M31.06,39.32c0,2.31-1.19,4.2-2.64,4.23s-2.62-1.79-2.62-4.08S27,35.3,28.42,35.24,31.06,37,31.06,39.32Z"
|
||||
transform="translate(-6 -2)" />
|
||||
d="M32,.5h0A31.5,31.5,0,0,1,63.5,32v0A31.5,31.5,0,0,1,32,63.5H2.48a2,2,0,0,1-2-2V32A31.5,31.5,0,0,1,32,.5Z" />
|
||||
</svg>
|
||||
<h4>Request rupee</h4>
|
||||
</div>
|
||||
@ -289,129 +446,6 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-container hide">
|
||||
<div id="cash_transfer" class="popup">
|
||||
<div class="container-header">
|
||||
<svg class="icon" onclick="hidePopup()" viewBox="0 0 64 64">
|
||||
<title>close</title>
|
||||
<line x1="64" y1="0" x2="0" y2="64" />
|
||||
<line x1="64" y1="64" x2="0" y2="0" />
|
||||
</svg>
|
||||
<h3>Transfer Rupee</h3>
|
||||
<div id="send_tokens_btn" class="action expand">
|
||||
<button class="primary-btn expand" type="submit" disabled>
|
||||
transfer
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Transfer your deposited Rupee tokens to any FLO address.<br>
|
||||
*Requires token to be deposited first.
|
||||
</p>
|
||||
<form autocomplete="off" onsubmit="return false">
|
||||
<div class="input">
|
||||
<input id="token_receiver" type="text" required>
|
||||
<label for="token_receiver">Reciever's FLO ID</label>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input id="token_amount" inputmode="numeric" type="number" required>
|
||||
<label for="token_amount">Amount</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-container hide">
|
||||
<div id="deposit_rupee" class="popup">
|
||||
<div class="container-header">
|
||||
<svg class="icon" onclick="hidePopup()" viewBox="0 0 64 64">
|
||||
<title>close</title>
|
||||
<line x1="64" y1="0" x2="0" y2="64" />
|
||||
<line x1="64" y1="64" x2="0" y2="0" />
|
||||
</svg>
|
||||
<h3>Deposit rupee</h3>
|
||||
<div id="request_tokens_btn" class="action expand">
|
||||
<button class="primary-btn expand" type="submit" disabled>
|
||||
deposit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Deposit rupee through UPI to use as Digital currency powered by blockchain.
|
||||
</p>
|
||||
<form autocomplete="off" onsubmit="return false">
|
||||
<div class="input">
|
||||
<input id="token_amount_to_buy" inputmode="numeric" type="number" required>
|
||||
<label for="token_amount_to_buy">Amount</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-container hide">
|
||||
<div id="withdraw_rupee" class="popup">
|
||||
<div class="container-header">
|
||||
<svg class="icon" onclick="hidePopup()" viewBox="0 0 64 64">
|
||||
<title>close</title>
|
||||
<line x1="64" y1="0" x2="0" y2="64" />
|
||||
<line x1="64" y1="64" x2="0" y2="0" />
|
||||
</svg>
|
||||
<h3>Withdraw rupee</h3>
|
||||
<div id="withdraw_cash_btn" class="action expand">
|
||||
<button class="primary-btn expand" type="submit" disabled>
|
||||
withdraw
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Withdraw or redeem your rupee tokens back to your specified UPI address.
|
||||
</p>
|
||||
<form autocomplete="off" onsubmit="return false">
|
||||
<div class="input">
|
||||
<input id="user_withdraw_upi" pattern="^[a-zA-z0-9]+@[a-zA-z0-9]+" type="text" required>
|
||||
<label for="user_withdraw_upi">Reciever's UPI address</label>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input id="withdraw_cash_amount" type="number" inputmode="numeric" required>
|
||||
<label for="withdraw_cash_amount">amount</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="popup-container hide">
|
||||
<div id="pay_anyone" class="popup">
|
||||
<div class="container-header">
|
||||
<svg class="icon" onclick="hidePopup()" viewBox="0 0 64 64">
|
||||
<title>close</title>
|
||||
<line x1="64" y1="0" x2="0" y2="64" />
|
||||
<line x1="64" y1="64" x2="0" y2="0" />
|
||||
</svg>
|
||||
<h3>Pay through cashier</h3>
|
||||
<div id="cnf_cash_payment" class="action expand">
|
||||
<button class="primary-btn expand" type="submit" disabled>
|
||||
pay
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Don't have enough token balance? Pay to our cashier through UPI and your cash will be
|
||||
transfered as Rupee tokens.
|
||||
</p>
|
||||
<p><strong id="pay_cashier_info"></strong></p>
|
||||
<form autocomplete="off" onsubmit="return false">
|
||||
<div class="input">
|
||||
<input id="recvr_id" type="text" required>
|
||||
<label for="recvr_id">Reciever's FLO ID</label>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input id="recvr_amount_to_pay" type="number" inputmode="numeric" required>
|
||||
<label for="recvr_amount_to_pay">Amount</label>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input id="paid_cashier_upi_txid" type="text" required>
|
||||
<label for="paid_cashier_upi_txid">UPI Txid/Ref Number</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="deposit" class="page hide-completely">
|
||||
<div class="container-header">
|
||||
@ -608,6 +642,15 @@
|
||||
<h2 class="light-text">No pay requests.</h2>
|
||||
</div>
|
||||
</section>
|
||||
<section id="request_page" class="page">
|
||||
<div class="container-header">
|
||||
<h2>Payment Requests</h2>
|
||||
</div>
|
||||
<p class="bottom-margin">These are payment requests you received.</p>
|
||||
<div id="payment_request_container" class="container">
|
||||
<h4>You don't have any requests.</h4>
|
||||
</div>
|
||||
</section>
|
||||
<section id="activity_page" class="page">
|
||||
<div class="container-header">
|
||||
<h2>Activity</h2>
|
||||
@ -617,17 +660,31 @@
|
||||
<option value="cashierMsg">Messages from cashier</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="bottom-margin">*If your request isn't completed in 12hrs, use <strong>REPORT</strong> to get assistance from our helpline.</p>
|
||||
<div id="deposit_activity_container" class="container activity-container"><h4>You haven't deposited rupee yet.</h4></div>
|
||||
<div id="withdraw_activity_container" class="container activity-container hide-completely"><h4>You haven't withdrawn rupee yet.</h4></div>
|
||||
<div id="cashier_message_container" class="container activity-container hide-completely"><h4>No messages from cashier.</h4></div>
|
||||
<p class="bottom-margin">*If your request isn't completed in 12hrs, use <strong>REPORT</strong> to get
|
||||
assistance from our helpline.</p>
|
||||
<div id="deposit_activity_container" class="container activity-container">
|
||||
<h4>You haven't deposited rupee yet.</h4>
|
||||
</div>
|
||||
<div id="withdraw_activity_container" class="container activity-container hide-completely">
|
||||
<h4>You haven't withdrawn rupee yet.</h4>
|
||||
</div>
|
||||
<div id="cashier_message_container" class="container activity-container hide-completely">
|
||||
<h4>No messages from cashier.</h4>
|
||||
</div>
|
||||
</section>
|
||||
<section id="profile_page" class="page hide-completely">
|
||||
<div class="container-header">
|
||||
<h2>Profile</h2>
|
||||
</div>
|
||||
<h5>FLO ID</h5>
|
||||
<h4 id="user_flo_id"></h4>
|
||||
<div class="copy-row">
|
||||
<h4 id="user_flo_id" class="copy"></h4>
|
||||
<svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64">
|
||||
<title>Copy</title>
|
||||
<rect x="16" y="16" width="48" height="48" rx="6" />
|
||||
<path d="M.5,47.52V6.5a6,6,0,0,1,6-6h41" />
|
||||
</svg>
|
||||
</div>
|
||||
<button class="primary-btn top-margin" onclick="signOut()">Sign out</button>
|
||||
</section>
|
||||
</main>
|
||||
@ -728,16 +785,17 @@
|
||||
time = 0;
|
||||
time = new Date(parseInt(vectorClock.split('_')[0]))
|
||||
card.classList.add('request')
|
||||
let timeFrag = time.toString().split(' '),
|
||||
let timeFrag = time.toString().split(' '),
|
||||
day = timeFrag[0],
|
||||
month = timeFrag[1],
|
||||
date = timeFrag[2],
|
||||
year = timeFrag[3],
|
||||
hours = timeFrag[4].slice(0, timeFrag[4].lastIndexOf(':')),
|
||||
finalTime = '';
|
||||
parseInt(hours.split(':')[0]) > 12 ? finalTime = 'PM' : finalTime = 'AM'
|
||||
setAttributes(card, { 'data-vectorClock': vectorClock, 'data-type': 'withdraw'})
|
||||
card.innerHTML = ` <h5>UPI Transanction ID</h5>
|
||||
parseInt(hours.split(':')[0]) > 12 ? finalTime = 'PM' : finalTime = 'AM'
|
||||
setAttributes(card, { 'data-vector-clock': vectorClock, 'data-type': 'deposit' })
|
||||
card.innerHTML = ` <h5 class="time">${hours} ${finalTime} ${day} ${date} ${month} ${year}</h5>
|
||||
<h5>UPI Transanction ID</h5>
|
||||
<div class="copy-row">
|
||||
<h4 class="copy">${txid}</h4>
|
||||
<svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64">
|
||||
@ -749,8 +807,7 @@
|
||||
<h5>Amount</h5>
|
||||
<h4 class="deposited">₹${amount}</h4>
|
||||
<div class="flex">
|
||||
<h5 class="time">${hours} ${finalTime} ${day} ${date} ${month} ${year}</h5>
|
||||
<button id="" class="report">
|
||||
<button class="report secondary-btn">
|
||||
report
|
||||
</button>
|
||||
</div>`;
|
||||
@ -761,16 +818,17 @@
|
||||
time = 0;
|
||||
time = new Date(parseInt(vectorClock.split('_')[0]))
|
||||
card.classList.add('request')
|
||||
let timeFrag = time.toString().split(' '),
|
||||
let timeFrag = time.toString().split(' '),
|
||||
day = timeFrag[0],
|
||||
month = timeFrag[1],
|
||||
date = timeFrag[2],
|
||||
year = timeFrag[3],
|
||||
hours = timeFrag[4].slice(0, timeFrag[4].lastIndexOf(':')),
|
||||
finalTime = '';
|
||||
parseInt(hours.split(':')[0]) > 12 ? finalTime = 'PM' : finalTime = 'AM'
|
||||
setAttributes(card, { 'data-vectorClock': vectorClock, 'data-type': 'withdraw'})
|
||||
card.innerHTML = ` <h5>Transanction ID</h5>
|
||||
parseInt(hours.split(':')[0]) > 12 ? finalTime = 'PM' : finalTime = 'AM'
|
||||
setAttributes(card, { 'data-vector-clock': vectorClock, 'data-type': 'withdraw' })
|
||||
card.innerHTML = ` <h5 class="time">${hours} ${finalTime} ${day} ${date} ${month} ${year}</h5>
|
||||
<h5>Transanction ID</h5>
|
||||
<div class="copy-row">
|
||||
<h4 class="copy">${txid}</h4>
|
||||
<svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64">
|
||||
@ -784,13 +842,46 @@
|
||||
<h5>Amount</h5>
|
||||
<h4 class="withdrawn">₹${amount}</h4>
|
||||
<div class="flex">
|
||||
<h5 class="time">${hours} ${finalTime} ${day} ${date} ${month} ${year}</h5>
|
||||
<button class="report">
|
||||
<button class="report secondary-btn">
|
||||
report
|
||||
</button>
|
||||
</div>`;
|
||||
return card;
|
||||
},
|
||||
paymentRequest(time, senderAddress, amount) {
|
||||
let card = document.createElement('div')
|
||||
card.classList.add('request')
|
||||
let timeFrag = new Date(time).toString().split(' '),
|
||||
day = timeFrag[0],
|
||||
month = timeFrag[1],
|
||||
date = timeFrag[2],
|
||||
year = timeFrag[3],
|
||||
hours = timeFrag[4].slice(0, timeFrag[4].lastIndexOf(':')),
|
||||
finalTime = '';
|
||||
parseInt(hours.split(':')[0]) > 12 ? finalTime = 'PM' : finalTime = 'AM'
|
||||
setAttributes(card, { 'data-sender-address': senderAddress, 'data-amount': amount })
|
||||
card.innerHTML = ` <h5 class="time">${hours} ${finalTime} ${day} ${date} ${month} ${year}</h5>
|
||||
<h5>Request from</h5>
|
||||
<div class="copy-row">
|
||||
<h4 class="copy">${senderAddress}</h4>
|
||||
<svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64">
|
||||
<title>Copy</title>
|
||||
<rect x="16" y="16" width="48" height="48" rx="6" />
|
||||
<path d="M.5,47.52V6.5a6,6,0,0,1,6-6h41" />
|
||||
</svg>
|
||||
</div>
|
||||
<h5 class="label">amount</h5>
|
||||
<h4>₹ ${amount}</h4>
|
||||
<div class="flex">
|
||||
<button class="decline-request secondary-btn">
|
||||
decline
|
||||
</button>
|
||||
<button class="send-rupee">
|
||||
pay
|
||||
</button>
|
||||
</div>`;
|
||||
return card;
|
||||
},
|
||||
cashierMessage(message) {
|
||||
let card = document.createElement('div')
|
||||
card.classList.add('cashier-message')
|
||||
@ -835,10 +926,17 @@
|
||||
zIndex++;
|
||||
thisPopup.parentNode.setAttribute('style', `z-index: ${zIndex}`)
|
||||
document.getElementById('main_page')
|
||||
setTimeout(() => {
|
||||
thisPopup.querySelectorAll('.input').forEach(input => {
|
||||
animateInput(input)
|
||||
formValidation(input.firstElementChild)
|
||||
})
|
||||
}, 100);
|
||||
if (popup === 'main_loader') {
|
||||
loader.classList.add('animate-loader')
|
||||
document.querySelector('main').classList.add('hide-completely')
|
||||
}
|
||||
return thisPopup;
|
||||
}
|
||||
|
||||
// hides the popup or modal
|
||||
@ -859,7 +957,7 @@
|
||||
document.querySelector('main').classList.remove('hide-completely')
|
||||
}
|
||||
if (popup === 'prompt') {
|
||||
if(thisPopup.querySelector('input').value == '')
|
||||
if (thisPopup.querySelector('input').value == '')
|
||||
thisPopup.querySelector('.cancel-btn').click()
|
||||
}
|
||||
}
|
||||
@ -932,28 +1030,28 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// displays a popup for asking user input. Use this instead of JS prompt
|
||||
let askPrompt = function (message, defaultVal) {
|
||||
return new Promise(resolve => {
|
||||
let popup = document.getElementById('prompt'),
|
||||
input = popup.querySelector('input');
|
||||
if(defaultVal)
|
||||
if (defaultVal)
|
||||
input.value = defaultVal;
|
||||
showPopup('prompt')
|
||||
input.focus()
|
||||
input.addEventListener('keyup', e => {
|
||||
if(e.key === 'Enter'){
|
||||
if (e.key === 'Enter') {
|
||||
resolve(input.value);
|
||||
hidePopup()
|
||||
}
|
||||
})
|
||||
popup.querySelector('#prompt_message').textContent = message;
|
||||
popup.querySelector('.submit-btn').onclick = () => {
|
||||
popup.querySelector('.submit-btn').onclick = () => {
|
||||
hidePopup()
|
||||
resolve(input.value);
|
||||
}
|
||||
popup.querySelector('.cancel-btn').onclick = () => {
|
||||
popup.querySelector('.cancel-btn').onclick = () => {
|
||||
hidePopup()
|
||||
resolve(null);
|
||||
}
|
||||
@ -986,7 +1084,7 @@
|
||||
}
|
||||
|
||||
function formValidation(formElement, e) {
|
||||
if (formElement.getAttribute('type') === 'number')
|
||||
if (formElement.getAttribute('type') === 'number' && typeof e !== 'undefined')
|
||||
preventNonNumericalInput(e);
|
||||
let parent = formElement.closest('.popup'),
|
||||
submitBtn = parent.querySelector("button[type='submit']");
|
||||
@ -996,6 +1094,13 @@
|
||||
submitBtn.disabled = true;
|
||||
}
|
||||
|
||||
function animateInput(parent){
|
||||
if (parent.firstElementChild.value !== '')
|
||||
parent.classList.add('animate-label')
|
||||
else
|
||||
parent.classList.remove('animate-label')
|
||||
}
|
||||
|
||||
let allForms = document.querySelectorAll('form');
|
||||
window.addEventListener('load', () => {
|
||||
/*document.querySelectorAll('.popup:not(.hide)').forEach(popup => {
|
||||
@ -1005,10 +1110,7 @@
|
||||
form.addEventListener('input', (e) => {
|
||||
if (e.target.closest('.input')) {
|
||||
let parent = e.target.closest('.input');
|
||||
if (parent.firstElementChild.value !== '')
|
||||
parent.classList.add('animate-label')
|
||||
else
|
||||
parent.classList.remove('animate-label')
|
||||
animateInput(parent)
|
||||
formValidation(parent.firstElementChild, e)
|
||||
}
|
||||
})
|
||||
@ -1067,29 +1169,56 @@
|
||||
}
|
||||
})
|
||||
})
|
||||
// Function for reporting complain
|
||||
let currentRequest = null;
|
||||
document.getElementById('activity_page').addEventListener('click', (e) => {
|
||||
if (e.target.closest('.report')){
|
||||
if (e.target.closest('.report')) {
|
||||
showPopup('report_popup')
|
||||
currentRequest = e.target.closest('.request')
|
||||
}
|
||||
})
|
||||
document.getElementById('activity_type').addEventListener('change', function (e){
|
||||
// Function for reporting complain
|
||||
document.getElementById('report_btn').addEventListener('click', (e) => {
|
||||
console.log(currentRequest.dataset.type, currentRequest.dataset.vectorClock)
|
||||
})
|
||||
// Function for requesting rupee
|
||||
document.getElementById('request_rupee_btn').addEventListener('click', (e) => {
|
||||
let requestedAddress = document.getElementById('requested_address').value,
|
||||
requestedAmount = document.getElementById('requested_amount').value
|
||||
|
||||
request_payment(requestedAddress, requestedAmount)
|
||||
})
|
||||
// Function for accepting payment request
|
||||
document.getElementById('payment_request_container').addEventListener('click', (e) => {
|
||||
if (e.target.closest('.send-rupee')) {
|
||||
let parent = e.target.closest('.request'),
|
||||
senderAddress = parent.dataset.senderAddress,
|
||||
amount = parent.dataset.amount;
|
||||
let popup = showPopup('cash_transfer');
|
||||
popup.querySelector('#token_receiver').value = senderAddress;
|
||||
popup.querySelector('#token_amount').value = amount;
|
||||
}
|
||||
if(e.target.closest('.decline-request')){
|
||||
e.target.closest('.request').remove()
|
||||
}
|
||||
})
|
||||
document.getElementById('activity_type').addEventListener('change', function (e) {
|
||||
showActivity(this.value)
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
let allActivities = document.querySelectorAll('.activity-container')
|
||||
function showActivity(activity){
|
||||
function showActivity(activity) {
|
||||
allActivities.forEach(act => {
|
||||
act.classList.add('hide-completely')
|
||||
})
|
||||
if(activity === 'deposits'){
|
||||
if (activity === 'deposits') {
|
||||
document.getElementById('deposit_activity_container').classList.remove('hide-completely')
|
||||
}
|
||||
if(activity === 'withdraws'){
|
||||
if (activity === 'withdraws') {
|
||||
document.getElementById('withdraw_activity_container').classList.remove('hide-completely')
|
||||
}
|
||||
if(activity === 'cashierMsg'){
|
||||
if (activity === 'cashierMsg') {
|
||||
document.getElementById('cashier_message_container').classList.remove('hide-completely')
|
||||
}
|
||||
}
|
||||
@ -1105,9 +1234,12 @@
|
||||
})
|
||||
document.getElementById(page).classList.remove('hide-completely')
|
||||
btn.classList.add('active', 'shrink')
|
||||
if(page === 'activity_page'){
|
||||
if (page === 'activity_page') {
|
||||
show_user_activities()
|
||||
}
|
||||
if (page === 'request_page') {
|
||||
show_payment_requests()
|
||||
}
|
||||
}
|
||||
|
||||
function signIn() {
|
||||
@ -1124,7 +1256,6 @@
|
||||
|
||||
function signOut() {
|
||||
askConfirmation('Do you want to sign out?').then((result) => {
|
||||
notify('Signed out')
|
||||
document.querySelector('main').classList.add('hide-completely')
|
||||
floDapps.clearCredentials()
|
||||
compactIDB.deleteDB().then((message) => {
|
||||
@ -9982,7 +10113,7 @@
|
||||
let inputVal = await signIn(`Enter ${type}: `)
|
||||
if (inputVal === null)
|
||||
reject(null)
|
||||
else{
|
||||
else {
|
||||
resolve(inputVal)
|
||||
hidePopup()
|
||||
showPage(document.getElementById('home_page_btn'), 'home_page')
|
||||
@ -10508,7 +10639,7 @@
|
||||
transferTokensManually();
|
||||
|
||||
const allCashierOptions = document.querySelectorAll('.cashier-option'),
|
||||
allUserOptions = document.querySelectorAll('.user-option'),
|
||||
allUserOptions = document.querySelectorAll('.user-option'),
|
||||
userType = document.getElementById('user_type')
|
||||
if (Object.keys(token_app.master_configurations.cashiers).includes(myFloID)) {
|
||||
allCashierOptions.forEach(option => {
|
||||
@ -11087,9 +11218,9 @@
|
||||
}
|
||||
|
||||
const depositActivityContainer = document.getElementById('deposit_activity_container'),
|
||||
withdrawActivityContainer = document.getElementById('withdraw_activity_container'),
|
||||
cashierMessageContainer = document.getElementById('cashier_message_container')
|
||||
|
||||
withdrawActivityContainer = document.getElementById('withdraw_activity_container'),
|
||||
cashierMessageContainer = document.getElementById('cashier_message_container')
|
||||
|
||||
async function show_user_activities() {
|
||||
try {
|
||||
await token_app.actions.retrieveLatestContent();
|
||||
@ -11097,9 +11228,9 @@
|
||||
const deposit_msg = floDapps.getNextGeneralData(token_app.master_configurations.TYPE_DEPOSITS, "0").reverse();
|
||||
const withdraw_msg = floDapps.getNextGeneralData(token_app.master_configurations.TYPE_WITHDRAWS, "0").reverse();
|
||||
const user_msg = floDapps.getNextGeneralData(token_app.master_configurations.TYPE_MSGES, "0").reverse();
|
||||
|
||||
|
||||
for (usr_deposits of deposit_msg) {
|
||||
let { upi_txid, deposit_amount} = usr_deposits.message;
|
||||
let { upi_txid, deposit_amount } = usr_deposits.message;
|
||||
frag.append(render.depositActivity(usr_deposits.vectorClock, upi_txid, deposit_amount))
|
||||
}
|
||||
if (frag.children.length)
|
||||
@ -11107,7 +11238,7 @@
|
||||
depositActivityContainer.append(frag)
|
||||
|
||||
for (usr_withdraws of withdraw_msg) {
|
||||
let {token_txid, withdrawer_upi, withdraw_amount} = usr_withdraws.message;
|
||||
let { token_txid, withdrawer_upi, withdraw_amount } = usr_withdraws.message;
|
||||
frag.append(render.withdrawActivity(usr_withdraws.vectorClock, token_txid, withdrawer_upi, withdraw_amount))
|
||||
}
|
||||
if (frag.children.length)
|
||||
@ -11117,7 +11248,7 @@
|
||||
for (msg of user_msg) {
|
||||
frag.append(render.cashierMessage(msg))
|
||||
}
|
||||
if(frag.children.length)
|
||||
if (frag.children.length)
|
||||
cashierMessageContainer.innerHTML = ``;
|
||||
cashierMessageContainer.append(frag)
|
||||
} catch (e) {
|
||||
@ -11182,6 +11313,7 @@
|
||||
{ receiverID: receiver_flo_id }).then(result => {
|
||||
console.log(result);
|
||||
notify('Request sent successfully.');
|
||||
hidePopup()
|
||||
});
|
||||
|
||||
return true;
|
||||
@ -11196,16 +11328,18 @@
|
||||
await floCloudAPI.requestGeneralData(token_app.master_configurations.TYPE_REQUEST_PAYMENT,
|
||||
{ receiverID: myFloID });
|
||||
|
||||
const general_msg = floDapps.getNextGeneralData(token_app.master_configurations.TYPE_REQUEST_PAYMENT, "0");
|
||||
const general_msg = floDapps.getNextGeneralData(token_app.master_configurations.TYPE_REQUEST_PAYMENT, "0").reverse();
|
||||
|
||||
let depositsContainer = document.getElementById("pending_deposits_container");
|
||||
depositsContainer.innerHTML = ``;
|
||||
let paymentRequestContainer = document.getElementById("payment_request_container");
|
||||
|
||||
for (const m of general_msg) {
|
||||
let { sender_flo_id, receiver_flo_id, amount, datetime } = m.message;
|
||||
console.log(sender_flo_id, receiver_flo_id, amount, datetime);
|
||||
console.log(sender_flo_id, amount, datetime);
|
||||
frag.append(render.paymentRequest(datetime, sender_flo_id, amount))
|
||||
}
|
||||
|
||||
if (frag.children.length)
|
||||
paymentRequestContainer.innerHTML = ``;
|
||||
paymentRequestContainer.append(frag)
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user