Merge pull request #20 from ranchimall/test-ui

Test UI
This commit is contained in:
sairaj mote 2022-05-10 23:59:00 +05:30 committed by GitHub
commit 937e6b6d0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 180 additions and 2155 deletions

View File

@ -724,27 +724,10 @@ ul {
align-content: flex-start;
}
#quick_actions_container {
display: grid;
gap: 0.5rem;
grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
}
.primary-action {
display: flex;
flex-direction: column;
align-items: center;
padding: 0.8rem;
gap: 0.5rem;
white-space: normal;
font-size: 0.8rem;
border-radius: 0.5rem;
font-weight: 400;
#wallet_section {
padding: 1rem;
background-color: rgba(var(--text-color), 0.03);
text-align: center;
}
.primary-action .icon {
fill: var(--accent-color);
border-radius: 0.5rem;
}
#rupee_balance span:first-of-type {
@ -754,16 +737,49 @@ ul {
font-size: 1rem;
}
.wallet-action {
background-color: rgba(var(--text-color), 0.03);
flex: 1;
#wallet_actions_wrapper {
display: grid;
gap: 0.5rem;
grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
}
.wallet-action:nth-of-type(2) {
margin-left: 0.5rem;
.wallet-action {
text-align: center;
align-items: center;
background-color: rgba(var(--text-color), 0.03);
font-weight: 500;
font-size: 0.8rem;
padding: 0.8rem 1rem;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.wallet-action .icon {
margin-right: 0.5rem;
fill: var(--accent-color);
margin-right: 0.3rem;
}
.cashier-status {
font-size: 0.9rem;
padding: 1rem 1.2rem;
border-radius: 1rem;
background-color: rgba(240, 230, 140, 0.8);
color: rgba(0, 0, 0, 0.8);
}
.cashier-status .icon {
fill: rgba(0, 0, 0, 0.8);
}
#topup_wallet__qr_code {
padding: 2vw;
background-color: rgba(var(--text-color), 0.03);
border-radius: 0.5rem;
height: 12rem;
justify-self: center;
}
#topup_wallet__qr_code svg {
width: 100%;
height: 100%;
fill: rgba(var(--text-color), 1);
}
#cashier_status {

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -680,26 +680,10 @@ ul {
padding-bottom: 5rem;
align-content: flex-start;
}
#quick_actions_container {
display: grid;
gap: 0.5rem;
grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
}
.primary-action {
display: flex;
flex-direction: column;
align-items: center;
padding: 0.8rem;
gap: 0.5rem;
white-space: normal;
font-size: 0.8rem;
border-radius: 0.5rem;
font-weight: 400;
#wallet_section {
padding: 1rem;
background-color: rgba(var(--text-color), 0.03);
text-align: center;
.icon {
fill: var(--accent-color);
}
border-radius: 0.5rem;
}
#rupee_balance {
span:first-of-type {
@ -709,15 +693,45 @@ ul {
font-size: 1rem;
}
}
#wallet_actions_wrapper {
display: grid;
gap: 0.5rem;
grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
}
.wallet-action {
text-align: center;
align-items: center;
background-color: rgba(var(--text-color), 0.03);
flex: 1;
&:nth-of-type(2) {
margin-left: 0.5rem;
}
font-weight: 500;
font-size: 0.8rem;
padding: 0.8rem 1rem;
text-transform: uppercase;
letter-spacing: 0.03em;
.icon {
margin-right: 0.5rem;
fill: var(--accent-color);
margin-right: 0.3rem;
}
}
.cashier-status {
font-size: 0.9rem;
padding: 1rem 1.2rem;
border-radius: 1rem;
background-color: rgb(240, 230, 140, 0.8);
color: rgba(0, 0, 0, 0.8);
.icon {
fill: rgba(0, 0, 0, 0.8);
}
}
#topup_wallet__qr_code {
padding: 2vw;
background-color: rgba(var(--text-color), 0.03);
border-radius: 0.5rem;
height: 12rem;
justify-self: center;
svg {
width: 100%;
height: 100%;
fill: rgba(var(--text-color), 1);
}
}
#cashier_status {
@ -1159,11 +1173,6 @@ ul {
}
}
}
#transaction {
// justify-content: center;
// text-align: center;
// justify-items: center;
}
#transaction__remark,
#transaction__note {
line-height: 1.6;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 128 128"><title>favicon</title><path d="M65,0H14.79V128l27.38-13V90.5l-17-.08,17-21.64V25.15H62c13.6,0,22.92,7.08,22.92,18.08S75.58,61.3,62,61.3H55.12L34.78,86.45H65c27.76,0,48.25-17.88,48.25-43.22S92.72,0,65,0Z"/></svg>

