This commit is contained in:
sairaj mote 2020-09-12 14:59:08 +05:30
parent 180bcd67c5
commit 354ceb7029
5 changed files with 148 additions and 64 deletions

View File

@ -2167,6 +2167,16 @@ box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.1),
background: rgba(var(--foreground-color), 1); background: rgba(var(--foreground-color), 1);
transition: height 0.3s, transform 0.3s, opacity 0.3s; transition: height 0.3s, transform 0.3s, opacity 0.3s;
overflow: hidden; overflow: hidden;
overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
max-width: 100%;
} }
h4:first-letter, h4:first-letter,
p:first-letter{ p:first-letter{
@ -2180,7 +2190,16 @@ line-height: 1.6;
flex: 1; flex: 1;
color: rgba(var(--text-color), 0.9); color: rgba(var(--text-color), 0.9);
overflow-wrap: break-word; overflow-wrap: break-word;
overflow-wrap: break-word;
word-wrap: break-word; word-wrap: break-word;
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
max-width: 100%;
} }
.notification:last-of-type{ .notification:last-of-type{
margin-bottom: 0; margin-bottom: 0;
@ -2315,8 +2334,7 @@ customElements.define('sm-notifications', class extends HTMLElement {
composition += ` composition += `
<svg class="notification-icon icon success-icon" viewBox="0 0 64 64"> <svg class="notification-icon icon success-icon" viewBox="0 0 64 64">
<polyline points="0.35 31.82 21.45 52.98 63.65 10.66"/> <polyline points="0.35 31.82 21.45 52.98 63.65 10.66"/>
</svg> </svg>`
`
} }
composition += ` composition += `
<p>${messageBody}</p> <p>${messageBody}</p>

View File

@ -10,7 +10,7 @@
} }
body { body {
--accent-color: #303F9F; --accent-color: #2237CD;
--text-color: 17, 17, 17; --text-color: 17, 17, 17;
--text-color-light: 85, 85, 85; --text-color-light: 85, 85, 85;
--foreground-color: 255, 255, 255; --foreground-color: 255, 255, 255;
@ -556,7 +556,14 @@ form {
justify-content: space-between; justify-content: space-between;
} }
#display_balance .icon { .display-balance {
gap: 1rem;
grid-auto-flow: row;
}
.display-balance .balance {
width: 100%;
}
.display-balance .icon {
height: 1.4rem; height: 1.4rem;
width: 1.4rem; width: 1.4rem;
padding: 0.3rem; padding: 0.3rem;
@ -636,31 +643,52 @@ form {
.user-panel { .user-panel {
position: relative; position: relative;
padding: 1.5rem; padding: 1.5rem;
border-radius: 0.6rem; border-radius: 0.5rem;
background: radial-gradient(circle at top left, #EF6C00 20%, #C51162 30%, #4A148C 40%, #251f44); background: linear-gradient(135deg, var(--accent-color), #2F2B76);
box-shadow: 0 0.1rem 0.1rem #00000020, 0 2rem 1rem -1rem #00000040;
color: rgba(var(--foreground-color), 1); color: rgba(var(--foreground-color), 1);
box-shadow: 0 0.1rem 0.1rem #00000010, 0 1rem 1rem -1rem #00000010;
align-self: flex-start; align-self: flex-start;
} }
.user-panel .icon { .user-panel .icon {
stroke: rgba(var(--foreground-color), 1); stroke: rgba(var(--foreground-color), 1);
} }
.user-panel .copy-row { .user-panel .copy-row {
margin-bottom: 1.5rem; margin-bottom: 1rem;
text-shadow: 0.1rem 0.1rem 0.1rem #000000; padding-bottom: 1rem;
border-bottom: solid 1px rgba(var(--foreground-color), 0.3);
} }
.user-panel .grid { .user-panel .grid {
margin-top: 0.5rem; gap: 1.5rem;
grid-template-columns: 1fr 1fr; margin-top: 1rem;
} }
.user-panel .grid h5 { .user-panel .grid h5 {
font-size: 1rem;
font-weight: 500; font-weight: 500;
color: rgba(var(--foreground-color), 0.8); }
.user-panel .grid h4 {
font-size: 1.2rem;
}
.user-panel .grid P {
font-size: 0.8rem;
opacity: 0.9;
color: rgba(var(--foreground-color), 1);
margin-bottom: 0 !important;
max-width: 30ch;
}
.balance {
display: grid;
gap: 0 1rem;
grid-template-columns: 1fr auto;
grid-template-areas: ". balance" ". balance";
align-items: center;
}
.balance h4 {
grid-area: balance;
} }
.user-type { .user-type {
font-weight: 500; font-weight: 500;
color: rgba(var(--foreground-color), 0.9);
} }
.options-tab { .options-tab {
@ -745,7 +773,7 @@ sm-tab-header {
sm-tab::part(tab) { sm-tab::part(tab) {
padding: 0.8rem 0.4rem; padding: 0.8rem 0.4rem;
text-transform: uppercase; text-transform: capitalize;
} }
sm-panel { sm-panel {
@ -982,7 +1010,6 @@ sm-panel {
} }
#main_loader h3 { #main_loader h3 {
width: 100%; width: 100%;
text-transform: uppercase;
font-weight: 400; font-weight: 400;
word-spacing: 0.16em; word-spacing: 0.16em;
} }

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@
} }
body { body {
--accent-color: #303F9F; --accent-color: #2237CD;
--text-color: 17, 17, 17; --text-color: 17, 17, 17;
--text-color-light: 85, 85, 85; --text-color-light: 85, 85, 85;
--foreground-color: 255, 255, 255; --foreground-color: 255, 255, 255;
@ -598,7 +598,12 @@ form {
justify-content: space-between; justify-content: space-between;
} }
#display_balance { .display-balance {
gap: 1rem;
grid-auto-flow: row;
.balance{
width: 100%;
}
.icon { .icon {
height: 1.4rem; height: 1.4rem;
width: 1.4rem; width: 1.4rem;
@ -688,34 +693,51 @@ form {
.user-panel { .user-panel {
position: relative; position: relative;
padding: 1.5rem; padding: 1.5rem;
border-radius: 0.6rem; border-radius: 0.5rem;
background: radial-gradient(circle at top left, #EF6C00 20%, #C51162 30%, #4A148C 40%, #251f44); background: linear-gradient(135deg, var(--accent-color), #2F2B76);
box-shadow: 0 0.1rem 0.1rem #00000020, 0 2rem 1rem -1rem #00000040;
color: rgba(var(--foreground-color), 1); color: rgba(var(--foreground-color), 1);
box-shadow: 0 0.1rem 0.1rem #00000010, 0 1rem 1rem -1rem #00000010;
align-self: flex-start; align-self: flex-start;
.icon { .icon{
stroke: rgba(var(--foreground-color), 1); stroke: rgba(var(--foreground-color), 1);
} }
.copy-row { .copy-row {
margin-bottom: 1.5rem; margin-bottom: 1rem;
text-shadow: 0.1rem 0.1rem 0.1rem #000000; padding-bottom: 1rem;
border-bottom: solid 1px rgba(var(--foreground-color), 0.3);
} }
.grid { .grid {
margin-top: 0.5rem; gap: 1.5rem;
grid-template-columns: 1fr 1fr; margin-top: 1rem;
h5 { h5 {
font-size: 1rem;
font-weight: 500; font-weight: 500;
color: rgba(var(--foreground-color), 0.8);
} }
h4{
font-size: 1.2rem;
}
P{
font-size: 0.8rem;
opacity: 0.9;
color: rgba(var(--foreground-color), 1);
margin-bottom: 0 !important;
max-width: 30ch;
}
}
}
.balance{
display: grid;
gap: 0 1rem;
grid-template-columns: 1fr auto;
grid-template-areas: '. balance' '. balance';
align-items: center;
h4{
grid-area: balance;
} }
} }
.user-type { .user-type {
font-weight: 500; font-weight: 500;
color: rgba(var(--foreground-color), 0.9);
} }
.options-tab { .options-tab {
@ -820,7 +842,7 @@ sm-tab-header {
} }
sm-tab::part(tab){ sm-tab::part(tab){
padding: 0.8rem 0.4rem; padding: 0.8rem 0.4rem;
text-transform: uppercase; text-transform: capitalize;
} }
sm-panel{ sm-panel{
width: 100%; width: 100%;
@ -1095,7 +1117,6 @@ sm-panel{
h3 { h3 {
width: 100%; width: 100%;
text-transform: uppercase;
font-weight: 400; font-weight: 400;
word-spacing: 0.16em; word-spacing: 0.16em;
} }

View File

@ -433,20 +433,23 @@
<path d="M56.61,44.63A24.65,24.65,0,0,1,50,56.24a25.1,25.1,0,0,1-35.31,0,24.67,24.67,0,0,1,0-35,25.1,25.1,0,0,1,35.31,0"/> <path d="M56.61,44.63A24.65,24.65,0,0,1,50,56.24a25.1,25.1,0,0,1-35.31,0,24.67,24.67,0,0,1,0-35,25.1,25.1,0,0,1,35.31,0"/>
</svg> </svg>
</div> </div>
<div id="display_balance" class="grid grid-2"> <div class="display-balance grid">
<div class="balance"> <div class="balance">
<h5>Rupee</h5> <h5>Rupee</h5>
<h3 class="token-balance">0</h3> <p>Digital representation of Indian rupee</p>
</div> <h4 class="token-balance">0</h3>
<div class="balance"> </div>
<h5>Unconfirmed Rupee</h5> <div class="balance">
<h3 class="uncnf-token-balance">0</h3> <h5>FLO</h5>
</div> <p>Your FLO blockchain balance</p>
<h4 class="flo-balance">0</h4>
</div>
<div class="balance"> <div class="balance">
<h5>FLO</h5> <h5>Unconfirmed Rupee</h5>
<h3 class="flo-balance">0</h3> <p>Rupee that is mid transaction. This represents rupee that is not proccesed yet.</p>
<h4 class="uncnf-token-balance">0</h4>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
<section id="deposit" class="page hide-completely"> <section id="deposit" class="page hide-completely">
@ -659,18 +662,18 @@
<path d="M56.61,44.63A24.65,24.65,0,0,1,50,56.24a25.1,25.1,0,0,1-35.31,0,24.67,24.67,0,0,1,0-35,25.1,25.1,0,0,1,35.31,0"/> <path d="M56.61,44.63A24.65,24.65,0,0,1,50,56.24a25.1,25.1,0,0,1-35.31,0,24.67,24.67,0,0,1,0-35,25.1,25.1,0,0,1,35.31,0"/>
</svg> </svg>
</div> </div>
<div id="display_balance" class="grid grid-2"> <div class="display-balance grid">
<div class="balance"> <div class="balance">
<h5>Rupee</h5> <h5>Rupee</h5>
<h3 class="token-balance">0</h3> <h4 class="token-balance">0</h3>
</div>
<div class="balance">
<h5>Unconfirmed Rupee</h5>
<h3 class="uncnf-token-balance">0</h3>
</div> </div>
<div class="balance"> <div class="balance">
<h5>FLO</h5> <h5>FLO</h5>
<h3 class="flo-balance">0</h3> <h4 class="flo-balance">0</h4>
</div>
<div class="balance">
<h5>Unconfirmed Rupee</h5>
<h4 class="uncnf-token-balance">0</h4>
</div> </div>
</div> </div>
</div> </div>
@ -1655,7 +1658,13 @@
paymentRequestId = parent.dataset.paymentRequestId; paymentRequestId = parent.dataset.paymentRequestId;
if (await confirmation( if (await confirmation(
`Do want to decline this request? This will remove the request.`)) { `Do want to decline this request? This will remove the request.`)) {
payment_request_status(paymentRequestId, 'DECLINED') const all_reqs = floDapps.getNextGeneralData(token_app.master_configurations
.TYPE_REQUEST_PAYMENT, "0").reverse();
const original_req = all_reqs.filter(f=>f.message.pay_req_id===paymentRequestId)
.map(m=>m.message)[0];
payment_request_status(original_req, 'DECLINED')
e.target.closest('.request').remove() e.target.closest('.request').remove()
} }
} }
@ -11123,7 +11132,7 @@
try { try {
for (const ds of dataStores) { for (const ds of dataStores) {
compactIDB.clearData(ds); compactIDB.clearData(ds);
} }
return true; return true;
} catch (e) { } catch (e) {
console.error(e); console.error(e);
@ -11174,8 +11183,12 @@
{ {
"FCja6sLv58e3RMy41T5AmWyvXEWesqBCkX": { "FCja6sLv58e3RMy41T5AmWyvXEWesqBCkX": {
"upi_id": "8507742774@ybl" "upi_id": "8507742774@ybl"
}, }
"FHW2kgYEhDt85vjAiMMF7bQqdP74L7iwvQ": { }`
text = removeWhiteSpaces(text);
return text;
/*
"FHW2kgYEhDt85vjAiMMF7bQqdP74L7iwvQ": {
"upi_id": "8340617958@ybl" "upi_id": "8340617958@ybl"
}, },
"FTmJ6QeBjDFjdqS6Zs4V5amac2X19AjXcF": { "FTmJ6QeBjDFjdqS6Zs4V5amac2X19AjXcF": {
@ -11190,9 +11203,7 @@
"FQ6udJuTbGDa2kWZAkmNpwgHaUEeYLPAtt": { "FQ6udJuTbGDa2kWZAkmNpwgHaUEeYLPAtt": {
"upi_id": "krishraj1012-2@okicici" "upi_id": "krishraj1012-2@okicici"
} }
}` */
text = removeWhiteSpaces(text);
return text;
const master_data = await ajaxGet( const master_data = await ajaxGet(
`${floGlobals.apiURL.FLO[1]}/api/txs/?address=${token_app.masterFLOAddress}`); `${floGlobals.apiURL.FLO[1]}/api/txs/?address=${token_app.masterFLOAddress}`);
if (typeof master_data === "object" && typeof master_data.txs === "object") { if (typeof master_data === "object" && typeof master_data.txs === "object") {
@ -11610,7 +11621,7 @@
receiverID: myFloID receiverID: myFloID
}); });
notify(`Transfer successful: <span class="breakable">${flo_txid}</span>.`, 'success', '', true); notify(`Transfer successful: ${flo_txid}`, 'success', true, true);
return true; return true;
} }
@ -11722,10 +11733,17 @@
hidePopup() hidePopup()
return false; return false;
} else { } else {
notify(`Transaction successful: <span class="breakable">${flo_txid}</span>.`, 'success', '', true); notify(`Transaction successful: ${flo_txid}`, 'success', true, true);
if (payingRequested) { if (payingRequested) {
payment_request_status(currentPaymentRequest.requestId, 'APPROVED') const all_reqs = floDapps.getNextGeneralData(token_app.master_configurations
showPayRequests() .TYPE_REQUEST_PAYMENT, "0").reverse();
const original_req = all_reqs
.filter(f=>f.message.pay_req_id===currentPaymentRequest.requestId)
.map(m=>m.message)[0];
payment_request_status(original_req, 'APPROVED')
showPayRequests();
} }
hidePopup() hidePopup()
return true; return true;
@ -11776,7 +11794,7 @@
async function showPayRequests() { async function showPayRequests() {
try { try {
if (!Object.keys(token_app.master_configurations.cashiers).includes(myFloID)) return; //if (!Object.keys(token_app.master_configurations.cashiers).includes(myFloID)) return;
let finished_tasks = await floCloudAPI.requestApplicationData({ let finished_tasks = await floCloudAPI.requestApplicationData({
type: token_app.master_configurations.TYPE_PROCESSED_PAY_THROUGH_CASHIER, type: token_app.master_configurations.TYPE_PROCESSED_PAY_THROUGH_CASHIER,
@ -11874,7 +11892,7 @@
receiverID: myFloID receiverID: myFloID
}); });
notify(`Transaction successful: <span class="breakable">${flo_txid}</span>. notify(`Transaction successful: ${flo_txid}.
INR ${amount_to_pay} sent to ${vendor_flo_id}`, 'success', '', true); INR ${amount_to_pay} sent to ${vendor_flo_id}`, 'success', '', true);
return true; return true;
} }
@ -12071,7 +12089,7 @@
senderIDs: [myFloID] senderIDs: [myFloID]
}); });
notify(`You have sent cash to <span class="breakable">${recvr_id}</span> through our cashier service (${cashier_upi}). notify(`You have sent cash to <div class="breakable">${recvr_id}</div> through our cashier service (${cashier_upi}).
Once the cashier receives your payment, he will transfer it to ${recvr_id}.`, '', true, true); Once the cashier receives your payment, he will transfer it to ${recvr_id}.`, '', true, true);
hidePopup() hidePopup()
} }