diff --git a/docs/css/main.css b/docs/css/main.css index 45d8c08..1e51547 100644 --- a/docs/css/main.css +++ b/docs/css/main.css @@ -88,7 +88,6 @@ fieldset { button { -webkit-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; position: relative; display: inline-flex; @@ -207,7 +206,6 @@ ul { word-wrap: break-word; -ms-word-break: break-all; word-break: break-word; - -ms-hyphens: auto; -webkit-hyphens: auto; hyphens: auto; } @@ -484,7 +482,6 @@ details summary { justify-content: space-between; -webkit-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; cursor: pointer; padding: 1rem 0; @@ -510,7 +507,6 @@ strip-option { font-size: 0.9rem; -webkit-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; --border-radius: 0; --active-option-color: rgba(var(--background-color), 1); @@ -724,7 +720,6 @@ sm-checkbox { transition: background-color 0.3s; -webkit-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; color: inherit; grid-template-columns: auto 1fr auto auto; @@ -869,7 +864,6 @@ sm-checkbox { outline: none; -webkit-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; align-items: center; gap: 0.5rem; @@ -1058,10 +1052,10 @@ sm-checkbox { margin-bottom: 0.5rem; } .live-order[data-type=buy] { - background-color: #00fa9a10; + background-color: rgba(0, 250, 154, 0.062745098); } .live-order[data-type=sell] { - background-color: #e2135110; + background-color: rgba(226, 19, 81, 0.062745098); } #portfolio { @@ -1238,21 +1232,21 @@ sm-checkbox { margin-right: 0.5rem; } .personal-asset-balance:nth-of-type(1) { - background: url("bg-art2.svg") no-repeat bottom right, #c2ffd7; + background: url("bg-art2.svg") no-repeat bottom right, hsl(141deg, 100%, 88%); background-size: contain; } .personal-asset-balance:nth-of-type(1) .icon { - background-color: rgba(102, 255, 156, 0.5); + background-color: hsla(141deg, 100%, 70%, 0.5); } .personal-asset-balance:nth-of-type(1) .button { - border: solid thin rgba(102, 255, 156, 0.5); + border: solid thin hsla(141deg, 100%, 70%, 0.5); } .personal-asset-balance:nth-of-type(2) { - background: url("back.svg") no-repeat top right, #fcffa8; + background: url("back.svg") no-repeat top right, hsl(62deg, 100%, 83%); background-size: contain; } .personal-asset-balance:nth-of-type(2) .icon { - background-color: rgba(255, 234, 0, 0.5); + background-color: hsla(55deg, 100%, 50%, 0.5); } .personal-asset-balance > .flex { margin-bottom: 0.3rem; @@ -1477,15 +1471,12 @@ sm-checkbox { sm-button { --padding: 0.9rem 1.6rem; } - .empty-state { align-self: center; } - #user_popup_button { width: 100%; } - .main_navbar__item--active .item__title { transform: translateY(100%); opacity: 0; @@ -1493,42 +1484,33 @@ sm-checkbox { .main_navbar__item--active .icon { transform: translateY(50%) scale(1.2); } - #asset_list_wrapper { padding: 0 1.5rem; } - .listed-asset { border-radius: 0; border-bottom: solid thin rgba(var(--text-color), 0.1); } - #exchange { margin: 0; padding: 0; } - #login_form { padding: 0 1.5rem; } - #asset_page__header { display: flex; padding: 1rem 1.5rem 0.5rem 0.8rem; } - #chart_header { padding: 0 1.5rem 0.5rem 1.5rem; } - #trade_form { padding: 0 1.5rem; } - #price_chart_container { flex: 1; } - #asset_page__footer button { display: flex; flex-direction: column; @@ -1550,7 +1532,6 @@ sm-checkbox { #asset_page__footer button.active .icon { fill: var(--accent-color); } - .hide-on-mobile { display: none !important; } @@ -1559,53 +1540,43 @@ sm-checkbox { sm-popup { --width: 24rem; } - .popup__header { grid-column: 1/-1; padding: 1rem 1.5rem 0 1.5rem; } - #confirmation_popup { --width: 24rem; } - .page-layout { grid-template-columns: 1fr 90vw 1fr; } - .mobile-page { align-self: flex-start; padding: 2rem; border-radius: 0.5rem; background-color: rgba(var(--foreground-color), 1); } - .hide-on-desktop { display: none !important; } - #home { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; grid-template-areas: "header header" "nav pages"; } - #main_header { grid-area: header; } - #user_popup_button { justify-self: flex-end; } - #main_navbar { grid-area: nav; flex-direction: column; height: 100%; padding-left: 0.5rem; } - .main_navbar__item { padding: 1.5rem 2rem 1.5rem 1rem; width: 100%; @@ -1624,7 +1595,6 @@ sm-checkbox { .main_navbar__item--active { background-color: rgba(var(--text-color), 0.06); } - #pages_container { grid-area: pages; } @@ -1632,7 +1602,6 @@ sm-checkbox { margin: 0 1.5rem; padding: 2rem; } - .is-signed-in #exchange { display: flex; width: 100%; @@ -1645,15 +1614,12 @@ sm-checkbox { grid-template-columns: 17rem minmax(0, 1fr); align-items: flex-start; } - #price_history_chart { height: 20rem; } - #asset_list_wrapper { grid-row: 1/3; } - .listed-asset { padding: 1rem; } @@ -1669,16 +1635,13 @@ sm-checkbox { height: 2rem; background-color: var(--accent-color); } - .order-card { grid-template-columns: auto 1fr 1fr 1fr auto; grid-template-areas: "checkbox quantity price amount time cancel"; } - .orders_section__header { background-color: rgba(var(--foreground-color), 1); } - #history .sticky, #portfolio_asset_page .sticky { background-color: rgba(var(--foreground-color), 1); @@ -1701,7 +1664,6 @@ sm-checkbox { width: 100%; grid-template-columns: 18rem 1fr; } - .completed-trade { grid-template-columns: 1fr 1fr 1fr 8rem; grid-template-areas: "quantity price amount info"; @@ -1723,7 +1685,6 @@ sm-checkbox { #home { grid-template-columns: auto 1fr; } - #asset_page_wrapper { display: grid; gap: 1.5rem; @@ -1745,7 +1706,6 @@ sm-checkbox { width: 0.5rem; height: 0.5rem; } - ::-webkit-scrollbar-thumb { background: rgba(var(--text-color), 0.3); border-radius: 1rem; @@ -1753,7 +1713,6 @@ sm-checkbox { ::-webkit-scrollbar-thumb:hover { background: rgba(var(--text-color), 0.5); } - .order-card .cancel-order { justify-self: flex-end; overflow: hidden; diff --git a/docs/css/main.min.css b/docs/css/main.min.css index b83b191..cb51504 100644 --- a/docs/css/main.min.css +++ b/docs/css/main.min.css @@ -1 +1 @@ -*{padding:0;margin:0;box-sizing:border-box;font-family:"Roboto",sans-serif}:root{font-size:clamp(1rem,1.2vmax,1.2rem)}html,body{height:100%;scroll-behavior:smooth}body{--accent-color: #516beb;--text-color: 20, 20, 20;--foreground-color: 252, 253, 255;--background-color: 241, 243, 248;--danger-color: rgb(255, 75, 75);--green: #1cad59;--yellow: #bd7200;scrollbar-width:thin;scrollbar-gutter:stable;color:rgba(var(--text-color), 1);background-color:rgba(var(--background-color), 1);transition:background-color .3s}body[data-theme=dark]{--accent-color: #a4b3ff;--text-color: 220, 220, 220;--foreground-color: 27, 28, 29;--background-color: 21, 22, 22;--danger-color: rgb(255, 106, 106);--green: #00e676;--yellow: #ffeb3b}body[data-theme=dark] sm-popup::part(popup){background-color:rgba(var(--foreground-color), 1)}p,strong{font-size:.9rem;max-width:70ch;line-height:1.7;color:rgba(var(--text-color), 0.8)}p:not(:last-of-type),strong:not(:last-of-type){margin-bottom:1.5rem}a:where([class]){color:inherit;text-decoration:none}a:where([class]):focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}a{text-decoration:none;color:var(--accent-color)}a:focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}a.button{display:flex;align-items:center;padding:.4rem .6rem;border-radius:.3rem;font-size:.9rem;font-weight:500;color:var(--accent-color)}fieldset{border:none}button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:transparent;overflow:hidden;color:inherit;-webkit-tap-highlight-color:transparent;align-items:center;font-size:.9rem;font-weight:500;white-space:nowrap;padding:.8rem;border-radius:.3rem;justify-content:center}button:focus-visible{outline:var(--accent-color) solid medium}button:not(:disabled){cursor:pointer}.button{color:var(--accent-color);background-color:rgba(var(--text-color), 0.06)}.button--primary,.button--danger{color:rgba(var(--background-color), 1) !important}.button--primary .icon,.button--danger .icon{fill:rgba(var(--background-color), 1)}.button--primary{background-color:var(--accent-color)}.button--danger{background-color:var(--danger-color)}.button--small{padding:.4rem .6rem}.cta{text-transform:uppercase;font-size:.8rem;font-weight:700;letter-spacing:.05em;padding:.8rem 1rem}a:-webkit-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:-moz-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}input{accent-color:var(--accent-color)}sm-input{font-size:.9rem;--border-radius: 0.3rem}sm-button{text-transform:uppercase;letter-spacing:.02em;font-weight:700;font-size:.9rem;--padding: 0.7rem 1rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}sm-button.danger{--background: var(--danger-color);color:rgba(var(--background-color), 1)}sm-form{--gap: 1rem}sm-copy{font-size:.9rem}ul{list-style:none}.hide{display:none !important}.overflow-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.wrap-around{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.sticky{position:-webkit-sticky;position:sticky;top:0;z-index:1}.full-bleed{grid-column:1/4}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.flex{display:flex}.flex-1{flex:1}.flex-wrap{flex-wrap:wrap}.flex-direction-column{flex-direction:column}.grid{display:grid}.grid-3{grid-template-columns:1fr auto auto}.flow-column{grid-auto-flow:column}.gap-0-3{gap:.3rem}.gap-0-5{gap:.5rem}.gap-1{gap:1rem}.gap-1-5{gap:1.5rem}.gap-2{gap:2rem}.gap-3{gap:3rem}.text-align-right{text-align:right}.align-start{align-items:flex-start}.align-center{align-items:center}.text-center{text-align:center}.justify-start{justify-content:start}.justify-center{justify-content:center}.justify-right{margin-left:auto}.align-self-center{align-self:center}.justify-self-center{justify-self:center}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.space-between{justify-content:space-between}.w-100{width:100%}.interact{position:relative;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent}.ripple{height:8rem;width:8rem;position:absolute;border-radius:50%;transform:scale(0);background:radial-gradient(circle, rgba(var(--text-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%);pointer-events:none}.icon{width:1.2rem;height:1.2rem;fill:rgba(var(--text-color), 0.8)}.margin-right-0-5{margin-right:.5rem}.margin-left-0-5{margin-left:.5rem}.icon-only{padding:.5rem;aspect-ratio:1/1;background-color:transparent}.icon-button{padding:.6rem;border-radius:.8rem;background-color:var(--accent-color--light);height:-webkit-max-content;height:-moz-max-content;height:max-content}.icon-button .icon{fill:var(--accent-color)}.empty-state{display:grid;text-align:center;justify-items:center;width:100%;max-width:none;padding:1.5rem}.empty-state__icon{height:3rem;width:3rem;padding:.6rem;border-radius:1rem;background-color:rgba(var(--text-color), 0.06);margin-bottom:1rem}.observe-empty-state:empty{display:none !important}.observe-empty-state:not(:empty)+.empty-state{display:none !important}#confirmation_popup,#prompt_popup{flex-direction:column}#confirmation_popup h4,#prompt_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button,#prompt_popup sm-button{margin:0}#confirmation_popup .flex,#prompt_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type,#prompt_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}#prompt_message{margin-bottom:1.5rem}.popup__header{display:grid;gap:.5rem;width:100%;padding:0 1.5rem;align-items:center;justify-items:flex-start}.popup__header__close{padding:.5rem;margin-left:-0.5rem}#main_page{padding:1.5rem}#main_page>section:nth-of-type(1){align-content:flex-start}.logo{display:grid;align-items:center;grid-template-columns:auto 1fr;gap:0 .3rem;margin-right:auto}.logo h4{text-transform:capitalize;font-weight:600}.logo .main-logo{height:1.4rem;width:1.4rem;fill:rgba(var(--text-color), 1);stroke:none}details:not(:last-of-type){border-bottom:thin solid rgba(var(--text-color), 0.3)}details summary{display:flex;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;padding:1rem 0}details .icon{flex-shrink:0}details[open]{padding-bottom:1rem}details[open] summary .icon{transform:rotate(180deg)}strip-select{--gap: 0;background-color:rgba(var(--text-color), 0.06);border-radius:.2rem}strip-option{font-weight:500;font-size:.9rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;--border-radius: 0;--active-option-color: rgba(var(--background-color), 1);--active-option-background-color: var(--accent-color)}strip-option:first-of-type{--border-radius: 0.2rem 0 0 0.2rem}strip-option:last-of-type{--border-radius: 0 0.2rem 0.2rem 0}sm-select,sm-option{font-size:.9rem}sm-checkbox{--height: 1rem;--width: 1rem;-webkit-tap-highlight-color:transparent}.warning{background-color:khaki;color:rgba(0,0,0,.7);padding:1rem;border-radius:.5rem;line-height:1.5}.tip{border-radius:1.5rem;background-color:rgba(var(--text-color), 0.06);padding:.3rem .8rem;font-size:.85rem}.tip .icon{fill:var(--accent-color);flex-shrink:0}.tooltip{display:flex;position:relative;z-index:8;cursor:pointer}.tooltip .banner{position:absolute;right:0;top:100%;width:min(20rem,100vw - 1rem);display:none;font-size:.9rem;background-color:rgba(var(--foreground-color), 1);padding:1rem;border-radius:.5rem;box-shadow:0 .2rem .5rem rgba(0,0,0,.1);border:solid thin rgba(var(--text-color), 0.2)}.tooltip:hover .banner{display:block}.page-layout{display:grid;grid-template-columns:1.5rem minmax(0, 1fr) 1.5rem}.page-layout>*{grid-column:2/3}.page{height:100%}.mobile-page{align-items:flex-start}#landing{grid-template-rows:auto 1fr}#landing header{padding:1.5rem 0}#landing>.grid{align-content:flex-start;text-align:center;gap:1rem}#sign_up{grid-template-rows:auto 1fr;align-items:center}#sign_up section{margin-top:-6rem;justify-self:center;width:min(24rem,100%)}#sign_up header{padding:1.5rem 0}#sign_up .h2{margin-bottom:.5rem}#sign_up h5{font-weight:500;color:rgba(var(--text-color), 0.8)}#sign_up .warning{margin-top:2rem}.multi-state-button{display:grid;text-align:center;align-items:center}.multi-state-button>*{grid-area:1/1/2/2}.multi-state-button button{z-index:1}#home{height:100%;display:flex;flex-direction:column;align-items:flex-start;align-content:flex-start}#login_form{width:min(24rem,100%);margin:0 auto}#login_form__priv_key{margin-top:1rem}#main_header{display:flex;flex-wrap:wrap;gap:1rem;padding:1rem 1.5rem;width:100%;align-items:center}#user_popup_button{background-color:rgba(var(--text-color), 0.06);border-radius:2rem;font-size:.8rem}#main_navbar{width:100%}.main_navbar__item{display:flex;flex-direction:column;align-items:center;flex:1;padding:.5rem 0}.main_navbar__item .item__title,.main_navbar__item .icon{transition:transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275),opacity .3s}.main_navbar__item .item__title{color:rgba(var(--text-color), 0.8);font-size:.8rem;font-weight:500}.main_navbar__item .icon{height:1.2rem;margin-bottom:.3rem}.main_navbar__item--active .item__title{color:var(--accent-color)}.main_navbar__item--active .icon{fill:var(--accent-color)}#pages_container{display:flex;flex:1;width:100%;height:100%;justify-content:center;overflow-y:auto}#pages_container>*{padding:0 1.5rem;min-width:min(26rem,100%)}.listed-asset{position:relative;gap:.5rem;padding:1rem 0;border-radius:.5rem;font-weight:400;transition:background-color .3s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:inherit;grid-template-columns:auto 1fr auto auto;grid-template-areas:"icon name rate right-arrow" "icon name countdown right-arrow"}.listed-asset__icon{grid-area:icon;padding:.5rem;border-radius:1rem;display:flex;background-color:var(--accent-color)}.listed-asset__icon .icon{height:1.2rem;width:1.2rem;fill:rgba(var(--background-color), 1)}.listed-asset__name{grid-area:name;margin-left:.3rem}.listed-asset__rate{grid-area:rate}.listed-asset__countdown{display:flex;align-items:center;grid-area:countdown;justify-self:flex-end;font-size:.8rem;color:var(--accent-color)}.listed-asset__countdown .icon{margin-left:.3rem;overflow:visible;stroke-width:3;fill:none}.listed-asset__countdown .icon .path-a{stroke:var(--accent-color);stroke-dashoffset:var(--path-length, 0);stroke-dasharray:63}.listed-asset__countdown .icon .path-b{stroke:rgba(var(--text-color), 0.2)}.listed-asset__right-arrow{grid-area:right-arrow;background-color:rgba(var(--text-color), 0.1);border-radius:1rem;padding:.1rem;margin-left:.3rem}.quantity-selector .button{flex:1;padding:.5rem .6rem;margin-left:.5rem}#quantity_selector_tip::first-letter{text-transform:uppercase}#quantity_type,#portfolio_quantity_type{font-size:.8rem;padding-right:.5rem;border-right:thin solid rgba(var(--text-color), 0.3);margin-right:auto;color:rgba(var(--text-color), 0.8);line-height:1.5;font-weight:500;min-width:8ch}#exchange_wrapper{display:flex;flex-direction:column;height:100%}#asset_page{position:relative;display:flex;flex-direction:column;height:100%;align-items:flex-start}#asset_page_wrapper{display:flex;flex-direction:column;height:100%;width:100%}#trade_form{height:100%}#trade_form::part(form){display:flex;flex-direction:column;gap:0}#trade_form>*{margin-bottom:1rem}#trade_form>:last-child{margin-top:auto}#my_orders,#market{width:min(46rem,100%);height:-webkit-max-content;height:-moz-max-content;height:max-content}#my_orders{grid-template-rows:auto 1fr}.orders_section__header{min-height:2.8rem;position:-webkit-sticky;position:sticky;top:0;background-color:rgba(var(--background-color), 1);z-index:2;transition:background-color .3s}.list__item{padding:.5rem 0;display:grid}.order-card{position:relative;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;gap:.5rem;grid-template-columns:-webkit-min-content 1fr auto;grid-template-columns:min-content 1fr auto;border-radius:.5rem;grid-template-areas:"checkbox quantity quantity time" "checkbox price amount cancel"}.order-card>.grid:nth-of-type(2){grid-area:price}.order-card>.grid:nth-of-type(3){grid-area:amount}.order-card__type{font-size:.9rem;font-weight:500;margin-bottom:.3rem}.order-card[data-type=buy] .order-card__type{color:var(--green)}.order-card[data-type=sell] .order-card__type{color:var(--danger-color)}.order-card--selected{background-color:rgba(var(--text-color), 0.08)}.order-card--selected .cancel-order{visibility:hidden;pointer-events:none}.order-card sm-checkbox{grid-area:checkbox;cursor:pointer;margin-right:.5rem}.order-card__quantity,.order-card__price{font-size:.9rem;color:rgba(var(--text-color), 0.9)}.order-card__time{grid-area:time;font-size:.8rem;color:rgba(var(--text-color), 0.8)}.order-card .cancel-order{grid-area:cancel;color:var(--danger-color)}.order-card .cancel-order .icon{fill:var(--danger-color)}.cancel-order{align-items:center;padding:.4rem .6rem}.cancel-order span{margin-left:.3rem}.completed-trade,.transaction-card,.live-order{gap:0 1rem}.completed-trade__type,.transaction-card__type,.live-order__type{font-size:.9rem;font-weight:500;margin-bottom:.3rem}.completed-trade[data-type=Bought] .completed-trade__type,.completed-trade--buy .completed-trade__type,.completed-trade[data-type=Bought] .transaction-card__type,.completed-trade--buy .transaction-card__type,.completed-trade[data-type=Bought] .live-order__type,.completed-trade--buy .live-order__type,.transaction-card[data-type=Bought] .completed-trade__type,.transaction-card--buy .completed-trade__type,.transaction-card[data-type=Bought] .transaction-card__type,.transaction-card--buy .transaction-card__type,.transaction-card[data-type=Bought] .live-order__type,.transaction-card--buy .live-order__type,.live-order[data-type=Bought] .completed-trade__type,.live-order--buy .completed-trade__type,.live-order[data-type=Bought] .transaction-card__type,.live-order--buy .transaction-card__type,.live-order[data-type=Bought] .live-order__type,.live-order--buy .live-order__type{color:var(--green)}.completed-trade[data-type=Sold] .completed-trade__type,.completed-trade--sell .completed-trade__type,.completed-trade[data-type=Sold] .transaction-card__type,.completed-trade--sell .transaction-card__type,.completed-trade[data-type=Sold] .live-order__type,.completed-trade--sell .live-order__type,.transaction-card[data-type=Sold] .completed-trade__type,.transaction-card--sell .completed-trade__type,.transaction-card[data-type=Sold] .transaction-card__type,.transaction-card--sell .transaction-card__type,.transaction-card[data-type=Sold] .live-order__type,.transaction-card--sell .live-order__type,.live-order[data-type=Sold] .completed-trade__type,.live-order--sell .completed-trade__type,.live-order[data-type=Sold] .transaction-card__type,.live-order--sell .transaction-card__type,.live-order[data-type=Sold] .live-order__type,.live-order--sell .live-order__type{color:var(--danger-color)}.completed-trade__total,.transaction-card__total,.live-order__total{font-weight:700;font-size:.9rem;color:rgba(var(--text-color), 0.8)}.completed-trade__quantity,.completed-trade__price,.transaction-card__quantity,.transaction-card__price,.live-order__quantity,.live-order__price{font-size:.9rem;color:rgba(var(--text-color), 0.9)}.completed-trade__time,.transaction-card__time,.live-order__time{font-size:.8rem;color:rgba(var(--text-color), 0.8)}.completed-trade .more-info,.transaction-card .more-info,.live-order .more-info{flex-shrink:0;padding:.3rem}.transaction-card{content-visibility:auto;contain-intrinsic-size:2.5rem;grid-template-columns:repeat(3, 1fr) 2rem}.completed-trade{display:grid;gap:.5rem;grid-template-columns:1fr 1fr;background-color:rgba(var(--text-color), 0.03);border-radius:.5rem;padding:1rem;margin-bottom:.5rem}#market_asset_rates{display:grid;gap:.5rem}#market_asset_rates .listed-asset{padding:1rem;background-color:rgba(var(--text-color), 0.03)}#market_orders_wrapper .list__header{font-size:.8rem;font-weight:500}#market_orders_wrapper .list__header div{padding:.5rem 0}#market_orders_wrapper .list__header{margin-bottom:.5rem;grid-template-columns:repeat(3, 1fr) 2rem}.live-order{display:grid;gap:1rem;padding:1rem;border-radius:.5rem;background-color:rgba(var(--text-color), 0.03)}.live-order:not(:last-of-type){margin-bottom:.5rem}.live-order[data-type=buy]{background-color:#00fa9a10}.live-order[data-type=sell]{background-color:#e2135110}#portfolio{display:grid;gap:1.5rem;grid-template-columns:minmax(0, 1fr);align-content:flex-start;width:min(32rem,100%)}.label{font-size:.8rem;color:rgba(var(--text-color), 0.8);margin-bottom:.2rem}#my_assets{gap:.5rem;margin-top:.5rem;padding-bottom:1.5rem;border:none}.balance-card{display:grid;align-items:center;gap:0 .5rem;padding:1rem;padding-left:.6rem;border-radius:.3rem;color:inherit;background-color:rgba(var(--text-color), 0.03)}.balance-card.is-locked{grid-template-columns:auto 1fr auto}.balance-card.is-locked .balance-card__icon{grid-row:span 2}.balance-card.is-locked .balance-card__right-arrow{grid-area:1/3/3/4}.balance-card.is-locked .balance-card__amount-wrapper{grid-area:2/2/3/3}.balance-card:not(.is-locked){grid-template-columns:auto 1fr auto auto}.balance-card:not(.is-locked) .balance-card__right-arrow{grid-area:1/4/2/5}.balance-card__icon{display:flex;align-content:center;justify-content:center;margin:0 .5rem;border-radius:.8rem;align-self:flex-start;background-color:var(--accent-color--light)}.balance-card__icon .icon{height:1.3rem;width:1.3rem;fill:var(--accent-color)}.balance-card__token{font-size:.9rem;font-weight:500}.balance-card__amount-wrapper{margin-top:.5rem;grid-column:3/-1;gap:.3rem 1rem;grid-template-columns:1fr 1fr}.balance-card__amount-wrapper>:nth-child(even){text-align:right}.balance-card__right-arrow{background-color:rgba(var(--text-color), 0.1);border-radius:1rem;padding:.1rem;fill:var(--accent-color)}#history{padding-top:0 !important;width:min(36rem,100%)}#history .sticky{margin-left:-0.7rem;padding:1rem 0;background-color:rgba(var(--background-color), 1)}#exchange_history{margin-top:.5rem}.history-entry{display:grid;grid-template-columns:auto 1fr auto;gap:.5rem 1rem;align-items:center;margin-bottom:2rem}.history-entry[data-status=SUCCESS] .history-entry__status .icon{fill:var(--green)}.history-entry[data-status=PENDING] .history-entry__status .icon,.history-entry[data-status=WAITING_CONFIRMATION] .history-entry__status .icon{fill:var(--yellow)}.history-entry__status{display:flex;align-items:center;justify-content:center;grid-row:1/3;width:2.5rem;height:2.5rem;background-color:rgba(var(--text-color), 0.03);border-radius:2rem}.history-entry__token-action{font-weight:500}.history-entry__amount{font-weight:500;text-align:right}.history-entry[data-type=deposit] .history-entry__amount:not(:empty){color:var(--green)}.history-entry[data-type=deposit] .history-entry__amount:not(:empty)::before{content:"+ "}.history-entry[data-type=withdraw] .history-entry__amount:not(:empty)::before{content:"- "}.history-entry__time{font-size:.8rem;color:rgba(var(--text-color), 0.8)}.history-entry__txid{font-weight:500;font-size:.9rem;text-align:right}#portfolio_asset_page .sticky{margin-top:-1.5rem;margin-left:-0.7rem;padding:1rem 0;background-color:rgba(var(--background-color), 1)}#portfolio_asset__history{margin-top:1rem}#portfolio_cards_wrapper{display:grid;gap:.5rem;grid-template-columns:repeat(auto-fit, minmax(12rem, 1fr))}.personal-asset-balance{align-content:flex-start;padding:1rem;border-radius:.5rem;color:rgba(0,0,0,.8);width:100%}.personal-asset-balance:not(:last-of-type){margin-right:.5rem}.personal-asset-balance:nth-of-type(1){background:url("bg-art2.svg") no-repeat bottom right,#c2ffd7;background-size:contain}.personal-asset-balance:nth-of-type(1) .icon{background-color:rgba(102,255,156,.5)}.personal-asset-balance:nth-of-type(1) .button{border:solid thin rgba(102,255,156,.5)}.personal-asset-balance:nth-of-type(2){background:url("back.svg") no-repeat top right,#fcffa8;background-size:contain}.personal-asset-balance:nth-of-type(2) .icon{background-color:rgba(255,234,0,.5)}.personal-asset-balance>.flex{margin-bottom:.3rem}.personal-asset-balance>.flex .icon{height:2rem;width:2rem;padding:.4rem;border-radius:.3rem;fill:rgba(0,0,0,.8);margin-right:.5rem}.personal-asset-balance .button{display:flex;align-items:center;margin-top:.5rem;padding-right:.8rem;justify-self:flex-start;border-radius:1rem;background-color:rgba(var(--foreground-color), 1);color:rgba(var(--text-color), 1);transition:box-shadow .3s}.personal-asset-balance .button .icon{height:1rem;background-color:transparent;margin-right:.3rem}.personal-asset-balance .button:hover{box-shadow:0 .3rem .5rem rgba(0,0,0,.16)}#personal_rupee_balance span:first-of-type,#personal_flo_balance span:first-of-type{font-size:1.5rem}#personal_rupee_balance span:last-of-type,#personal_flo_balance span:last-of-type{font-size:.9rem}#portfolio_result{justify-content:center;text-align:center}#portfolio_result__icon{display:flex;padding:1rem;border-radius:50%;background-color:rgba(var(--text-color), 0.06);justify-self:center;-webkit-animation:pop-up .3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);animation:pop-up .3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275)}#portfolio_result__icon .icon{height:2rem;width:2rem}.icon--success{fill:var(--green)}.icon--failure,.icon--error{fill:var(--danger-color)}@-webkit-keyframes pop-up{from{transform:translateY(3rem) scale(0.5);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}@keyframes pop-up{from{transform:translateY(3rem) scale(0.5);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#portfolio_result__cta{padding:1.5rem 1rem;border-radius:.5rem;background-color:rgba(var(--text-color), 0.06)}.stateful-button-wrapper{display:flex;position:relative;justify-content:center;align-items:center}.stateful-button-wrapper sm-button,.stateful-button-wrapper slide-button{width:100%;z-index:1;transition:-webkit-clip-path .3s;transition:clip-path .3s;transition:clip-path .3s, -webkit-clip-path .3s;-webkit-clip-path:circle(100%);clip-path:circle(100%)}.stateful-button-wrapper sm-button.clip,.stateful-button-wrapper slide-button.clip{pointer-events:none;-webkit-clip-path:circle(0);clip-path:circle(0)}.stateful-button-wrapper sm-spinner{position:absolute}.stateful-result{overflow:hidden;position:absolute;display:flex;justify-content:center;align-items:center;height:100%;width:100%;left:0}.stateful-result>*{position:absolute}.stateful-result--success .result__background{background-color:var(--green)}.stateful-result--failure .result__background{background-color:var(--danger-color)}.stateful-result .icon-wrapper{-webkit-animation:pop .4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);animation:pop .4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275)}.stateful-result .icon{height:1.5rem;width:1.5rem;fill:rgba(var(--background-color), 1)}.stateful-result span{font-weight:500;color:rgba(var(--background-color), 1)}.stateful-result .result__background{-webkit-animation:ripple-reveal 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);animation:ripple-reveal 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275)}.result__background{border-radius:.3rem;height:100%;width:100%;-webkit-clip-path:circle(10%);clip-path:circle(10%)}@-webkit-keyframes pop{from{opacity:0;transform:translateY(2rem)}to{opacity:1;transform:translateY(0)}}@keyframes pop{from{opacity:0;transform:translateY(2rem)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes ripple-reveal{to{-webkit-clip-path:circle(100%);clip-path:circle(100%)}}@keyframes ripple-reveal{to{-webkit-clip-path:circle(100%);clip-path:circle(100%)}}#help{width:min(60ch,100%);margin-bottom:3rem;align-content:flex-start}#help ul{list-style:initial;display:grid;gap:1rem}#help ul li{margin-left:1rem;padding-left:.5rem;font-size:.9rem}@media screen and (max-width: 40rem)and (any-hover: none){.cancel-order span{display:none !important}}@media screen and (max-width: 40rem){sm-button{--padding: 0.9rem 1.6rem}.empty-state{align-self:center}#user_popup_button{width:100%}.main_navbar__item--active .item__title{transform:translateY(100%);opacity:0}.main_navbar__item--active .icon{transform:translateY(50%) scale(1.2)}#asset_list_wrapper{padding:0 1.5rem}.listed-asset{border-radius:0;border-bottom:solid thin rgba(var(--text-color), 0.1)}#exchange{margin:0;padding:0}#login_form{padding:0 1.5rem}#asset_page__header{display:flex;padding:1rem 1.5rem .5rem .8rem}#chart_header{padding:0 1.5rem .5rem 1.5rem}#trade_form{padding:0 1.5rem}#price_chart_container{flex:1}#asset_page__footer button{display:flex;flex-direction:column;align-items:center;flex:1;padding:.5rem 0;color:rgba(var(--text-color), 0.8);font-size:.8rem;font-weight:500}#asset_page__footer button .icon{height:1.2rem;margin-bottom:.3rem;margin-right:.3rem}#asset_page__footer button.active{color:var(--accent-color)}#asset_page__footer button.active .icon{fill:var(--accent-color)}.hide-on-mobile{display:none !important}}@media screen and (min-width: 40rem){sm-popup{--width: 24rem}.popup__header{grid-column:1/-1;padding:1rem 1.5rem 0 1.5rem}#confirmation_popup{--width: 24rem}.page-layout{grid-template-columns:1fr 90vw 1fr}.mobile-page{align-self:flex-start;padding:2rem;border-radius:.5rem;background-color:rgba(var(--foreground-color), 1)}.hide-on-desktop{display:none !important}#home{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"header header" "nav pages"}#main_header{grid-area:header}#user_popup_button{justify-self:flex-end}#main_navbar{grid-area:nav;flex-direction:column;height:100%;padding-left:.5rem}.main_navbar__item{padding:1.5rem 2rem 1.5rem 1rem;width:100%;flex:0;flex-direction:row;border-radius:.5rem;transition:background-color .3s}.main_navbar__item .icon{margin-bottom:0;margin-right:.5rem}.main_navbar__item .item__title{font-size:.9rem}.main_navbar__item--active{background-color:rgba(var(--text-color), 0.06)}#pages_container{grid-area:pages}#pages_container>*{margin:0 1.5rem;padding:2rem}.is-signed-in #exchange{display:flex;width:100%}.is-signed-in #exchange_wrapper{display:grid;width:100%;height:100%;gap:1.5rem;grid-template-columns:17rem minmax(0, 1fr);align-items:flex-start}#price_history_chart{height:20rem}#asset_list_wrapper{grid-row:1/3}.listed-asset{padding:1rem}.listed-asset--active{opacity:1;background-color:rgba(var(--text-color), 0.06)}.listed-asset--active::before{content:"";position:absolute;width:.25rem;border-radius:0 .2rem .2rem 0;height:2rem;background-color:var(--accent-color)}.order-card{grid-template-columns:auto 1fr 1fr 1fr auto;grid-template-areas:"checkbox quantity price amount time cancel"}.orders_section__header{background-color:rgba(var(--foreground-color), 1)}#history .sticky,#portfolio_asset_page .sticky{background-color:rgba(var(--foreground-color), 1)}}@media screen and (max-width: 80rem)and (min-width: 40rem){.main_navbar__item{padding:1.5rem 1rem}.main_navbar__item .icon{margin-right:0}.main_navbar__item .item__title{display:none !important}}@media screen and (min-width: 52rem){body:not(.is-signed-in) #market{gap:2rem;width:100%;grid-template-columns:18rem 1fr}.completed-trade{grid-template-columns:1fr 1fr 1fr 8rem;grid-template-areas:"quantity price amount info"}.completed-trade .quantity-block{grid-area:quantity}.completed-trade .price-block{grid-area:price}.completed-trade .amount-block{grid-area:amount}.completed-trade .info-block{grid-area:info}}@media screen and (min-width: 64rem){#home{grid-template-columns:auto 1fr}#asset_page_wrapper{display:grid;gap:1.5rem;grid-template-columns:minmax(0, 1fr) 20rem}}@media screen and (min-width: 72rem){.page-layout{grid-template-columns:1fr 80vw 1fr}}@media screen and (min-width: 120rem){.page-layout{grid-template-columns:1fr 70vw 1fr}}@media(any-hover: hover){::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background:rgba(var(--text-color), 0.3);border-radius:1rem}::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-color), 0.5)}.order-card .cancel-order{justify-self:flex-end;overflow:hidden}.order-card .cancel-order .icon,.order-card .cancel-order span{transition:opacity .3s,transform .3s}.order-card .cancel-order .icon{transform:translateX(100%)}.order-card .cancel-order span{transform:translateX(100%);opacity:0}.order-card:hover .cancel-order .icon,.order-card:focus-within .cancel-order .icon{opacity:1}.order-card .cancel-order:hover .icon,.order-card .cancel-order:hover span{opacity:1;transform:translateX(0)}} \ No newline at end of file +*{padding:0;margin:0;box-sizing:border-box;font-family:"Roboto",sans-serif}:root{font-size:clamp(1rem,1.2vmax,1.2rem)}html,body{height:100%;scroll-behavior:smooth}body{--accent-color: #516beb;--text-color: 20, 20, 20;--foreground-color: 252, 253, 255;--background-color: 241, 243, 248;--danger-color: rgb(255, 75, 75);--green: #1cad59;--yellow: #bd7200;scrollbar-width:thin;scrollbar-gutter:stable;color:rgba(var(--text-color), 1);background-color:rgba(var(--background-color), 1);transition:background-color .3s}body[data-theme=dark]{--accent-color: #a4b3ff;--text-color: 220, 220, 220;--foreground-color: 27, 28, 29;--background-color: 21, 22, 22;--danger-color: rgb(255, 106, 106);--green: #00e676;--yellow: #ffeb3b}body[data-theme=dark] sm-popup::part(popup){background-color:rgba(var(--foreground-color), 1)}p,strong{font-size:.9rem;max-width:70ch;line-height:1.7;color:rgba(var(--text-color), 0.8)}p:not(:last-of-type),strong:not(:last-of-type){margin-bottom:1.5rem}a:where([class]){color:inherit;text-decoration:none}a:where([class]):focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}a{text-decoration:none;color:var(--accent-color)}a:focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}a.button{display:flex;align-items:center;padding:.4rem .6rem;border-radius:.3rem;font-size:.9rem;font-weight:500;color:var(--accent-color)}fieldset{border:none}button{-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:rgba(0,0,0,0);overflow:hidden;color:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);align-items:center;font-size:.9rem;font-weight:500;white-space:nowrap;padding:.8rem;border-radius:.3rem;justify-content:center}button:focus-visible{outline:var(--accent-color) solid medium}button:not(:disabled){cursor:pointer}.button{color:var(--accent-color);background-color:rgba(var(--text-color), 0.06)}.button--primary,.button--danger{color:rgba(var(--background-color), 1) !important}.button--primary .icon,.button--danger .icon{fill:rgba(var(--background-color), 1)}.button--primary{background-color:var(--accent-color)}.button--danger{background-color:var(--danger-color)}.button--small{padding:.4rem .6rem}.cta{text-transform:uppercase;font-size:.8rem;font-weight:700;letter-spacing:.05em;padding:.8rem 1rem}a:-webkit-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:-moz-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}input{accent-color:var(--accent-color)}sm-input{font-size:.9rem;--border-radius: 0.3rem}sm-button{text-transform:uppercase;letter-spacing:.02em;font-weight:700;font-size:.9rem;--padding: 0.7rem 1rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}sm-button.danger{--background: var(--danger-color);color:rgba(var(--background-color), 1)}sm-form{--gap: 1rem}sm-copy{font-size:.9rem}ul{list-style:none}.hide{display:none !important}.overflow-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.wrap-around{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.sticky{position:-webkit-sticky;position:sticky;top:0;z-index:1}.full-bleed{grid-column:1/4}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.flex{display:flex}.flex-1{flex:1}.flex-wrap{flex-wrap:wrap}.flex-direction-column{flex-direction:column}.grid{display:grid}.grid-3{grid-template-columns:1fr auto auto}.flow-column{grid-auto-flow:column}.gap-0-3{gap:.3rem}.gap-0-5{gap:.5rem}.gap-1{gap:1rem}.gap-1-5{gap:1.5rem}.gap-2{gap:2rem}.gap-3{gap:3rem}.text-align-right{text-align:right}.align-start{align-items:flex-start}.align-center{align-items:center}.text-center{text-align:center}.justify-start{justify-content:start}.justify-center{justify-content:center}.justify-right{margin-left:auto}.align-self-center{align-self:center}.justify-self-center{justify-self:center}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.space-between{justify-content:space-between}.w-100{width:100%}.interact{position:relative;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.ripple{height:8rem;width:8rem;position:absolute;border-radius:50%;transform:scale(0);background:radial-gradient(circle, rgba(var(--text-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%);pointer-events:none}.icon{width:1.2rem;height:1.2rem;fill:rgba(var(--text-color), 0.8)}.margin-right-0-5{margin-right:.5rem}.margin-left-0-5{margin-left:.5rem}.icon-only{padding:.5rem;aspect-ratio:1/1;background-color:rgba(0,0,0,0)}.icon-button{padding:.6rem;border-radius:.8rem;background-color:var(--accent-color--light);height:-webkit-max-content;height:-moz-max-content;height:max-content}.icon-button .icon{fill:var(--accent-color)}.empty-state{display:grid;text-align:center;justify-items:center;width:100%;max-width:none;padding:1.5rem}.empty-state__icon{height:3rem;width:3rem;padding:.6rem;border-radius:1rem;background-color:rgba(var(--text-color), 0.06);margin-bottom:1rem}.observe-empty-state:empty{display:none !important}.observe-empty-state:not(:empty)+.empty-state{display:none !important}#confirmation_popup,#prompt_popup{flex-direction:column}#confirmation_popup h4,#prompt_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button,#prompt_popup sm-button{margin:0}#confirmation_popup .flex,#prompt_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type,#prompt_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}#prompt_message{margin-bottom:1.5rem}.popup__header{display:grid;gap:.5rem;width:100%;padding:0 1.5rem;align-items:center;justify-items:flex-start}.popup__header__close{padding:.5rem;margin-left:-0.5rem}#main_page{padding:1.5rem}#main_page>section:nth-of-type(1){align-content:flex-start}.logo{display:grid;align-items:center;grid-template-columns:auto 1fr;gap:0 .3rem;margin-right:auto}.logo h4{text-transform:capitalize;font-weight:600}.logo .main-logo{height:1.4rem;width:1.4rem;fill:rgba(var(--text-color), 1);stroke:none}details:not(:last-of-type){border-bottom:thin solid rgba(var(--text-color), 0.3)}details summary{display:flex;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;padding:1rem 0}details .icon{flex-shrink:0}details[open]{padding-bottom:1rem}details[open] summary .icon{transform:rotate(180deg)}strip-select{--gap: 0;background-color:rgba(var(--text-color), 0.06);border-radius:.2rem}strip-option{font-weight:500;font-size:.9rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;--border-radius: 0;--active-option-color: rgba(var(--background-color), 1);--active-option-background-color: var(--accent-color)}strip-option:first-of-type{--border-radius: 0.2rem 0 0 0.2rem}strip-option:last-of-type{--border-radius: 0 0.2rem 0.2rem 0}sm-select,sm-option{font-size:.9rem}sm-checkbox{--height: 1rem;--width: 1rem;-webkit-tap-highlight-color:rgba(0,0,0,0)}.warning{background-color:khaki;color:rgba(0,0,0,.7);padding:1rem;border-radius:.5rem;line-height:1.5}.tip{border-radius:1.5rem;background-color:rgba(var(--text-color), 0.06);padding:.3rem .8rem;font-size:.85rem}.tip .icon{fill:var(--accent-color);flex-shrink:0}.tooltip{display:flex;position:relative;z-index:8;cursor:pointer}.tooltip .banner{position:absolute;right:0;top:100%;width:min(20rem,100vw - 1rem);display:none;font-size:.9rem;background-color:rgba(var(--foreground-color), 1);padding:1rem;border-radius:.5rem;box-shadow:0 .2rem .5rem rgba(0,0,0,.1);border:solid thin rgba(var(--text-color), 0.2)}.tooltip:hover .banner{display:block}.page-layout{display:grid;grid-template-columns:1.5rem minmax(0, 1fr) 1.5rem}.page-layout>*{grid-column:2/3}.page{height:100%}.mobile-page{align-items:flex-start}#landing{grid-template-rows:auto 1fr}#landing header{padding:1.5rem 0}#landing>.grid{align-content:flex-start;text-align:center;gap:1rem}#sign_up{grid-template-rows:auto 1fr;align-items:center}#sign_up section{margin-top:-6rem;justify-self:center;width:min(24rem,100%)}#sign_up header{padding:1.5rem 0}#sign_up .h2{margin-bottom:.5rem}#sign_up h5{font-weight:500;color:rgba(var(--text-color), 0.8)}#sign_up .warning{margin-top:2rem}.multi-state-button{display:grid;text-align:center;align-items:center}.multi-state-button>*{grid-area:1/1/2/2}.multi-state-button button{z-index:1}#home{height:100%;display:flex;flex-direction:column;align-items:flex-start;align-content:flex-start}#login_form{width:min(24rem,100%);margin:0 auto}#login_form__priv_key{margin-top:1rem}#main_header{display:flex;flex-wrap:wrap;gap:1rem;padding:1rem 1.5rem;width:100%;align-items:center}#user_popup_button{background-color:rgba(var(--text-color), 0.06);border-radius:2rem;font-size:.8rem}#main_navbar{width:100%}.main_navbar__item{display:flex;flex-direction:column;align-items:center;flex:1;padding:.5rem 0}.main_navbar__item .item__title,.main_navbar__item .icon{transition:transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275),opacity .3s}.main_navbar__item .item__title{color:rgba(var(--text-color), 0.8);font-size:.8rem;font-weight:500}.main_navbar__item .icon{height:1.2rem;margin-bottom:.3rem}.main_navbar__item--active .item__title{color:var(--accent-color)}.main_navbar__item--active .icon{fill:var(--accent-color)}#pages_container{display:flex;flex:1;width:100%;height:100%;justify-content:center;overflow-y:auto}#pages_container>*{padding:0 1.5rem;min-width:min(26rem,100%)}.listed-asset{position:relative;gap:.5rem;padding:1rem 0;border-radius:.5rem;font-weight:400;transition:background-color .3s;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:inherit;grid-template-columns:auto 1fr auto auto;grid-template-areas:"icon name rate right-arrow" "icon name countdown right-arrow"}.listed-asset__icon{grid-area:icon;padding:.5rem;border-radius:1rem;display:flex;background-color:var(--accent-color)}.listed-asset__icon .icon{height:1.2rem;width:1.2rem;fill:rgba(var(--background-color), 1)}.listed-asset__name{grid-area:name;margin-left:.3rem}.listed-asset__rate{grid-area:rate}.listed-asset__countdown{display:flex;align-items:center;grid-area:countdown;justify-self:flex-end;font-size:.8rem;color:var(--accent-color)}.listed-asset__countdown .icon{margin-left:.3rem;overflow:visible;stroke-width:3;fill:none}.listed-asset__countdown .icon .path-a{stroke:var(--accent-color);stroke-dashoffset:var(--path-length, 0);stroke-dasharray:63}.listed-asset__countdown .icon .path-b{stroke:rgba(var(--text-color), 0.2)}.listed-asset__right-arrow{grid-area:right-arrow;background-color:rgba(var(--text-color), 0.1);border-radius:1rem;padding:.1rem;margin-left:.3rem}.quantity-selector .button{flex:1;padding:.5rem .6rem;margin-left:.5rem}#quantity_selector_tip::first-letter{text-transform:uppercase}#quantity_type,#portfolio_quantity_type{font-size:.8rem;padding-right:.5rem;border-right:thin solid rgba(var(--text-color), 0.3);margin-right:auto;color:rgba(var(--text-color), 0.8);line-height:1.5;font-weight:500;min-width:8ch}#exchange_wrapper{display:flex;flex-direction:column;height:100%}#asset_page{position:relative;display:flex;flex-direction:column;height:100%;align-items:flex-start}#asset_page_wrapper{display:flex;flex-direction:column;height:100%;width:100%}#trade_form{height:100%}#trade_form::part(form){display:flex;flex-direction:column;gap:0}#trade_form>*{margin-bottom:1rem}#trade_form>:last-child{margin-top:auto}#my_orders,#market{width:min(46rem,100%);height:-webkit-max-content;height:-moz-max-content;height:max-content}#my_orders{grid-template-rows:auto 1fr}.orders_section__header{min-height:2.8rem;position:-webkit-sticky;position:sticky;top:0;background-color:rgba(var(--background-color), 1);z-index:2;transition:background-color .3s}.list__item{padding:.5rem 0;display:grid}.order-card{position:relative;outline:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;gap:.5rem;grid-template-columns:-webkit-min-content 1fr auto;grid-template-columns:min-content 1fr auto;border-radius:.5rem;grid-template-areas:"checkbox quantity quantity time" "checkbox price amount cancel"}.order-card>.grid:nth-of-type(2){grid-area:price}.order-card>.grid:nth-of-type(3){grid-area:amount}.order-card__type{font-size:.9rem;font-weight:500;margin-bottom:.3rem}.order-card[data-type=buy] .order-card__type{color:var(--green)}.order-card[data-type=sell] .order-card__type{color:var(--danger-color)}.order-card--selected{background-color:rgba(var(--text-color), 0.08)}.order-card--selected .cancel-order{visibility:hidden;pointer-events:none}.order-card sm-checkbox{grid-area:checkbox;cursor:pointer;margin-right:.5rem}.order-card__quantity,.order-card__price{font-size:.9rem;color:rgba(var(--text-color), 0.9)}.order-card__time{grid-area:time;font-size:.8rem;color:rgba(var(--text-color), 0.8)}.order-card .cancel-order{grid-area:cancel;color:var(--danger-color)}.order-card .cancel-order .icon{fill:var(--danger-color)}.cancel-order{align-items:center;padding:.4rem .6rem}.cancel-order span{margin-left:.3rem}.completed-trade,.transaction-card,.live-order{gap:0 1rem}.completed-trade__type,.transaction-card__type,.live-order__type{font-size:.9rem;font-weight:500;margin-bottom:.3rem}.completed-trade[data-type=Bought] .completed-trade__type,.completed-trade--buy .completed-trade__type,.completed-trade[data-type=Bought] .transaction-card__type,.completed-trade--buy .transaction-card__type,.completed-trade[data-type=Bought] .live-order__type,.completed-trade--buy .live-order__type,.transaction-card[data-type=Bought] .completed-trade__type,.transaction-card--buy .completed-trade__type,.transaction-card[data-type=Bought] .transaction-card__type,.transaction-card--buy .transaction-card__type,.transaction-card[data-type=Bought] .live-order__type,.transaction-card--buy .live-order__type,.live-order[data-type=Bought] .completed-trade__type,.live-order--buy .completed-trade__type,.live-order[data-type=Bought] .transaction-card__type,.live-order--buy .transaction-card__type,.live-order[data-type=Bought] .live-order__type,.live-order--buy .live-order__type{color:var(--green)}.completed-trade[data-type=Sold] .completed-trade__type,.completed-trade--sell .completed-trade__type,.completed-trade[data-type=Sold] .transaction-card__type,.completed-trade--sell .transaction-card__type,.completed-trade[data-type=Sold] .live-order__type,.completed-trade--sell .live-order__type,.transaction-card[data-type=Sold] .completed-trade__type,.transaction-card--sell .completed-trade__type,.transaction-card[data-type=Sold] .transaction-card__type,.transaction-card--sell .transaction-card__type,.transaction-card[data-type=Sold] .live-order__type,.transaction-card--sell .live-order__type,.live-order[data-type=Sold] .completed-trade__type,.live-order--sell .completed-trade__type,.live-order[data-type=Sold] .transaction-card__type,.live-order--sell .transaction-card__type,.live-order[data-type=Sold] .live-order__type,.live-order--sell .live-order__type{color:var(--danger-color)}.completed-trade__total,.transaction-card__total,.live-order__total{font-weight:700;font-size:.9rem;color:rgba(var(--text-color), 0.8)}.completed-trade__quantity,.completed-trade__price,.transaction-card__quantity,.transaction-card__price,.live-order__quantity,.live-order__price{font-size:.9rem;color:rgba(var(--text-color), 0.9)}.completed-trade__time,.transaction-card__time,.live-order__time{font-size:.8rem;color:rgba(var(--text-color), 0.8)}.completed-trade .more-info,.transaction-card .more-info,.live-order .more-info{flex-shrink:0;padding:.3rem}.transaction-card{content-visibility:auto;contain-intrinsic-size:2.5rem;grid-template-columns:repeat(3, 1fr) 2rem}.completed-trade{display:grid;gap:.5rem;grid-template-columns:1fr 1fr;background-color:rgba(var(--text-color), 0.03);border-radius:.5rem;padding:1rem;margin-bottom:.5rem}#market_asset_rates{display:grid;gap:.5rem}#market_asset_rates .listed-asset{padding:1rem;background-color:rgba(var(--text-color), 0.03)}#market_orders_wrapper .list__header{font-size:.8rem;font-weight:500}#market_orders_wrapper .list__header div{padding:.5rem 0}#market_orders_wrapper .list__header{margin-bottom:.5rem;grid-template-columns:repeat(3, 1fr) 2rem}.live-order{display:grid;gap:1rem;padding:1rem;border-radius:.5rem;background-color:rgba(var(--text-color), 0.03)}.live-order:not(:last-of-type){margin-bottom:.5rem}.live-order[data-type=buy]{background-color:rgba(0,250,154,.062745098)}.live-order[data-type=sell]{background-color:rgba(226,19,81,.062745098)}#portfolio{display:grid;gap:1.5rem;grid-template-columns:minmax(0, 1fr);align-content:flex-start;width:min(32rem,100%)}.label{font-size:.8rem;color:rgba(var(--text-color), 0.8);margin-bottom:.2rem}#my_assets{gap:.5rem;margin-top:.5rem;padding-bottom:1.5rem;border:none}.balance-card{display:grid;align-items:center;gap:0 .5rem;padding:1rem;padding-left:.6rem;border-radius:.3rem;color:inherit;background-color:rgba(var(--text-color), 0.03)}.balance-card.is-locked{grid-template-columns:auto 1fr auto}.balance-card.is-locked .balance-card__icon{grid-row:span 2}.balance-card.is-locked .balance-card__right-arrow{grid-area:1/3/3/4}.balance-card.is-locked .balance-card__amount-wrapper{grid-area:2/2/3/3}.balance-card:not(.is-locked){grid-template-columns:auto 1fr auto auto}.balance-card:not(.is-locked) .balance-card__right-arrow{grid-area:1/4/2/5}.balance-card__icon{display:flex;align-content:center;justify-content:center;margin:0 .5rem;border-radius:.8rem;align-self:flex-start;background-color:var(--accent-color--light)}.balance-card__icon .icon{height:1.3rem;width:1.3rem;fill:var(--accent-color)}.balance-card__token{font-size:.9rem;font-weight:500}.balance-card__amount-wrapper{margin-top:.5rem;grid-column:3/-1;gap:.3rem 1rem;grid-template-columns:1fr 1fr}.balance-card__amount-wrapper>:nth-child(even){text-align:right}.balance-card__right-arrow{background-color:rgba(var(--text-color), 0.1);border-radius:1rem;padding:.1rem;fill:var(--accent-color)}#history{padding-top:0 !important;width:min(36rem,100%)}#history .sticky{margin-left:-0.7rem;padding:1rem 0;background-color:rgba(var(--background-color), 1)}#exchange_history{margin-top:.5rem}.history-entry{display:grid;grid-template-columns:auto 1fr auto;gap:.5rem 1rem;align-items:center;margin-bottom:2rem}.history-entry[data-status=SUCCESS] .history-entry__status .icon{fill:var(--green)}.history-entry[data-status=PENDING] .history-entry__status .icon,.history-entry[data-status=WAITING_CONFIRMATION] .history-entry__status .icon{fill:var(--yellow)}.history-entry__status{display:flex;align-items:center;justify-content:center;grid-row:1/3;width:2.5rem;height:2.5rem;background-color:rgba(var(--text-color), 0.03);border-radius:2rem}.history-entry__token-action{font-weight:500}.history-entry__amount{font-weight:500;text-align:right}.history-entry[data-type=deposit] .history-entry__amount:not(:empty){color:var(--green)}.history-entry[data-type=deposit] .history-entry__amount:not(:empty)::before{content:"+ "}.history-entry[data-type=withdraw] .history-entry__amount:not(:empty)::before{content:"- "}.history-entry__time{font-size:.8rem;color:rgba(var(--text-color), 0.8)}.history-entry__txid{font-weight:500;font-size:.9rem;text-align:right}#portfolio_asset_page .sticky{margin-top:-1.5rem;margin-left:-0.7rem;padding:1rem 0;background-color:rgba(var(--background-color), 1)}#portfolio_asset__history{margin-top:1rem}#portfolio_cards_wrapper{display:grid;gap:.5rem;grid-template-columns:repeat(auto-fit, minmax(12rem, 1fr))}.personal-asset-balance{align-content:flex-start;padding:1rem;border-radius:.5rem;color:rgba(0,0,0,.8);width:100%}.personal-asset-balance:not(:last-of-type){margin-right:.5rem}.personal-asset-balance:nth-of-type(1){background:url("bg-art2.svg") no-repeat bottom right,#c2ffd7;background-size:contain}.personal-asset-balance:nth-of-type(1) .icon{background-color:rgba(102,255,156,.5)}.personal-asset-balance:nth-of-type(1) .button{border:solid thin rgba(102,255,156,.5)}.personal-asset-balance:nth-of-type(2){background:url("back.svg") no-repeat top right,#fcffa8;background-size:contain}.personal-asset-balance:nth-of-type(2) .icon{background-color:rgba(255,234,0,.5)}.personal-asset-balance>.flex{margin-bottom:.3rem}.personal-asset-balance>.flex .icon{height:2rem;width:2rem;padding:.4rem;border-radius:.3rem;fill:rgba(0,0,0,.8);margin-right:.5rem}.personal-asset-balance .button{display:flex;align-items:center;margin-top:.5rem;padding-right:.8rem;justify-self:flex-start;border-radius:1rem;background-color:rgba(var(--foreground-color), 1);color:rgba(var(--text-color), 1);transition:box-shadow .3s}.personal-asset-balance .button .icon{height:1rem;background-color:rgba(0,0,0,0);margin-right:.3rem}.personal-asset-balance .button:hover{box-shadow:0 .3rem .5rem rgba(0,0,0,.16)}#personal_rupee_balance span:first-of-type,#personal_flo_balance span:first-of-type{font-size:1.5rem}#personal_rupee_balance span:last-of-type,#personal_flo_balance span:last-of-type{font-size:.9rem}#portfolio_result{justify-content:center;text-align:center}#portfolio_result__icon{display:flex;padding:1rem;border-radius:50%;background-color:rgba(var(--text-color), 0.06);justify-self:center;-webkit-animation:pop-up .3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);animation:pop-up .3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275)}#portfolio_result__icon .icon{height:2rem;width:2rem}.icon--success{fill:var(--green)}.icon--failure,.icon--error{fill:var(--danger-color)}@-webkit-keyframes pop-up{from{transform:translateY(3rem) scale(0.5);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}@keyframes pop-up{from{transform:translateY(3rem) scale(0.5);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#portfolio_result__cta{padding:1.5rem 1rem;border-radius:.5rem;background-color:rgba(var(--text-color), 0.06)}.stateful-button-wrapper{display:flex;position:relative;justify-content:center;align-items:center}.stateful-button-wrapper sm-button,.stateful-button-wrapper slide-button{width:100%;z-index:1;transition:-webkit-clip-path .3s;transition:clip-path .3s;transition:clip-path .3s, -webkit-clip-path .3s;-webkit-clip-path:circle(100%);clip-path:circle(100%)}.stateful-button-wrapper sm-button.clip,.stateful-button-wrapper slide-button.clip{pointer-events:none;-webkit-clip-path:circle(0);clip-path:circle(0)}.stateful-button-wrapper sm-spinner{position:absolute}.stateful-result{overflow:hidden;position:absolute;display:flex;justify-content:center;align-items:center;height:100%;width:100%;left:0}.stateful-result>*{position:absolute}.stateful-result--success .result__background{background-color:var(--green)}.stateful-result--failure .result__background{background-color:var(--danger-color)}.stateful-result .icon-wrapper{-webkit-animation:pop .4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);animation:pop .4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275)}.stateful-result .icon{height:1.5rem;width:1.5rem;fill:rgba(var(--background-color), 1)}.stateful-result span{font-weight:500;color:rgba(var(--background-color), 1)}.stateful-result .result__background{-webkit-animation:ripple-reveal 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);animation:ripple-reveal 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275)}.result__background{border-radius:.3rem;height:100%;width:100%;-webkit-clip-path:circle(10%);clip-path:circle(10%)}@-webkit-keyframes pop{from{opacity:0;transform:translateY(2rem)}to{opacity:1;transform:translateY(0)}}@keyframes pop{from{opacity:0;transform:translateY(2rem)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes ripple-reveal{to{-webkit-clip-path:circle(100%);clip-path:circle(100%)}}@keyframes ripple-reveal{to{-webkit-clip-path:circle(100%);clip-path:circle(100%)}}#help{width:min(60ch,100%);margin-bottom:3rem;align-content:flex-start}#help ul{list-style:initial;display:grid;gap:1rem}#help ul li{margin-left:1rem;padding-left:.5rem;font-size:.9rem}@media screen and (max-width: 40rem)and (any-hover: none){.cancel-order span{display:none !important}}@media screen and (max-width: 40rem){sm-button{--padding: 0.9rem 1.6rem}.empty-state{align-self:center}#user_popup_button{width:100%}.main_navbar__item--active .item__title{transform:translateY(100%);opacity:0}.main_navbar__item--active .icon{transform:translateY(50%) scale(1.2)}#asset_list_wrapper{padding:0 1.5rem}.listed-asset{border-radius:0;border-bottom:solid thin rgba(var(--text-color), 0.1)}#exchange{margin:0;padding:0}#login_form{padding:0 1.5rem}#asset_page__header{display:flex;padding:1rem 1.5rem .5rem .8rem}#chart_header{padding:0 1.5rem .5rem 1.5rem}#trade_form{padding:0 1.5rem}#price_chart_container{flex:1}#asset_page__footer button{display:flex;flex-direction:column;align-items:center;flex:1;padding:.5rem 0;color:rgba(var(--text-color), 0.8);font-size:.8rem;font-weight:500}#asset_page__footer button .icon{height:1.2rem;margin-bottom:.3rem;margin-right:.3rem}#asset_page__footer button.active{color:var(--accent-color)}#asset_page__footer button.active .icon{fill:var(--accent-color)}.hide-on-mobile{display:none !important}}@media screen and (min-width: 40rem){sm-popup{--width: 24rem}.popup__header{grid-column:1/-1;padding:1rem 1.5rem 0 1.5rem}#confirmation_popup{--width: 24rem}.page-layout{grid-template-columns:1fr 90vw 1fr}.mobile-page{align-self:flex-start;padding:2rem;border-radius:.5rem;background-color:rgba(var(--foreground-color), 1)}.hide-on-desktop{display:none !important}#home{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"header header" "nav pages"}#main_header{grid-area:header}#user_popup_button{justify-self:flex-end}#main_navbar{grid-area:nav;flex-direction:column;height:100%;padding-left:.5rem}.main_navbar__item{padding:1.5rem 2rem 1.5rem 1rem;width:100%;flex:0;flex-direction:row;border-radius:.5rem;transition:background-color .3s}.main_navbar__item .icon{margin-bottom:0;margin-right:.5rem}.main_navbar__item .item__title{font-size:.9rem}.main_navbar__item--active{background-color:rgba(var(--text-color), 0.06)}#pages_container{grid-area:pages}#pages_container>*{margin:0 1.5rem;padding:2rem}.is-signed-in #exchange{display:flex;width:100%}.is-signed-in #exchange_wrapper{display:grid;width:100%;height:100%;gap:1.5rem;grid-template-columns:17rem minmax(0, 1fr);align-items:flex-start}#price_history_chart{height:20rem}#asset_list_wrapper{grid-row:1/3}.listed-asset{padding:1rem}.listed-asset--active{opacity:1;background-color:rgba(var(--text-color), 0.06)}.listed-asset--active::before{content:"";position:absolute;width:.25rem;border-radius:0 .2rem .2rem 0;height:2rem;background-color:var(--accent-color)}.order-card{grid-template-columns:auto 1fr 1fr 1fr auto;grid-template-areas:"checkbox quantity price amount time cancel"}.orders_section__header{background-color:rgba(var(--foreground-color), 1)}#history .sticky,#portfolio_asset_page .sticky{background-color:rgba(var(--foreground-color), 1)}}@media screen and (max-width: 80rem)and (min-width: 40rem){.main_navbar__item{padding:1.5rem 1rem}.main_navbar__item .icon{margin-right:0}.main_navbar__item .item__title{display:none !important}}@media screen and (min-width: 52rem){body:not(.is-signed-in) #market{gap:2rem;width:100%;grid-template-columns:18rem 1fr}.completed-trade{grid-template-columns:1fr 1fr 1fr 8rem;grid-template-areas:"quantity price amount info"}.completed-trade .quantity-block{grid-area:quantity}.completed-trade .price-block{grid-area:price}.completed-trade .amount-block{grid-area:amount}.completed-trade .info-block{grid-area:info}}@media screen and (min-width: 64rem){#home{grid-template-columns:auto 1fr}#asset_page_wrapper{display:grid;gap:1.5rem;grid-template-columns:minmax(0, 1fr) 20rem}}@media screen and (min-width: 72rem){.page-layout{grid-template-columns:1fr 80vw 1fr}}@media screen and (min-width: 120rem){.page-layout{grid-template-columns:1fr 70vw 1fr}}@media(any-hover: hover){::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background:rgba(var(--text-color), 0.3);border-radius:1rem}::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-color), 0.5)}.order-card .cancel-order{justify-self:flex-end;overflow:hidden}.order-card .cancel-order .icon,.order-card .cancel-order span{transition:opacity .3s,transform .3s}.order-card .cancel-order .icon{transform:translateX(100%)}.order-card .cancel-order span{transform:translateX(100%);opacity:0}.order-card:hover .cancel-order .icon,.order-card:focus-within .cancel-order .icon{opacity:1}.order-card .cancel-order:hover .icon,.order-card .cancel-order:hover span{opacity:1;transform:translateX(0)}} \ No newline at end of file diff --git a/docs/css/main.scss b/docs/css/main.scss index dbd70d2..3145908 100644 --- a/docs/css/main.scss +++ b/docs/css/main.scss @@ -1346,9 +1346,6 @@ sm-checkbox { .empty-state { align-self: center; } - #main_header { - // padding: 1.5rem; - } #user_popup_button { width: 100%; } diff --git a/docs/index.html b/docs/index.html index a5e729c..3720cdc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1272,8 +1272,7 @@ try { let [day, month, date, year] = new Date(time).toString().split(' '), minutes = new Date(time).getMinutes(), - hours = new Date(time).getHours(), - currentTime = new Date().toString().split(' ') + hours = new Date(time).getHours(); minutes = minutes < 10 ? `0${minutes}` : minutes let finalHours = ``; @@ -1487,24 +1486,17 @@ `: ''} `) getRef('portfolio_asset__history').innerHTML = ` -
- -
` - // load asset specific blockchain txs - floBlockchainAPI.readAllTxs(accountDetails.floID).then(async transactions => { - floGlobals.allTxs = {} - transactions.forEach(({ txid, time }) => { floGlobals.allTxs[txid] = { time } }) - floExchangeAPI.getUserTransacts(accountDetails.floID, await proxy.secret).then(exchangeTxs => { - exchangeTxs = exchangeTxs.filter(tx => tx.token === params.asset).sort((a, b) => floGlobals.allTxs[b.txid].time - floGlobals.allTxs[a.txid].time) - if (portfolioAssetHistoryLazyLoader) { - portfolioAssetHistoryLazyLoader.update(exchangeTxs) - } else { - portfolioAssetHistoryLazyLoader = new LazyLoader('#portfolio_asset__history', exchangeTxs, render.historyEntry) - } - portfolioAssetHistoryLazyLoader.init() - }).catch(err => { - console.error(err) - }) +
+ +
` + floExchangeAPI.getUserTransacts(accountDetails.floID, await proxy.secret).then(exchangeTxs => { + exchangeTxs = exchangeTxs.filter(tx => tx.asset === params.asset).sort((a, b) => new Date(b.locktime).getTime() - new Date(a.locktime).getTime()) + if (portfolioAssetHistoryLazyLoader) { + portfolioAssetHistoryLazyLoader.update(exchangeTxs) + } else { + portfolioAssetHistoryLazyLoader = new LazyLoader('#portfolio_asset__history', exchangeTxs, render.historyEntry) + } + portfolioAssetHistoryLazyLoader.init() }).catch(err => { console.error(err) }) @@ -1523,21 +1515,15 @@ ` - // load all blockchain txs - floBlockchainAPI.readAllTxs(accountDetails.floID).then(async transactions => { - floGlobals.allTxs = {} - transactions.forEach(({ txid, time }) => { floGlobals.allTxs[txid] = { time } }) - floExchangeAPI.getUserTransacts(accountDetails.floID, await proxy.secret).then(exchangeTxs => { - exchangeTxs = exchangeTxs.sort((a, b) => floGlobals.allTxs[b.txid].time - floGlobals.allTxs[a.txid].time) - if (historyLazyLoader) { - historyLazyLoader.update(exchangeTxs) - } else { - historyLazyLoader = new LazyLoader('#exchange_history', exchangeTxs, render.historyEntry) - } - historyLazyLoader.init() - }).catch(err => { - console.error(err) - }) + floExchangeAPI.getUserTransacts(accountDetails.floID, await proxy.secret).then(exchangeTxs => { + console.log(exchangeTxs) + exchangeTxs = exchangeTxs.sort((a, b) => new Date(b.locktime).getTime() - new Date(a.locktime).getTime()) + if (historyLazyLoader) { + historyLazyLoader.update(exchangeTxs) + } else { + historyLazyLoader = new LazyLoader('#exchange_history', exchangeTxs, render.historyEntry) + } + historyLazyLoader.init() }).catch(err => { console.error(err) }) @@ -2077,8 +2063,17 @@ } }, historyEntry(details) { - const { amount, status, token, txid, type } = details + const { amount, r_status, asset, txid, mode, locktime } = details + const type = mode === 1 ? 'Deposit' : 'Withdraw' const entry = getRef('history_entry').content.cloneNode(true).firstElementChild + let status + if (r_status === 0) { + status = 'PENDING' + } else if (r_status === 100) { + status = 'SUCCESS' + } else if (r_status === -1) { + status = 'FAILED' + } entry.dataset.status = status entry.dataset.type = type if (status === 'SUCCESS') { @@ -2086,9 +2081,9 @@ } else { entry.querySelector('.history-entry__status').innerHTML = `` } - entry.querySelector('.history-entry__token-action').textContent = `${type} ${token}` + entry.querySelector('.history-entry__token-action').textContent = `${type} ${asset}` entry.querySelector('.history-entry__amount').textContent = amount - entry.querySelector('.history-entry__time').textContent = floGlobals.allTxs.hasOwnProperty(txid) ? getFormattedTime(floGlobals.allTxs[txid].time * 1000) : '' + entry.querySelector('.history-entry__time').textContent = getFormattedTime(locktime) entry.querySelector('.history-entry__txid').href = `https://flosight.duckdns.org/tx/${txid}` return entry; } @@ -2790,58 +2785,61 @@ } function updateRate(init = false) { - floExchangeAPI.getRates().then(({ rates, countDown }) => { - console.debug(rates); - floGlobals.exchangeRates = rates - if (init) { - Object.entries(rates).sort((a, b) => a[1] < b[1] ? 1 : -1).forEach(([asset, rate]) => { - if (!allTokens.hasOwnProperty(asset)) { - allTokens[asset] = { - total: 0, - locked: 0, - net: 0 + return new Promise((resolve, reject) => { + floExchangeAPI.getRates().then(({ rates, countDown }) => { + console.debug(rates); + floGlobals.exchangeRates = rates + if (init) { + Object.entries(rates).sort((a, b) => a[1] < b[1] ? 1 : -1).forEach(([asset, rate]) => { + if (!allTokens.hasOwnProperty(asset)) { + allTokens[asset] = { + total: 0, + locked: 0, + net: 0 + } + } + // dynamically render listed assets if not already rendered + getRef('listed_assets').append(render.listedAsset(asset, formatAmount(parseFloat(rate)), countDown[asset])); + getRef('market_asset_rates').append(createElement('li', { + className: 'listed-asset grid align-center', + innerHTML: ` +
${getIcon(asset)}
+

${asset}

+ ${formatAmount(rate)} + ` + })) + }) + resolve(); + } else { + // update rates in UI + for (const asset in rates) { + const listedAsset = getRef(`listed_assets`).querySelector(`[data-listed-asset="${asset}"]`) + if (listedAsset) { + listedAsset.querySelector('.listed-asset__rate').textContent = formatAmount(parseFloat(rates[asset])) + if (floGlobals.countDowns.intervals.hasOwnProperty(asset)) { + clearInterval(floGlobals.countDowns.intervals[asset]); + } + floGlobals.countDowns.intervals[asset] = setInterval(() => { + const [timeLeft, minutes] = getTimeLeft(countDown[asset]) + listedAsset.querySelector('.listed-asset__countdown').firstChild.textContent = timeLeft; + const pathLength = 63 - Math.ceil((minutes / 60) * 63) + listedAsset.querySelector('.listed-asset__countdown').style.setProperty('--path-length', pathLength) + }, 1000) + if (floGlobals.countDowns.timeouts.hasOwnProperty(asset)) { + clearTimeout(floGlobals.countDowns.timeouts[asset]); + delete floGlobals.countDowns.timeouts[asset] + } + floGlobals.countDowns.timeouts[asset] = setTimeout(() => { + updateRate() + }, countDown[asset] - Date.now()); } } - // dynamically render listed assets if not already rendered - getRef('listed_assets').append(render.listedAsset(asset, formatAmount(parseFloat(rate)), countDown[asset])); - getRef('market_asset_rates').append(createElement('li', { - className: 'listed-asset grid align-center', - innerHTML: ` -
${getIcon(asset)}
-

${asset}

- ${formatAmount(rate)} - ` - })) - }) - - } else { - // update rates in UI - for (const asset in rates) { - const listedAsset = getRef(`listed_assets`).querySelector(`[data-listed-asset="${asset}"]`) - if (listedAsset) { - listedAsset.querySelector('.listed-asset__rate').textContent = formatAmount(parseFloat(rates[asset])) - if (floGlobals.countDowns.intervals.hasOwnProperty(asset)) { - clearInterval(floGlobals.countDowns.intervals[asset]); - } - floGlobals.countDowns.intervals[asset] = setInterval(() => { - const [timeLeft, minutes] = getTimeLeft(countDown[asset]) - listedAsset.querySelector('.listed-asset__countdown').firstChild.textContent = timeLeft; - const pathLength = 63 - Math.ceil((minutes / 60) * 63) - listedAsset.querySelector('.listed-asset__countdown').style.setProperty('--path-length', pathLength) - }, 1000) - if (floGlobals.countDowns.timeouts.hasOwnProperty(asset)) { - clearTimeout(floGlobals.countDowns.timeouts[asset]); - delete floGlobals.countDowns.timeouts[asset] - } - floGlobals.countDowns.timeouts[asset] = setTimeout(() => { - updateRate() - }, countDown[asset] - Date.now()); - } + resolve(); } - } - render.chart(pagesData.params.asset) - showSuggestedPrice() - }).catch(error => console.error(error.message)) + render.chart(pagesData.params.asset) + showSuggestedPrice() + }).catch(error => console.error(error.message)) + }).catch(error => console.error(error)) } async function refresh(init = false, refreshButton) { @@ -2867,12 +2865,13 @@ } else console.info("refresh"); render.marketOrders(); - updateRate(init) - if (proxy.userID) { - await account(); - if (refreshButton) - buttonLoader('portfolio_balance_refresh_button', false); - } + updateRate(init).then(async () => { + if (proxy.userID) { + await account(); + if (refreshButton) + buttonLoader('portfolio_balance_refresh_button', false); + } + }) } let accountDetails = {}