Before

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -155,29 +155,44 @@
</header>
<section id="home" class="inner-page hide">
<div id="user" class="hide grid user-element">
<div id="quick_actions_container">
<button class="primary-action" onclick="showTokenTransfer('send')">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M0 0h24v24H0z" fill="none" />
<path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" />
</svg>
Send rupee tokens
</button>
<button class="primary-action" onclick="showTokenTransfer('request')">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24"
height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
<g>
<rect fill="none" height="24" width="24" />
</g>
<g>
<div id="wallet_section" class="grid gap-1">
<div class="grid">
<h5>My FLO ID</h5>
<sm-copy class="logged-in-user-id" style="font-size: 0.9rem;"></sm-copy>
</div>
<h4>My wallet</h4>
<div class="grid gap-0-5">
<h5>Balance</h5>
<h1 class="h1" id="rupee_balance"></h1>
</div>
<div id="wallet_actions_wrapper">
<button class="wallet-action" onclick="showTokenTransfer('send')">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M0 0h24v24H0z" fill="none" />
<path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" />
</svg>
Send
</button>
<button class="wallet-action" onclick="showTokenTransfer('request')">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="M20,2H4.01c-1.1,0-2,0.9-2,2L2,22l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M12,6c1.1,0,2,0.9,2,2s-0.9,2-2,2 s-2-0.9-2-2S10.9,6,12,6z M16,14H8v-0.57c0-0.81,0.48-1.53,1.22-1.85C10.07,11.21,11.01,11,12,11c0.99,0,1.93,0.21,2.78,0.58 C15.52,11.9,16,12.62,16,13.43V14z" />
</g>
</svg>
Request rupee tokens
</button>
<!-- <button class="primary-action" onclick="">
d="M11 5v5.59H7.5l4.5 4.5 4.5-4.5H13V5h-2zm-5 9c0 3.31 2.69 6 6 6s6-2.69 6-6h-2c0 2.21-1.79 4-4 4s-4-1.79-4-4H6z" />
</svg>
Request
</button>
<button class="wallet-action cashier-option" onclick="showPopup('topup_wallet_popup')">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" />
</svg>
Top-up
</button>
<button class="wallet-action cashier-option" onclick="showPopup('withdraw_wallet_popup')">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24"
height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
<g>
@ -185,22 +200,17 @@
</g>
<g>
<g>
<path d="M3,11h8V3H3V11z M5,5h4v4H5V5z" />
<path d="M3,21h8v-8H3V21z M5,15h4v4H5V15z" />
<path d="M13,3v8h8V3H13z M19,9h-4V5h4V9z" />
<rect height="2" width="2" x="19" y="19" />
<rect height="2" width="2" x="13" y="13" />
<rect height="2" width="2" x="15" y="15" />
<rect height="2" width="2" x="13" y="17" />
<rect height="2" width="2" x="15" y="19" />
<rect height="2" width="2" x="17" y="17" />
<rect height="2" width="2" x="17" y="13" />
<rect height="2" width="2" x="19" y="15" />
<rect height="7" width="3" x="4" y="10" />
<rect height="7" width="3" x="10.5" y="10" />
<rect height="3" width="20" x="2" y="19" />
<rect height="7" width="3" x="17" y="10" />
<polygon points="12,1 2,6 2,8 22,8 22,6" />
</g>
</g>
</svg>
Scan FLO QR
</button> -->
Withdraw
</button>
</div>
</div>
<section class="flex direction-column h-100">
<div class="grid align-center gap-0-5">
@ -357,7 +367,7 @@
<div class="page__header">
<h1>Wallet</h1>
</div>
<div class="grid gap-1" style="width: min(24rem, 100%);">
<<<<<<< Updated upstream <div class="grid gap-1" style="width: min(24rem, 100%);">
<div class="grid gap-0-5">
<h5>Balance</h5>
<h1 class="h1" id="rupee_balance"></h1>
@ -398,6 +408,14 @@
Transfer to bank
</button>
</div>
</div>
<div id="wallet_history_wrapper" class="grid gap-1-5">
=======
<div id="wallet_history_wrapper" class="grid gap-1-5 user-element">
>>>>>>> Stashed changes
<div class="hide grid gap-1">
<h4>Pending transactions</h4>
<ul id="pending_wallet_transactions" class="grid gap-0-5"></ul>
</div>
<div id="wallet_history_wrapper" class="grid gap-1-5 user-element">
<div class="hide grid gap-1">
@ -412,6 +430,7 @@
</div>
</div>
</div>
</div>
</section>
<div id="transaction" class="inner-page hide grid gap-2">
<div class="grid gap-1 justify-start">
@ -446,7 +465,7 @@
<div class="grid gap-1">
<div class="grid">
<h5>My FLO ID</h5>
<sm-copy id="logged_in_user_id" style="font-size: 0.9rem;"></sm-copy>
<sm-copy class="logged-in-user-id" style="font-size: 0.9rem;"></sm-copy>
</div>
<sm-button class="danger justify-self-start" onclick="signOut()">Sign out</sm-button>
</div>
@ -771,15 +790,24 @@
<h4>Confirm</h4>
<p id="topup_wallet__details"></p>
</div>
<sm-copy id="topup_wallet__upi_id" style="font-weight: 700;"></sm-copy>
<p>After sending money, please enter the transaction ID of completed transaction.</p>
<sm-input id="topup_wallet__txid" minlength="12" maxlength="12"
error-text="Please enter UPI transaction ID of money you sent to continue."
placeholder="UPI transaction ID" autofocus animate required></sm-input>
<div class="multi-state-button">
<button id="topup_wallet_button" class="button button--primary cta" onclick="depositMoneyToWallet()"
type="submit">Confirm</button>
</div>
<div class="grid gap-1 justify-center text-center">
<div class="grid gap-0-5">
<p>Scan QR code</p>
<div id="topup_wallet__qr_code"></div>
</div>
<sm-copy id="topup_wallet__upi_id" style="font-weight: 700;"></sm-copy>
<a href="upi://pay?pa=UPIID@oksbi&amp;cu=INR">Pay Now !</a>
</div>
<p>After sending money, please enter the transaction ID of completed transaction.</p>
<sm-copy id="topup_wallet__upi_id" style="font-weight: 700;"></sm-copy>
<p>After sending money, please enter the transaction ID of completed transaction.</p>
<sm-input id="topup_wallet__txid" minlength="12" maxlength="12"
error-text="Please enter UPI transaction ID of money you sent to continue."
placeholder="UPI transaction ID" autofocus animate required></sm-input>
<div class="multi-state-button">
<button id="topup_wallet_button" class="button button--primary cta" onclick="depositMoneyToWallet()"
type="submit">Confirm</button>
</div>
</sm-form>
<div class="grid gap-0-5 hide justify-center text-center">
<svg class="icon user-action-result__icon success" xmlns="http://www.w3.org/2000/svg" height="24px"
@ -801,6 +829,13 @@
<p id="topup_failed_reason"></p>
</div>
</div>
<div class="cashier-status hide flex align-center">
<svg class="icon margin-right-0-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" />
</svg>
<span>Cashier is currently offline. Please check back again after a while.</span>
</div>
</sm-popup>
<sm-popup id="withdraw_wallet_popup">
<header slot="header" class="popup__header">
@ -875,6 +910,13 @@
<p id="withdrawal_failed_reason"></p>
</div>
</div>
<div class="cashier-status hide flex align-center">
<svg class="icon margin-right-0-5" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24"
width="24px" fill="#000000">
<path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" />
</svg>
<span>Cashier is currently offline. Please check back again after a while.</span>
</div>
</sm-popup>
<sm-popup id="save_upi_popup">
<header slot="header" class="popup__header">
@ -1044,7 +1086,7 @@
}
console.log(`Welcome ${myFloID}`);
getRef('logged_in_user_id').value = myFloID;
document.querySelectorAll('.logged-in-user-id').forEach(elem => elem.value = myFloID);
floGlobals.isSubAdmin = floGlobals.subAdmins.includes(myFloID)
tokenAPI.getBalance(myFloID).then(balance => {
const formattedBalance = formatAmount(balance)

2047
logo.ai

File diff suppressed because one or more lines are too long

View File

@ -32,11 +32,13 @@ User.init = function () {
cashierStatus[i] = d[i];
//Add any UI_fn if any
if (User.findCashier()) {
getRef('cashier_status').classList.add('hide')
document.querySelectorAll('.wallet-action').forEach(elem => elem.disabled = false);
getRef('topup_wallet_process').classList.remove('hide')
getRef('withdraw_wallet_process').classList.remove('hide')
document.querySelectorAll('.cashier-status').forEach(elem => elem.classList.add('hide'))
} else {
getRef('cashier_status').classList.remove('hide')
document.querySelectorAll('.wallet-action').forEach(elem => elem.disabled = true);
getRef('topup_wallet_process').classList.add('hide')
getRef('withdraw_wallet_process').classList.add('hide')
document.querySelectorAll('.cashier-status').forEach(elem => elem.classList.remove('hide'))
}
}
}))

View File

@ -44,6 +44,10 @@ function continueWalletTopup() {
let amount = parseFloat(getRef('request_cashier_amount').value.trim());
getRef('topup_wallet__details').innerHTML = `Send <b>${formatAmount(amount)}</b> to UPI ID below`;
getRef('topup_wallet__upi_id').value = cashierUPI[cashier];
fetch(`https://upiqr.in/api/qr?name=cashier&vpa=${cashierUPI[cashier]}`).then(res => {
res.text().then(data => getRef('topup_wallet__qr_code').innerHTML = data)
.catch(err => console.error(err));
}).catch(err => console.error(err));
showProcessStage('topup_wallet_process', 1)
getRef('topup_wallet__txid').focusIn();
}