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);
transition: height 0.3s, transform 0.3s, opacity 0.3s;
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,
p:first-letter{
@ -2180,7 +2190,16 @@ line-height: 1.6;
flex: 1;
color: rgba(var(--text-color), 0.9);
overflow-wrap: break-word;
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%;
}
.notification:last-of-type{
margin-bottom: 0;
@ -2315,8 +2334,7 @@ customElements.define('sm-notifications', class extends HTMLElement {
composition += `
<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"/>
</svg>
`
</svg>`
}
composition += `
<p>${messageBody}</p>

View File

@ -10,7 +10,7 @@
}
body {
--accent-color: #303F9F;
--accent-color: #2237CD;
--text-color: 17, 17, 17;
--text-color-light: 85, 85, 85;
--foreground-color: 255, 255, 255;
@ -556,7 +556,14 @@ form {
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;
width: 1.4rem;
padding: 0.3rem;
@ -636,31 +643,52 @@ form {
.user-panel {
position: relative;
padding: 1.5rem;
border-radius: 0.6rem;
background: radial-gradient(circle at top left, #EF6C00 20%, #C51162 30%, #4A148C 40%, #251f44);
box-shadow: 0 0.1rem 0.1rem #00000020, 0 2rem 1rem -1rem #00000040;
border-radius: 0.5rem;
background: linear-gradient(135deg, var(--accent-color), #2F2B76);
color: rgba(var(--foreground-color), 1);
box-shadow: 0 0.1rem 0.1rem #00000010, 0 1rem 1rem -1rem #00000010;
align-self: flex-start;
}
.user-panel .icon {
stroke: rgba(var(--foreground-color), 1);
}
.user-panel .copy-row {
margin-bottom: 1.5rem;
text-shadow: 0.1rem 0.1rem 0.1rem #000000;
margin-bottom: 1rem;
padding-bottom: 1rem;
border-bottom: solid 1px rgba(var(--foreground-color), 0.3);
}
.user-panel .grid {
margin-top: 0.5rem;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
margin-top: 1rem;
}
.user-panel .grid h5 {
font-size: 1rem;
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 {
font-weight: 500;
color: rgba(var(--foreground-color), 0.9);
}
.options-tab {
@ -745,7 +773,7 @@ sm-tab-header {
sm-tab::part(tab) {
padding: 0.8rem 0.4rem;
text-transform: uppercase;
text-transform: capitalize;
}
sm-panel {
@ -982,7 +1010,6 @@ sm-panel {
}
#main_loader h3 {
width: 100%;
text-transform: uppercase;
font-weight: 400;
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 {
--accent-color: #303F9F;
--accent-color: #2237CD;
--text-color: 17, 17, 17;
--text-color-light: 85, 85, 85;
--foreground-color: 255, 255, 255;
@ -598,7 +598,12 @@ form {
justify-content: space-between;
}
#display_balance {
.display-balance {
gap: 1rem;
grid-auto-flow: row;
.balance{
width: 100%;
}
.icon {
height: 1.4rem;
width: 1.4rem;
@ -688,34 +693,51 @@ form {
.user-panel {
position: relative;
padding: 1.5rem;
border-radius: 0.6rem;
background: radial-gradient(circle at top left, #EF6C00 20%, #C51162 30%, #4A148C 40%, #251f44);
box-shadow: 0 0.1rem 0.1rem #00000020, 0 2rem 1rem -1rem #00000040;
border-radius: 0.5rem;
background: linear-gradient(135deg, var(--accent-color), #2F2B76);
color: rgba(var(--foreground-color), 1);
box-shadow: 0 0.1rem 0.1rem #00000010, 0 1rem 1rem -1rem #00000010;
align-self: flex-start;
.icon {
.icon{
stroke: rgba(var(--foreground-color), 1);
}
.copy-row {
margin-bottom: 1.5rem;
text-shadow: 0.1rem 0.1rem 0.1rem #000000;
margin-bottom: 1rem;
padding-bottom: 1rem;
border-bottom: solid 1px rgba(var(--foreground-color), 0.3);
}
.grid {
margin-top: 0.5rem;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
margin-top: 1rem;
h5 {
font-size: 1rem;
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 {
font-weight: 500;
color: rgba(var(--foreground-color), 0.9);
}
.options-tab {
@ -820,7 +842,7 @@ sm-tab-header {
}
sm-tab::part(tab){
padding: 0.8rem 0.4rem;
text-transform: uppercase;
text-transform: capitalize;
}
sm-panel{
width: 100%;
@ -1095,7 +1117,6 @@ sm-panel{
h3 {
width: 100%;
text-transform: uppercase;
font-weight: 400;
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"/>
</svg>
</div>
<div id="display_balance" class="grid grid-2">
<div class="display-balance grid">
<div class="balance">
<h5>Rupee</h5>
<h3 class="token-balance">0</h3>
</div>
<div class="balance">
<h5>Unconfirmed Rupee</h5>
<h3 class="uncnf-token-balance">0</h3>
</div>
<p>Digital representation of Indian rupee</p>
<h4 class="token-balance">0</h3>
</div>
<div class="balance">
<h5>FLO</h5>
<p>Your FLO blockchain balance</p>
<h4 class="flo-balance">0</h4>
</div>
<div class="balance">
<h5>FLO</h5>
<h3 class="flo-balance">0</h3>
<h5>Unconfirmed Rupee</h5>
<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>
</section>
<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"/>
</svg>
</div>
<div id="display_balance" class="grid grid-2">
<div class="display-balance grid">
<div class="balance">
<h5>Rupee</h5>
<h3 class="token-balance">0</h3>
</div>
<div class="balance">
<h5>Unconfirmed Rupee</h5>
<h3 class="uncnf-token-balance">0</h3>
<h4 class="token-balance">0</h3>
</div>
<div class="balance">
<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>
@ -1655,7 +1658,13 @@
paymentRequestId = parent.dataset.paymentRequestId;
if (await confirmation(
`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()
}
}
@ -11123,7 +11132,7 @@
try {
for (const ds of dataStores) {
compactIDB.clearData(ds);
}
}
return true;
} catch (e) {
console.error(e);
@ -11174,8 +11183,12 @@
{
"FCja6sLv58e3RMy41T5AmWyvXEWesqBCkX": {
"upi_id": "8507742774@ybl"
},
"FHW2kgYEhDt85vjAiMMF7bQqdP74L7iwvQ": {
}
}`
text = removeWhiteSpaces(text);
return text;
/*
"FHW2kgYEhDt85vjAiMMF7bQqdP74L7iwvQ": {
"upi_id": "8340617958@ybl"
},
"FTmJ6QeBjDFjdqS6Zs4V5amac2X19AjXcF": {
@ -11190,9 +11203,7 @@
"FQ6udJuTbGDa2kWZAkmNpwgHaUEeYLPAtt": {
"upi_id": "krishraj1012-2@okicici"
}
}`
text = removeWhiteSpaces(text);
return text;
*/
const master_data = await ajaxGet(
`${floGlobals.apiURL.FLO[1]}/api/txs/?address=${token_app.masterFLOAddress}`);
if (typeof master_data === "object" && typeof master_data.txs === "object") {
@ -11610,7 +11621,7 @@
receiverID: myFloID
});
notify(`Transfer successful: <span class="breakable">${flo_txid}</span>.`, 'success', '', true);
notify(`Transfer successful: ${flo_txid}`, 'success', true, true);
return true;
}
@ -11722,10 +11733,17 @@
hidePopup()
return false;
} else {
notify(`Transaction successful: <span class="breakable">${flo_txid}</span>.`, 'success', '', true);
notify(`Transaction successful: ${flo_txid}`, 'success', true, true);
if (payingRequested) {
payment_request_status(currentPaymentRequest.requestId, 'APPROVED')
showPayRequests()
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===currentPaymentRequest.requestId)
.map(m=>m.message)[0];
payment_request_status(original_req, 'APPROVED')
showPayRequests();
}
hidePopup()
return true;
@ -11776,7 +11794,7 @@
async function showPayRequests() {
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({
type: token_app.master_configurations.TYPE_PROCESSED_PAY_THROUGH_CASHIER,
@ -11874,7 +11892,7 @@
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);
return true;
}
@ -12071,7 +12089,7 @@
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);
hidePopup()
}