diff --git a/components.js b/components.js index a4dcee8..7a960b1 100644 --- a/components.js +++ b/components.js @@ -210,14 +210,13 @@ border: none; padding: 0.7em 1em; border-radius: 0.3em; transition: opacity 0.3s; - background: rgba(var(--text-color), 0.1); + background: rgba(var(--text-color), 0.06); box-shadow: 0 0 0 0.1em rgba(var(--text-color), 0.2) inset; font-family: var(--font-family); width: 100% outline: none; min-width: 0; } - input:focus{ caret-color: var(--accent-color); } @@ -2024,11 +2023,12 @@ smCarousel.innerHTML = ` scroll-snap-type: x mandatory; } .indicators{ - display: flex; + display: grid; + grid-auto-flow: column; justify-content: center; position: absolute; bottom: -1rem; - gap: 1rem; + gap: 0.5rem; width: 100%; } .dot{ diff --git a/css/card-back.svg b/css/card-back.svg index 729f67a..e523bbf 100644 --- a/css/card-back.svg +++ b/css/card-back.svg @@ -1 +1 @@ -card-back \ No newline at end of file +card-back \ No newline at end of file diff --git a/css/main.css b/css/main.css index 13fc135..a783533 100644 --- a/css/main.css +++ b/css/main.css @@ -400,19 +400,10 @@ textarea { font-weight: 500; margin-bottom: 1.5rem; } -#confirmation .btns, -#prompt .btns { - display: flex; - justify-content: right; - width: 100%; -} -#confirmation .btns button, -#prompt .btns button { - background: none; -} -#confirmation .btns button:first-of-type, -#prompt .btns button:first-of-type { +#confirmation .flex sm-button:first-of-type, +#prompt .flex sm-button:first-of-type { margin-right: 0.6em; + margin-left: auto; } .refresh { @@ -790,7 +781,7 @@ sm-panel { .page { padding: 1rem 1.5rem; - padding-bottom: 4rem; + padding-bottom: 5rem; } .page .container-header { display: grid; @@ -986,13 +977,22 @@ sm-panel { #transaction_result::part(popup) { background-image: url(card-back.svg); background-size: cover; - background-position-y: -4rem; + background-position-y: -3rem; background-repeat: no-repeat; } #transaction_result .copy-row { + grid-template-areas: "label label" ". ."; margin-top: 1rem; + gap: 0 1rem; } -#transaction_result h4, #transaction_result p { +#transaction_result .copy-row h4 { + font-weight: 500; +} +#transaction_result h5 { + grid-area: label; + color: rgba(var(--text-color), 0.7); +} +#transaction_result h4, #transaction_result h5, #transaction_result p { text-align: center; } #transaction_result > h4 { @@ -1008,7 +1008,7 @@ sm-panel { align-self: center; stroke: none; stroke-dasharray: 50; - fill: rgba(var(--foreground-color), 0.8); + fill: rgba(var(--foreground-color), 1); animation: popup 2s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275); } @@ -1031,6 +1031,37 @@ sm-panel { margin-bottom: 1rem; } +.activity { + display: grid; + background: rgba(var(--text-color), 0.06); + border-radius: 0.6rem; + padding: 1rem 1.2rem; + gap: 0 1rem; + grid-template-columns: auto 1fr auto; + grid-template-areas: "icon type amount" "icon time time"; +} +.activity .icon { + grid-area: icon; + height: 3rem; + width: 3rem; + padding: 0.8rem; + background: rgba(var(--text-color), 0.06); + border-radius: 2rem; +} +.activity .activity-type { + grid-area: type; +} +.activity .activity-amount { + text-align: right; + grid-area: amount; +} +.activity .activity-time { + text-align: right; + grid-area: time; + color: rgba(var(--text-color), 0.7); + font-weight: 500; +} + @media only screen and (max-width: 640px) { #home_page, #deposit { display: grid; @@ -1099,7 +1130,7 @@ sm-panel { } .page { - padding-bottom: 2em; + padding-bottom: 2rem; } #sign_in_popup { diff --git a/css/main.min.css b/css/main.min.css index 08a44fe..b209f4e 100644 --- a/css/main.min.css +++ b/css/main.min.css @@ -1 +1 @@ -.action,button{position:relative}a,h1,h2,h3,h4,h5{font-weight:600}.options-tab .option,button{-webkit-tap-highlight-color:transparent;transition:transform .3s}.icon,.loader{overflow:visible;fill:none}*{box-sizing:border-box;padding:0;margin:0;font-family:Roboto,sans-serif}button,h1,h2,h3,h4,h5{font-family:Poppins,sans-serif}:root{scroll-behavior:smooth}body{--accent-color:#2237CD;--text-color:17,17,17;--text-color-light:85,85,85;--foreground-color:255,255,255;--background-color:#e8e8e8;--dark-shade:#dadada;background:linear-gradient(rgba(var(--foreground-color),.1),rgba(var(--foreground-color),.3)),url(back.svg) no-repeat fixed;color:rgba(var(--text-color),1);font-size:16px;background-size:cover}a{text-decoration:none;color:var(--accent-color)}.dark-text{color:#111}h1{font-size:3.5rem}h2{font-size:2rem}h3{font-size:1.5rem}h4{font-size:1rem}h5{font-size:.8rem}p{line-height:1.5;max-width:60ch;color:rgba(var(--text-color),.9)}strong{font-weight:500}#navbar .navbar-item,button{font-weight:600;text-transform:capitalize}button{display:inline-flex;align-items:center;justify-content:center;padding:.6rem 1.2rem;cursor:pointer;border-radius:.3rem;color:var(--accent-color);border:none;background:rgba(var(--text-color),.1)}.action,.align-center{align-items:center}button:focus{outline:solid thin}button:disabled{cursor:default;background:rgba(var(--text-color),.5)}.action,.action[disabled] .primary-btn{background:0 0}button:disabled~.loader{opacity:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.top-margin,sm-popup .action{margin-top:1.5rem}input[type=text]::-ms-clear{display:none;width:0;height:0}input[type=text]::-ms-reveal{display:none;width:0;height:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}input[type=number]{-moz-appearance:textfield}input:invalid{outline:0;box-shadow:none}::-moz-focus-inner{border:none}.bottom-padding{padding-bottom:1.5rem}.top-padding{padding-top:1em}.bottom-margin{margin-bottom:1.5rem}.flex{display:flex}.grid{display:grid}.grid-2{grid-template-columns:auto auto;gap:1em}#confirmation,#prompt,.direction-column,.options-tab .option{flex-direction:column}.space-between{justify-content:space-between}.label{margin-bottom:.4rem}.light-text{opacity:.7}.hide{opacity:0;pointer-events:none}.hide-completely{display:none!important}.breakable{word-break:break-all}.separator{padding:.1em}.no-transformations{transform:none!important}.loader{stroke-width:10;stroke:var(--accent-color);height:2rem;width:2rem;stroke-dashoffset:230;stroke-dasharray:230;padding:2px;justify-self:center}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes load{50%{stroke-dashoffset:0}100%{stroke-dashoffset:-210}}.action{display:inline-flex;justify-content:center;padding:0}.action h4{padding:.5rem 1.2rem;font-size:.9rem;clip-path:circle(100%);transition:clip-path .3s;border-radius:.2rem}.action .btn{z-index:2}.action .loader{position:absolute;z-index:1;padding:.4em}.clip{clip-path:circle(0)!important}.animate-loader{animation:load 2.6s infinite,rotate 1s infinite linear}.expand{width:100%}.fade-left{animation:fadeleft .3s}.fade-right{animation:faderight .3s}@keyframes faderight{from{opacity:0;transform:translateX(-1em)}to{opacity:1;transform:none}}@keyframes fadeleft{from{opacity:0;transform:translateX(1em)}to{opacity:1;transform:none}}#logo{display:inline-grid;align-items:center;grid-template-columns:auto 1fr;gap:.6rem .4rem;margin-right:1rem}#logo h4{letter-spacing:.06rem;word-spacing:.12rem}#logo h5{font-weight:400}#logo #main_logo{height:1.6rem;width:1.6rem;fill:rgba(var(--text-color),1);stroke:none}textarea{width:100%;max-width:100%;background:rgba(var(--text-color),.1);border:none;border-radius:.2rem;resize:none;font-size:1rem;line-height:1.6;padding:.8rem}:empty+.empty-state{display:grid}.empty-state{display:none;place-items:center;width:100%}.empty-state svg{stroke:rgba(var(--text-color),.8);height:12em;width:12em}.container-header{display:flex;align-items:center;flex-direction:row;width:100%;padding:1rem 0}.container-header h2{flex:1}.container-header button{align-self:center}.btn{background:var(--accent-color);color:rgba(var(--foreground-color),1);padding:.4em 1em}.back-arrow{stroke:rgba(var(--text-color),1);stroke-width:6;fill:none;height:2rem;padding:.5rem .5rem .5rem 0;cursor:pointer}.card{border-radius:.6rem;padding:1.5em;background:rgba(var(--foreground-color),1)}.solid-background{background:rgba(var(--foreground-color),1)!important}#confirmation p,#prompt p{margin:1rem}#confirmation h4,#prompt h4{font-weight:500;margin-bottom:1.5rem}#confirmation .btns,#prompt .btns{display:flex;justify-content:right;width:100%}#confirmation .btns button,#prompt .btns button{background:0 0}details p,sm-popup .illustration{background:rgba(var(--text-color),.06)}#confirmation .btns button:first-of-type,#prompt .btns button:first-of-type{margin-right:.6em}.refresh{margin-top:.6em;margin-bottom:1em}sm-popup .illustration{position:relative;height:4rem;width:4rem;padding:1rem;stroke:var(--accent-color);margin-bottom:1rem;border-radius:5rem}.complaint-placeholder h4,.complaint-placeholder h5,details p{border-radius:.2rem}sm-popup sm-input:not(:last-of-type){margin-bottom:1rem}sm-popup p{margin-block-end:1rem}sm-popup .action h4{padding:.8rem 1.6rem}.popup-header{padding:1.5rem;padding-bottom:0;display:flex;align-items:center;width:100%}.popup-header .icon{margin-right:1rem;padding:.2rem;stroke-width:10;cursor:pointer}.popup-header button{width:auto;margin-left:auto}details,summary{margin-bottom:1rem}details p{padding:.5rem 1rem;margin-bottom:0}#sign_in_popup h3{margin-top:2rem}#sign_in_popup h4{font-weight:500;margin-bottom:3rem}#sign_in_popup button{margin:1rem 0}#sign_in_popup p{margin-top:1rem;margin-bottom:0!important}.primary-btn{background:var(--accent-color);justify-content:center;color:rgba(var(--foreground-color),1)}#main_header{align-items:center;padding:1rem;justify-content:space-between}.display-balance{gap:1rem;grid-auto-flow:row}.display-balance .balance{width:100%}.display-balance .icon{height:1.4rem;width:1.4rem;padding:.3rem;stroke-width:10;cursor:pointer}.icon{height:1.2rem;width:1.2rem;stroke:rgba(var(--text-color),.8);stroke-width:6;stroke-linecap:round;stroke-linejoin:round}#navbar{display:flex;flex-direction:row;align-items:center;justify-content:space-evenly;position:fixed;left:0;right:0;bottom:0;top:auto;border-top:solid 1px rgba(var(--text-color),.2);border-right:none;z-index:3;background:rgba(var(--foreground-color),1)}#navbar .navbar-item{position:relative;text-align:center;cursor:pointer;padding:.3em;margin:.3em;border-radius:.4em;color:rgba(var(--text-color),.8);font-size:.8em;width:100%}#navbar .navbar-item h5{margin-top:.4em}#navbar .active{color:var(--accent-color)}.user-panel,.user-panel .grid P{color:rgba(var(--foreground-color),1)}#navbar .active .icon{stroke:var(--accent-color)}.banking{stroke-width:4}#home_page{padding:1rem 0 4rem}#home_page .left{padding:1.5rem 0;width:auto;border-radius:.6rem}#home_page .left h3,#home_page .left h4,#home_page .left p{padding:0 1.5rem}#home_page .left h3{font-size:2rem;margin-bottom:1rem}#home_page .user-panel{margin:0 1.5rem}.user-panel{position:relative;padding:1.5rem;border-radius:.6rem;background:linear-gradient(135deg,var(--accent-color),#2F2B76);box-shadow:0 .1rem .1rem #00010,0 1rem 1rem -1rem #00010;align-self:flex-start}.request .action,.request button{align-self:flex-end}.user-panel .icon{stroke:rgba(var(--foreground-color),1)}.user-panel .copy-row{margin-bottom:1rem;padding-bottom:1rem;border-bottom:solid 1px rgba(var(--foreground-color),.3)}.user-panel sm-button{--text-color:rgba(var(--foreground-color), 1);background:rgba(var(--foreground-color),.2);border-radius:2rem}.user-panel .grid{gap:1.5rem;grid-template-columns:1fr 1fr;margin-top:1rem}.user-panel .grid h5{font-weight:500}.user-panel .grid h4{font-size:1.2rem}.user-panel .grid P{font-size:.8rem;opacity:.9;margin-bottom:0!important;max-width:30ch}.balance{display:grid;gap:0 1rem}.user-type{font-weight:500}.options-tab{margin:1rem 0}.options-tab>.grid{min-width:100vw;padding:0 1.5rem;grid-auto-flow:column;gap:.2rem}.options-tab .option{position:relative;display:flex;align-items:center;text-align:center;border-radius:.4rem;margin-bottom:1rem;width:5rem;min-width:5rem;text-transform:capitalize;cursor:pointer}.options-tab .option .icon{height:3rem;width:3rem;padding:.8rem;stroke:var(--accent-color)}.options-tab .option h4{font-size:.9rem;font-weight:500}.options-tab .option:active{transform:scale(.95)}.request-icon{transform:rotate(180deg)}.notification-dot::after{content:"";position:absolute;z-index:1;top:0;right:0;height:.6em;width:.6em;background-color:#E53935;border-radius:.4em;transition:transform .3s}.shrink.notification-dot::after{transform:scale(0)}#deposit .container-header,#withdraw .container-header{background:linear-gradient(rgba(var(--foreground-color),1) 90%,transparent)}.page .container-header,sm-tab-header{top:0;background:rgba(var(--foreground-color),1);z-index:2}sm-tab-header{position:sticky;margin-bottom:1rem;border-bottom:solid 1px rgba(var(--text-color),.2)}sm-tab::part(tab){padding:.8rem .4rem;text-transform:capitalize}sm-panel{width:100%}.request{display:inline-flex;flex-direction:column;padding:1.5em;border-radius:.4em;border:1px solid}.request h5{margin-bottom:.2rem;text-transform:capitalize}.request h3,.request h4{margin-bottom:1.5rem}.copy-row h4,.request button{margin-bottom:0}.request h4:last-of-type{margin-bottom:0}.request .amount{font-size:1.4em}.request button{width:auto;margin-top:1.5rem}.request .copy-row{margin-bottom:1.5rem}.request .flex{align-items:center;justify-content:flex-end;margin-top:1.5rem}.request .flex button,.request .flex h5{margin:0}.deposited{color:#007732}.deposited::before{content:"+ "}.decline-request{margin-right:.5rem!important}.withdrawn{color:#d43125}.withdrawn::before{content:"- "}.container{display:grid;gap:1em;width:100%;grid-template-columns:repeat(auto-fill,minmax(16rem,1fr))}.copy-row,.page .container-header{display:grid;grid-template-columns:1fr auto}.page{padding:1rem 1.5rem;padding-bottom:4rem}.page .container-header{grid-template-areas:". ." "search search";gap:1rem;will-change:auto}.page .container-header .search{grid-area:search}.page .container-header .search input{padding:1em;border:none;width:100%;background:var(--dark-shade);font-size:1rem;font-weight:500;color:rgba(var(--text-color),1);border-radius:.2em}.page .container-header .search input:focus{outline:0;background:rgba(var(--text-color-light),.2)}.copy-row{align-items:center;gap:.5rem}.copy-row .icon{cursor:pointer;padding:.4rem;height:1.8rem;width:1.8rem}.copy-row .copy{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.time{margin-bottom:1.5rem!important;font-weight:500}#report_popup{width:32rem}#profile_page{display:flex;flex-direction:column}#profile_page button{align-self:flex-start}.complaint{display:grid;gap:1.5rem 0}.complaint .complaint-actions{align-items:center;margin:1.5rem 0 0}#helpline_page sm-select,.complaint .processed,.complaint .unprocessed{margin-bottom:1.5rem}.complaint .processed{color:#007732}.complaint .unprocessed{color:#d43125}.complaint button .icon{padding:.2rem;margin-right:.5rem;stroke:var(--accent-color);stroke-width:8}.complaints-container{padding-top:1.5rem;display:grid;align-items:flex-start;gap:1.5rem}.complaint-placeholder{animation:pulse infinite .6s alternate}.complaint-placeholder h5{background:rgba(var(--text-color),.1);padding:.5rem .6rem}.complaint-placeholder h4{background:rgba(var(--text-color),.2);padding:.8rem}.complaint-placeholder .demo-btn{padding:.8rem 3rem}@keyframes pulse{from{opacity:.4}to{opacity:1}}#main_loader{text-align:center;place-content:center;height:100vh;width:100vw;position:fixed;left:0}#main_loader sm-button{margin-left:0;margin-top:1rem}#main_loader svg{height:2rem;width:2rem;stroke:var(--accent-color);stroke-width:6;fill:none;overflow:visible;stroke-linecap:round;stroke-dashoffset:210;stroke-dasharray:210;justify-self:center;align-self:center;margin-bottom:2rem}#main_loader h3{width:100%;font-weight:400;word-spacing:.16em}#upi_txId_section .copy-row{margin-bottom:1.5rem}#send_amount_to_deposit{margin-bottom:0!important}@keyframes popup{0%{stroke-dashoffset:50;transform:translateY(4rem) scale(.2,.6)}40%,41%{transform:translateY(0) scale(.2)}50%{stroke-dashoffset:50;transform:translateY(0) scale(1)}100%{stroke-dashoffset:0}}#transaction_result{z-index:12}#transaction_result::part(popup){background-image:url(card-back.svg);background-size:cover;background-position-y:-4rem;background-repeat:no-repeat}#transaction_result .copy-row{margin-top:1rem}#transaction_result h4,#transaction_result p{text-align:center}#transaction_result>h4{font-size:1.2rem;margin-top:6rem;margin-bottom:.5rem}#failure_svg,#success_svg{height:5rem;width:5rem;stroke-width:4;align-self:center;stroke:none;stroke-dasharray:50;fill:rgba(var(--foreground-color),.8);animation:popup 2s forwards cubic-bezier(.175,.885,.32,1.275)}#success_svg polyline{fill:none;stroke:#00C853}#failure_svg line{stroke:#EF5350}.rupee-symbol{height:1rem;width:1rem;fill:rgba(var(--text-color),.5)}#deposit_rupee .copy-row{margin-bottom:1rem}@media only screen and (max-width:640px){#deposit,#home_page{display:grid;gap:1.5rem;grid-template-areas:"." "left";grid-template-columns:minmax(0,1fr)}#deposit .left,#home_page .left{grid-area:left;background:rgba(var(--text-color),.06)}sm-select{width:100%}}@media only screen and (min-width:640px){body{padding:0 2rem;margin-left:6rem}sm-popup{background:rgba(var(--foreground-color),1)}#confirmation,sm-popup::part(popup){width:24rem}#navbar{justify-content:center;flex-direction:column;align-items:stretch;left:0;bottom:0;top:0;right:auto;width:6rem;border-top:none;border-right:solid 1px rgba(var(--text-color),.2)}#navbar .navbar-item{border-radius:.5rem;width:auto;padding:.5rem 0;margin:.5rem .6rem}#navbar .navbar-item .icon{height:1.4rem;width:1.4rem}#navbar .navbar-item:hover{background:rgba(var(--foreground-color),.2)}#navbar .navbar-item.active{background:rgba(var(--foreground-color),1);color:var(--accent-color)}#navbar .navbar-item.active .icon{stroke:var(--accent-color)}.page{padding-bottom:2em}#sign_in_popup{width:24rem}#profile_page .copy-row{display:inline-flex}.options-tab>.grid{gap:1rem;min-width:auto}.options-tab .grid:first-of-type{padding-right:0}.options-tab .grid:last-of-type{padding-left:0}}@media only screen and (min-width:800px){.complaint{gap:0 1.5rem;grid-template-columns:1fr 1fr;grid-template-areas:". . " "header header"}.complaint .complaint-actions{grid-area:header}.complaint .left{border-right:1px solid rgba(var(--text-color),.2);padding-right:1.5rem}.complaint .right{display:flex;justify-content:center;flex-direction:column}.user-panel{position:sticky;top:1.5rem}#deposit,#home_page{display:grid;gap:1.5rem;grid-template-columns:minmax(0,1fr) 24rem}}@media only screen and (min-width:1920px){body{font-size:24px}}@media only screen and (min-width:2048px){body{font-size:24px}}@media only screen and (max-width:320px){body{font-size:14px}}@media (prefers-color-scheme:dark){:root{--text-color:238,238,238;--text-color-light:170,170,170;--foreground-color:26,26,26;--background-color:#111;--dark-shade:#1a1a1a}}@media (prefers-color-scheme:light){:root{--text-color:17,17,17;--text-color-light:85,85,85;--foreground-color:255,255,255;--background-color:#e8e8e8;--dark-shade:#dadada}}@media (prefers-color-scheme:no-preference){:root{--text-color:17,17,17;--text-color-light:85,85,85;--foreground-color:255,255,255;--background-color:#e8e8e8;--dark-shade:#dadada}}@media (any-hover:hover){.option:hover{background:rgba(var(--text-color),.1)}} \ No newline at end of file +.action,button{display:inline-flex;position:relative}a,h1,h2,h3,h4,h5{font-weight:600}.options-tab .option,button{-webkit-tap-highlight-color:transparent;transition:transform .3s}*{box-sizing:border-box;padding:0;margin:0;font-family:Roboto,sans-serif}button,h1,h2,h3,h4,h5{font-family:Poppins,sans-serif}:root{scroll-behavior:smooth}body{--accent-color:#2237CD;--text-color:17,17,17;--text-color-light:85,85,85;--foreground-color:255,255,255;--background-color:#e8e8e8;--dark-shade:#dadada;background:linear-gradient(rgba(var(--foreground-color),.1),rgba(var(--foreground-color),.3)),url(back.svg) no-repeat fixed;color:rgba(var(--text-color),1);font-size:16px;background-size:cover}a{text-decoration:none;color:var(--accent-color)}.dark-text{color:#111}h1{font-size:3.5rem}h2{font-size:2rem}h3{font-size:1.5rem}h4{font-size:1rem}h5{font-size:.8rem}p{line-height:1.5;max-width:60ch;color:rgba(var(--text-color),.9)}strong{font-weight:500}#navbar .navbar-item,button{font-weight:600;text-transform:capitalize;cursor:pointer}button{align-items:center;justify-content:center;padding:.6rem 1.2rem;border-radius:.3rem;color:var(--accent-color);border:none;background:rgba(var(--text-color),.1)}button:focus{outline:solid thin}button:disabled{cursor:default;background:rgba(var(--text-color),.5)}button:disabled~.loader{opacity:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=text]::-ms-clear{display:none;width:0;height:0}input[type=text]::-ms-reveal{display:none;width:0;height:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}input[type=number]{-moz-appearance:textfield}input:invalid{outline:0;box-shadow:none}::-moz-focus-inner{border:none}.bottom-padding{padding-bottom:1.5rem}.top-padding{padding-top:1em}.bottom-margin{margin-bottom:1.5rem}.top-margin{margin-top:1.5rem}.flex{display:flex}.grid{display:grid}.grid-2{grid-template-columns:auto auto;gap:1em}.align-center{align-items:center}#confirmation,#prompt,.direction-column,.options-tab .option{flex-direction:column}.space-between{justify-content:space-between}.label{margin-bottom:.4rem}.light-text{opacity:.7}.hide{opacity:0;pointer-events:none}.hide-completely{display:none!important}.breakable{word-break:break-all}.separator{padding:.1em}.no-transformations{transform:none!important}.loader{fill:none;stroke-width:10;stroke:var(--accent-color);height:2rem;width:2rem;overflow:visible;stroke-dashoffset:230;stroke-dasharray:230;padding:2px;justify-self:center}#logo,.action{align-items:center}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes load{50%{stroke-dashoffset:0}100%{stroke-dashoffset:-210}}.action{justify-content:center;padding:0;background:0 0}.action[disabled] .primary-btn{background:0 0}.action h4{padding:.5rem 1.2rem;font-size:.9rem;clip-path:circle(100%);transition:clip-path .3s;border-radius:.2rem}.action .btn{z-index:2}.action .loader{position:absolute;z-index:1;padding:.4em}.clip{clip-path:circle(0)!important}.animate-loader{animation:load 2.6s infinite,rotate 1s infinite linear}.expand{width:100%}.fade-left{animation:fadeleft .3s}.fade-right{animation:faderight .3s}@keyframes faderight{from{opacity:0;transform:translateX(-1em)}to{opacity:1;transform:none}}@keyframes fadeleft{from{opacity:0;transform:translateX(1em)}to{opacity:1;transform:none}}#logo{display:inline-grid;grid-template-columns:auto 1fr;gap:.6rem .4rem;margin-right:1rem}#logo h4{letter-spacing:.06rem;word-spacing:.12rem}#logo h5{font-weight:400}#logo #main_logo{height:1.6rem;width:1.6rem;fill:rgba(var(--text-color),1);stroke:none}textarea{width:100%;max-width:100%;background:rgba(var(--text-color),.1);border:none;border-radius:.2rem;resize:none;font-size:1rem;line-height:1.6;padding:.8rem}:empty+.empty-state{display:grid}.empty-state{display:none;place-items:center;width:100%}.empty-state svg{stroke:rgba(var(--text-color),.8);height:12em;width:12em}.container-header{display:flex;align-items:center;flex-direction:row;width:100%;padding:1rem 0}.container-header h2{flex:1}.container-header button{align-self:center}.btn{background:var(--accent-color);color:rgba(var(--foreground-color),1);padding:.4em 1em}.back-arrow{stroke:rgba(var(--text-color),1);stroke-width:6;fill:none;height:2rem;padding:.5rem .5rem .5rem 0;cursor:pointer}.card{border-radius:.6rem;padding:1.5em;background:rgba(var(--foreground-color),1)}.solid-background{background:rgba(var(--foreground-color),1)!important}.activity,.activity .icon,details p,sm-popup .illustration{background:rgba(var(--text-color),.06)}#confirmation p,#prompt p{margin:1rem}#confirmation h4,#prompt h4{font-weight:500;margin-bottom:1.5rem}#confirmation .flex sm-button:first-of-type,#prompt .flex sm-button:first-of-type{margin-right:.6em;margin-left:auto}.refresh{margin-top:.6em;margin-bottom:1em}sm-popup .illustration{position:relative;height:4rem;width:4rem;padding:1rem;stroke:var(--accent-color);margin-bottom:1rem;border-radius:5rem}#main_loader,#navbar{position:fixed;left:0}sm-popup sm-input:not(:last-of-type){margin-bottom:1rem}sm-popup p{margin-block-end:1rem}sm-popup .action{margin-top:1.5rem}sm-popup .action h4{padding:.8rem 1.6rem}.popup-header{padding:1.5rem;padding-bottom:0;display:flex;align-items:center;width:100%}.popup-header .icon{margin-right:1rem;padding:.2rem;stroke-width:10;cursor:pointer}.popup-header button{width:auto;margin-left:auto}details,summary{margin-bottom:1rem}details p{border-radius:.2rem;padding:.5rem 1rem;margin-bottom:0}#sign_in_popup h3{margin-top:2rem}#sign_in_popup h4{font-weight:500;margin-bottom:3rem}#sign_in_popup button{margin:1rem 0}#sign_in_popup p{margin-top:1rem;margin-bottom:0!important}.primary-btn{background:var(--accent-color);justify-content:center;color:rgba(var(--foreground-color),1)}#main_header{align-items:center;padding:1rem;justify-content:space-between}.display-balance{gap:1rem;grid-auto-flow:row}.display-balance .balance{width:100%}.display-balance .icon{height:1.4rem;width:1.4rem;padding:.3rem;stroke-width:10;cursor:pointer}.icon{height:1.2rem;width:1.2rem;fill:none;stroke:rgba(var(--text-color),.8);stroke-width:6;overflow:visible;stroke-linecap:round;stroke-linejoin:round}#navbar{display:flex;flex-direction:row;align-items:center;justify-content:space-evenly;right:0;bottom:0;top:auto;border-top:solid 1px rgba(var(--text-color),.2);border-right:none;z-index:3;background:rgba(var(--foreground-color),1)}#navbar .navbar-item{position:relative;text-align:center;padding:.3em;margin:.3em;border-radius:.4em;color:rgba(var(--text-color),.8);font-size:.8em;width:100%}#navbar .navbar-item h5{margin-top:.4em}#navbar .active{color:var(--accent-color)}.user-panel,.user-panel .grid P{color:rgba(var(--foreground-color),1)}#navbar .active .icon{stroke:var(--accent-color)}.banking{stroke-width:4}#home_page{padding:1rem 0 4rem}#home_page .left{padding:1.5rem 0;width:auto;border-radius:.6rem}#home_page .left h3,#home_page .left h4,#home_page .left p{padding:0 1.5rem}#home_page .left h3{font-size:2rem;margin-bottom:1rem}#home_page .user-panel{margin:0 1.5rem}.user-panel{position:relative;padding:1.5rem;border-radius:.6rem;background:linear-gradient(135deg,var(--accent-color),#2F2B76);box-shadow:0 .1rem .1rem #00010,0 1rem 1rem -1rem #00010;align-self:flex-start}.user-panel .icon{stroke:rgba(var(--foreground-color),1)}.user-panel .copy-row{margin-bottom:1rem;padding-bottom:1rem;border-bottom:solid 1px rgba(var(--foreground-color),.3)}.user-panel sm-button{--text-color:rgba(var(--foreground-color), 1);background:rgba(var(--foreground-color),.2);border-radius:2rem}.user-panel .grid{gap:1.5rem;grid-template-columns:1fr 1fr;margin-top:1rem}.user-panel .grid h5{font-weight:500}.user-panel .grid h4{font-size:1.2rem}.user-panel .grid P{font-size:.8rem;opacity:.9;margin-bottom:0!important;max-width:30ch}.balance{display:grid;gap:0 1rem}.user-type{font-weight:500}.options-tab{margin:1rem 0}.options-tab>.grid{min-width:100vw;padding:0 1.5rem;grid-auto-flow:column;gap:.2rem}.options-tab .option{position:relative;display:flex;align-items:center;text-align:center;border-radius:.4rem;margin-bottom:1rem;width:5rem;min-width:5rem;text-transform:capitalize;cursor:pointer}.options-tab .option .icon{height:3rem;width:3rem;padding:.8rem;stroke:var(--accent-color)}.options-tab .option h4{font-size:.9rem;font-weight:500}.options-tab .option:active{transform:scale(.95)}.request-icon{transform:rotate(180deg)}.notification-dot::after{content:"";position:absolute;z-index:1;top:0;right:0;height:.6em;width:.6em;background-color:#E53935;border-radius:.4em;transition:transform .3s}.shrink.notification-dot::after{transform:scale(0)}#deposit .container-header,#withdraw .container-header{background:linear-gradient(rgba(var(--foreground-color),1) 90%,transparent)}.page .container-header,sm-tab-header{top:0;background:rgba(var(--foreground-color),1);z-index:2}sm-tab-header{position:sticky;margin-bottom:1rem;border-bottom:solid 1px rgba(var(--text-color),.2)}sm-tab::part(tab){padding:.8rem .4rem;text-transform:capitalize}sm-panel{width:100%}.request{display:inline-flex;flex-direction:column;padding:1.5em;border-radius:.4em;border:1px solid}.request h5{margin-bottom:.2rem;text-transform:capitalize}.request h3,.request h4{margin-bottom:1.5rem}.copy-row h4,.request button{margin-bottom:0}.request h4:last-of-type{margin-bottom:0}.request .action{align-self:flex-end}.request .amount{font-size:1.4em}.request button{width:auto;align-self:flex-end;margin-top:1.5rem}.request .copy-row{margin-bottom:1.5rem}.request .flex{align-items:center;justify-content:flex-end;margin-top:1.5rem}.request .flex button,.request .flex h5{margin:0}.deposited{color:#007732}.deposited::before{content:"+ "}.decline-request{margin-right:.5rem!important}.withdrawn{color:#d43125}.withdrawn::before{content:"- "}.container{display:grid;gap:1em;width:100%;grid-template-columns:repeat(auto-fill,minmax(16rem,1fr))}.copy-row,.page .container-header{display:grid;grid-template-columns:1fr auto}.page{padding:1rem 1.5rem;padding-bottom:5rem}.page .container-header{grid-template-areas:". ." "search search";gap:1rem;will-change:auto}.page .container-header .search{grid-area:search}.page .container-header .search input{padding:1em;border:none;width:100%;background:var(--dark-shade);font-size:1rem;font-weight:500;color:rgba(var(--text-color),1);border-radius:.2em}.page .container-header .search input:focus{outline:0;background:rgba(var(--text-color-light),.2)}.copy-row{align-items:center;gap:.5rem}.copy-row .icon{cursor:pointer;padding:.4rem;height:1.8rem;width:1.8rem}.copy-row .copy{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.time{margin-bottom:1.5rem!important;font-weight:500}#report_popup{width:32rem}#profile_page{display:flex;flex-direction:column}#profile_page button{align-self:flex-start}.complaint{display:grid;gap:1.5rem 0}.complaint .complaint-actions{align-items:center;margin:1.5rem 0 0}#helpline_page sm-select,.complaint .processed,.complaint .unprocessed{margin-bottom:1.5rem}.complaint .processed{color:#007732}.complaint .unprocessed{color:#d43125}.complaint button .icon{padding:.2rem;margin-right:.5rem;stroke:var(--accent-color);stroke-width:8}.complaints-container{padding-top:1.5rem;display:grid;align-items:flex-start;gap:1.5rem}.complaint-placeholder{animation:pulse infinite .6s alternate}.complaint-placeholder h4,.complaint-placeholder h5{border-radius:.2rem}.complaint-placeholder h5{background:rgba(var(--text-color),.1);padding:.5rem .6rem}.complaint-placeholder h4{background:rgba(var(--text-color),.2);padding:.8rem}.complaint-placeholder .demo-btn{padding:.8rem 3rem}@keyframes pulse{from{opacity:.4}to{opacity:1}}#main_loader{text-align:center;place-content:center;height:100vh;width:100vw}#main_loader sm-button{margin-left:0;margin-top:1rem}#main_loader svg{height:2rem;width:2rem;stroke:var(--accent-color);stroke-width:6;fill:none;overflow:visible;stroke-linecap:round;stroke-dashoffset:210;stroke-dasharray:210;justify-self:center;align-self:center;margin-bottom:2rem}#main_loader h3{width:100%;font-weight:400;word-spacing:.16em}#upi_txId_section .copy-row{margin-bottom:1.5rem}#send_amount_to_deposit{margin-bottom:0!important}@keyframes popup{0%{stroke-dashoffset:50;transform:translateY(4rem) scale(.2,.6)}40%,41%{transform:translateY(0) scale(.2)}50%{stroke-dashoffset:50;transform:translateY(0) scale(1)}100%{stroke-dashoffset:0}}#transaction_result{z-index:12}#transaction_result::part(popup){background-image:url(card-back.svg);background-size:cover;background-position-y:-3rem;background-repeat:no-repeat}#transaction_result .copy-row{grid-template-areas:"label label" ". .";margin-top:1rem;gap:0 1rem}#transaction_result .copy-row h4{font-weight:500}#transaction_result h5{grid-area:label;color:rgba(var(--text-color),.7)}#transaction_result h4,#transaction_result h5,#transaction_result p{text-align:center}#transaction_result>h4{font-size:1.2rem;margin-top:6rem;margin-bottom:.5rem}#failure_svg,#success_svg{height:5rem;width:5rem;stroke-width:4;align-self:center;stroke:none;stroke-dasharray:50;fill:rgba(var(--foreground-color),1);animation:popup 2s forwards cubic-bezier(.175,.885,.32,1.275)}#success_svg polyline{fill:none;stroke:#00C853}#failure_svg line{stroke:#EF5350}.rupee-symbol{height:1rem;width:1rem;fill:rgba(var(--text-color),.5)}#deposit_rupee .copy-row{margin-bottom:1rem}.activity{display:grid;border-radius:.6rem;padding:1rem 1.2rem;gap:0 1rem;grid-template-columns:auto 1fr auto;grid-template-areas:"icon type amount" "icon time time"}.activity .icon{grid-area:icon;height:3rem;width:3rem;padding:.8rem;border-radius:2rem}.activity .activity-type{grid-area:type}.activity .activity-amount{text-align:right;grid-area:amount}.activity .activity-time{text-align:right;grid-area:time;color:rgba(var(--text-color),.7);font-weight:500}@media only screen and (max-width:640px){#deposit,#home_page{display:grid;gap:1.5rem;grid-template-areas:"." "left";grid-template-columns:minmax(0,1fr)}#deposit .left,#home_page .left{grid-area:left;background:rgba(var(--text-color),.06)}sm-select{width:100%}}@media only screen and (min-width:640px){body{padding:0 2rem;margin-left:6rem}sm-popup{background:rgba(var(--foreground-color),1)}#confirmation,sm-popup::part(popup){width:24rem}#navbar{justify-content:center;flex-direction:column;align-items:stretch;left:0;bottom:0;top:0;right:auto;width:6rem;border-top:none;border-right:solid 1px rgba(var(--text-color),.2)}#navbar .navbar-item{border-radius:.5rem;width:auto;padding:.5rem 0;margin:.5rem .6rem}#navbar .navbar-item .icon{height:1.4rem;width:1.4rem}#navbar .navbar-item:hover{background:rgba(var(--foreground-color),.2)}#navbar .navbar-item.active{background:rgba(var(--foreground-color),1);color:var(--accent-color)}#navbar .navbar-item.active .icon{stroke:var(--accent-color)}.page{padding-bottom:2rem}#sign_in_popup{width:24rem}#profile_page .copy-row{display:inline-flex}.options-tab>.grid{gap:1rem;min-width:auto}.options-tab .grid:first-of-type{padding-right:0}.options-tab .grid:last-of-type{padding-left:0}}@media only screen and (min-width:800px){.complaint{gap:0 1.5rem;grid-template-columns:1fr 1fr;grid-template-areas:". . " "header header"}.complaint .complaint-actions{grid-area:header}.complaint .left{border-right:1px solid rgba(var(--text-color),.2);padding-right:1.5rem}.complaint .right{display:flex;justify-content:center;flex-direction:column}.user-panel{position:sticky;top:1.5rem}#deposit,#home_page{display:grid;gap:1.5rem;grid-template-columns:minmax(0,1fr) 24rem}}@media only screen and (min-width:1920px){body{font-size:24px}}@media only screen and (min-width:2048px){body{font-size:24px}}@media only screen and (max-width:320px){body{font-size:14px}}@media (prefers-color-scheme:dark){:root{--text-color:238,238,238;--text-color-light:170,170,170;--foreground-color:26,26,26;--background-color:#111;--dark-shade:#1a1a1a}}@media (prefers-color-scheme:light){:root{--text-color:17,17,17;--text-color-light:85,85,85;--foreground-color:255,255,255;--background-color:#e8e8e8;--dark-shade:#dadada}}@media (prefers-color-scheme:no-preference){:root{--text-color:17,17,17;--text-color-light:85,85,85;--foreground-color:255,255,255;--background-color:#e8e8e8;--dark-shade:#dadada}}@media (any-hover:hover){.option:hover{background:rgba(var(--text-color),.1)}} \ No newline at end of file diff --git a/css/main.scss b/css/main.scss index 00d1473..dd62ab9 100644 --- a/css/main.scss +++ b/css/main.scss @@ -408,7 +408,6 @@ textarea { #confirmation, #prompt { flex-direction: column; - p { margin: 1rem; } @@ -418,17 +417,10 @@ textarea { margin-bottom: 1.5rem; } - .btns { - display: flex; - justify-content: right; - width: 100%; - - button { - background: none; - } - - button:first-of-type { + .flex { + sm-button:first-of-type { margin-right: 0.6em; + margin-left: auto; } } } @@ -832,7 +824,7 @@ sm-panel{ .page { padding: 1rem 1.5rem; - padding-bottom: 4rem; + padding-bottom: 5rem; .container-header { display: grid; @@ -1054,13 +1046,22 @@ sm-panel{ &::part(popup){ background-image: url(card-back.svg); background-size: cover; - background-position-y: -4rem; + background-position-y: -3rem; background-repeat: no-repeat; } .copy-row{ + grid-template-areas: 'label label' '. .'; margin-top: 1rem; + gap: 0 1rem; + h4{ + font-weight: 500; + } } - h4, p{ + h5{ + grid-area: label; + color: rgba(var(--text-color), 0.7); + } + h4, h5, p{ text-align: center; } & > h4{ @@ -1076,7 +1077,7 @@ sm-panel{ align-self: center; stroke: none; stroke-dasharray: 50; - fill: rgba(var(--foreground-color), 0.8); + fill: rgba(var(--foreground-color), 1); animation: popup 2s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275); } @@ -1104,6 +1105,37 @@ sm-panel{ } } +.activity{ + display: grid; + background: rgba(var(--text-color), 0.06); + border-radius: 0.6rem; + padding: 1rem 1.2rem; + gap: 0 1rem; + grid-template-columns: auto 1fr auto; + grid-template-areas: 'icon type amount' 'icon time time'; + .icon{ + grid-area: icon; + height: 3rem; + width: 3rem; + padding: 0.8rem; + background: rgba(var(--text-color), 0.06); + border-radius: 2rem; + } + .activity-type{ + grid-area: type; + } + .activity-amount{ + text-align: right; + grid-area: amount; + } + .activity-time{ + text-align: right; + grid-area: time; + color: rgba(var(--text-color), 0.7); + font-weight: 500; + } +} + @media only screen and (max-width: 640px) { #home_page, #deposit{ display: grid; @@ -1171,7 +1203,7 @@ sm-panel{ } .page { - padding-bottom: 2em; + padding-bottom: 2rem; } #sign_in_popup { diff --git a/index.html b/index.html index f8a280f..98799b6 100644 --- a/index.html +++ b/index.html @@ -18,9 +18,9 @@

-
- - +
+ Cancel + OK
@@ -108,8 +108,7 @@

Add money through UPI.

- show -

Pay ₹0 to UPI Id below.

+

Pay ₹0 to UPI Id below.

@@ -274,7 +273,8 @@

-
+
+
Transaction ID

Copy @@ -469,7 +469,7 @@

Transaction Requests

- + Deposits Withdrawals Pay Through Cashier @@ -710,12 +710,17 @@

*If your request isn't completed in 12hrs, use REPORT to get assistance from our helpline.

+ Sent Deposits Withdrawals Pay through cashier System Notifications + +
+

You haven't sent any rupee yet.

+

You haven't deposited rupee yet.

@@ -825,7 +830,6 @@ currentTimeout, notificationSound = document.getElementById('notification_sound'); const render = { - // returns an order element; depositRequest(txid, floId) { let card = document.createElement('div'); card.classList.add('request') @@ -881,6 +885,63 @@ `; return card; }, + activityCard(type, amount, timesStamp){ + let card = document.createElement('div'), + composition = ``, + icon, + sign + card.classList.add('activity') + switch(type){ + case 'sent': + icon = ` + + + + ` + sign = '-' + break; + case 'deposit': + icon = ` + + deposit + + + + + + + ` + sign = '+' + break; + case 'withdraw': + icon = ` + + withdraw + + + + + + + + ` + sign = '-' + break; + } + composition = ` + ${icon} +

${type}

+

${sign} ₹${amount}

+
${formatedTime(timesStamp)}
+ ` + card.innerHTML = composition; + return card; + }, depositActivity(vectorClock, txid, amount) { let card = document.createElement('div'), time = parseInt(vectorClock.split('_')[0]) @@ -1341,11 +1402,14 @@ tokenAmount.disabled = false break; case 'transaction_result' : + setTimeout(() => { transactionHeading.textContent = '' transactionMessage.innerHTML = '' transactionSuccessId.textContent = '' + transactionSuccessId.parentNode.classList.add('hide-completely') transactionSuccessSection.classList.add('hide-completely') transactionFailedSection.classList.add('hide-completely') + }, 300); break; case 'prompt': if (thisPopup.querySelector('sm-input').value == '') @@ -1457,6 +1521,7 @@ }) } + const currentYear = new Date().getFullYear() function formatedTime(time) { try { let timeFrag = new Date(parseInt(time)).toString().split(' '), @@ -1476,7 +1541,10 @@ finalHours = `${hours}:${minutes}` finalHours = hours >= 12 ? `${finalHours} PM` : `${finalHours} AM` - return `${finalHours} ${month} ${date} ${year}`; + if(year == currentYear) + return `${finalHours} ${month} ${date}`; + else + return `${finalHours} ${month} ${date} ${year}`; } catch (e) { console.error(e); return time; @@ -1667,12 +1735,14 @@ transactionHeading.textContent = heading transactionMessage.innerHTML = message transactionSuccessId.textContent = transactionId + if(transactionId) + transactionSuccessId.parentNode.classList.remove('hide-completely') + else + transactionSuccessId.parentNode.classList.add('hide-completely') if(status === 'success'){ transactionSuccessSection.classList.remove('hide-completely') - transactionFailedSection.classList.add('hide-completely') } else{ - transactionSuccessSection.classList.add('hide-completely') transactionFailedSection.classList.remove('hide-completely') } showPopup('transaction_result') @@ -11354,8 +11424,6 @@ await this.retrieveLatestContent(); - request_rupee_token(); - withdraw_token_to_get_cash(); transferTokensManually(); @@ -11760,11 +11828,11 @@ flo_comment) console.log(flo_txid); if (typeof flo_txid !== "string") { - notify(`Transaction unsuccessful.`); + showTrasactionStatus('failure', `Transaction failed.`); hidePopup() return false; } else { - notify(`Transaction successful: ${flo_txid}`, 'success', true, true); + showTrasactionStatus('success', 'Rupee Sent', 'It may take upto 48 working hours for transaction to be completed.', flo_txid); if (payingRequested === true) { const all_reqs = floDapps.getNextGeneralData(token_app.master_configurations .TYPE_REQUEST_PAYMENT, "0").reverse(); @@ -12082,7 +12150,6 @@ .TYPE_DEPOSITS, { receiverID: cashier }).then(result => { - console.log(result); hidePopup() showTrasactionStatus('success', 'Deposit request sent.', 'It may take upto 48 hours for deposited amount to be reflected in your account.') btnLoading('request_tokens_btn', 'stop') @@ -12103,20 +12170,8 @@ const cashier = randomNoRepeats(Object.keys(token_app.master_configurations.cashiers))(); withdraw_cash_btn.onclick = async function () { btnLoading('withdraw_cash_btn', 'start') - if (typeof myFloID !== "string" || myFloID.length < 1) { - notify(`Your Flo Id is invalid.`, 'error'); - return; - } const withdraw_cash_amount = Number(document.getElementById('withdraw_cash_amount').value); const user_withdraw_upi = String(document.getElementById('user_withdraw_upi').value); - if (withdraw_cash_amount < 1) { - notify(`Invalid amount. Please provide a number above 0.`, 'error'); - return false; - } - if (!user_withdraw_upi.includes('@')) { - notify(`Please enter a valid UPI id.`, 'error'); - return false; - } const token_balance_url = `https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressBalance?token=rupee&floAddress=${myFloID}`; const user_token_balance_object = await ajaxGet(token_balance_url); @@ -12129,9 +12184,8 @@ } const current_balance = Number(user_token_balance_object.balance); if (current_balance < withdraw_cash_amount) { - notify(`You have unsufficient balance to withdraw. You can withdraw only ₹${user_token_balance_object.balance}`, - 'error', true, true); hidePopup() + showTrasactionStatus('failure', 'Insufficient Balance', `You have only ₹${user_token_balance_object.balance} balance`) return; } @@ -12140,8 +12194,8 @@ flo_comment) console.log(flo_txid); if (typeof flo_txid !== "string") { - notify(`Transaction unsuccessful.`, 'error'); hidePopup() + showTrasactionStatus('failure', 'Withdrawal failed') return false; } // TODO: Validate https://ranchimallflo.duckdns.org/api/v1.0/getTransactionDetails/${flo_txid} @@ -12159,16 +12213,13 @@ .TYPE_WITHDRAWS, { receiverID: cashier }); - notify('Withdraw request sent successfully.'); hidePopup() + showTrasactionStatus('success', 'Withdraw request sent.', 'It may take upto 48 working hours to process your withdrawal request.') return true; } - notify('Failed to send withdraw request to cashier.', 'error'); + showTrasactionStatus('failure', 'Failed to send withdraw request.'); return true; } - - const user_withdraw_upi = document.getElementById('user_withdraw_upi'); - //user_withdraw_upi.value = get_user_payment_details(); } catch (error) { throw new Error(error) @@ -12244,7 +12295,7 @@ upi_txid, deposit_amount } = usr_deposits.message; - frag.append(render.depositActivity(usr_deposits.vectorClock, upi_txid, deposit_amount)) + frag.append(render.activityCard('deposit', deposit_amount, usr_deposits.vectorClock, upi_txid)) } depositActivityContainer.innerHTML = ``; @@ -12256,8 +12307,7 @@ withdrawer_upi, withdraw_amount } = usr_withdraws.message; - frag.append(render.withdrawActivity(usr_withdraws.vectorClock, token_txid, withdrawer_upi, - withdraw_amount)) + frag.append(render.activityCard('withdraw', withdraw_amount, usr_withdraws.vectorClock, token_txid, withdrawer_upi)) } withdrawActivityContainer.innerHTML = ``; withdrawActivityContainer.append(frag) @@ -12507,13 +12557,12 @@ async function get_sent_rupee_list() { try { let senderIDs = [myFloID]; - let receiverID = myFloID; floGlobals.appObjects[token_app.master_configurations.TYPE_SENT_TOKENS][flo_txid] = { token_sender, token_receiver, token_amount, token_name_radio, flo_txid, "datetime": + new Date() }; await floCloudAPI.requestObjectData(token_app.master_configurations.TYPE_SENT_TOKENS, - options = { receiverID, senderIDs }); + options = { myFloID, senderIDs }); const sent_tokens_list = Object.keys(floGlobals.appObjects [token_app.master_configurations.TYPE_SENT_TOKENS]); @@ -12526,29 +12575,12 @@ } } - function get_user_payment_details() { - try { - const pay_key = `pay_key_${myFloID}`; - var pay_id = localStorage.getItem(pay_key); - if(typeof pay_id !=='string' || pay_id.length<1) throw new Error('Invalid payment id.'); - return pay_id; - } catch(error) { - notify('Please update your UPI or payment details in settings.', 'error', '', true); - throw new Error(error) - } - } - async function update_my_payment_details(userUpi='') { try { compactIDB.writeData('userUpis', userUpi, userUpi) console.log(await compactIDB.readAllData('userUpis')) - // todo: validate upi_id - - /*const pay_key = `pay_key_${myFloID}`; - - localStorage.setItem(pay_key, payment_id);*/ notify('Your payment details updated successfully.')