diff --git a/client/webserver/live_test.go b/client/webserver/live_test.go index eae66d27ab..ff02a65802 100644 --- a/client/webserver/live_test.go +++ b/client/webserver/live_test.go @@ -29,6 +29,7 @@ import ( "decred.org/dcrdex/client/comms" "decred.org/dcrdex/client/core" "decred.org/dcrdex/client/db" + "decred.org/dcrdex/client/orderbook" "decred.org/dcrdex/dex" "decred.org/dcrdex/dex/calc" "decred.org/dcrdex/dex/candles" @@ -48,7 +49,7 @@ const ( var ( tCtx context.Context - maxDelay = time.Second * 2 + maxDelay = time.Second * 4 epochDuration = time.Second * 30 // milliseconds feedPeriod = time.Second * 10 creationPendingAsset uint32 = 0xFFFFFFFF @@ -183,7 +184,7 @@ func mkMrkt(base, quote string) *core.Market { Rate: rate, // BookVolume: , Change24: change24, - // Vol24: , + Vol24: lotSize * uint64(50000*rand.Float32()), }, } } @@ -1141,12 +1142,24 @@ func (c *TCore) book(dexAddr, mktID string) *core.OrderBook { buys = append(buys, ord) c.buys[ord.Token] = ord } + recentMatches := make([]*orderbook.MatchSummary, 0, 25) + tNow := time.Now() + for i := 0; i < 25; i++ { + ord := randomOrder(rand.Float32() > 0.5, maxQty, midGap, gapWidthFactor*midGap, false) + recentMatches = append(recentMatches, &orderbook.MatchSummary{ + Rate: ord.MsgRate, + Qty: ord.QtyAtomic, + Stamp: uint64(tNow.Add(-time.Duration(i) * time.Minute).UnixMilli()), + Sell: ord.Sell, + }) + } c.orderMtx.Unlock() sort.Slice(buys, func(i, j int) bool { return buys[i].Rate > buys[j].Rate }) sort.Slice(sells, func(i, j int) bool { return sells[i].Rate < sells[j].Rate }) return &core.OrderBook{ - Buys: buys, - Sells: sells, + Buys: buys, + Sells: sells, + RecentMatches: recentMatches, } } diff --git a/client/webserver/locales/en-us.go b/client/webserver/locales/en-us.go index 80d2094cb8..8e676d0f54 100644 --- a/client/webserver/locales/en-us.go +++ b/client/webserver/locales/en-us.go @@ -81,10 +81,10 @@ var EnUS = map[string]string{ "outdated_tooltip": "Balance may be outdated. Connect to the wallet to refresh.", "available": "available", "connect_refresh_tooltip": "Click to connect and refresh", - "add_a_base_wallet": `Add a

wallet`, - "add_a_quote_wallet": `Add a

wallet`, + "add_a_wallet": `Add a wallet`, "locked": "locked", "immature": "immature", + "fee balance": "fee balance", "Sell Orders": "Sell Orders", "Your Orders": "Your Orders", "Recent Matches": "Recent Matches", diff --git a/client/webserver/locales/pl-pl.go b/client/webserver/locales/pl-pl.go index aad168313c..10d4847ecd 100644 --- a/client/webserver/locales/pl-pl.go +++ b/client/webserver/locales/pl-pl.go @@ -80,8 +80,7 @@ var PlPL = map[string]string{ "outdated_tooltip": "Saldo może być nieaktualne. Połącz się z portfelem, aby je odświeżyć.", "available": "dostępne", "connect_refresh_tooltip": "Kliknij, aby połączyć i odświeżyć", - "add_a_base_wallet": `Dodaj portfel

`, - "add_a_quote_wallet": `Dodaj portfel

`, + "add_a_wallet": `Dodaj portfel `, "locked": "zablokowane", "immature": "niedojrzałe", "Sell Orders": "Zlecenia sprzedaży", diff --git a/client/webserver/locales/pt-br.go b/client/webserver/locales/pt-br.go index 8ac717169a..685a840ceb 100644 --- a/client/webserver/locales/pt-br.go +++ b/client/webserver/locales/pt-br.go @@ -80,8 +80,7 @@ var PtBr = map[string]string{ "outdated_tooltip": "Balanço pode está desatualizado. Conecte-se a carteira para atualizar.", "available": "disponível", "connect_refresh_tooltip": "Clique para conectar e atualizar", - "add_a_base_wallet": `Adicionar uma carteira

`, - "add_a_quote_wallet": `Adicionar uma

carteira`, + "add_a_wallet": `Adicionar uma carteira `, "locked": "trancado", "immature": "imaturo", "Sell Orders": "Pedido de venda", diff --git a/client/webserver/locales/zh-cn.go b/client/webserver/locales/zh-cn.go index 864c7d6c84..11e4cccb70 100644 --- a/client/webserver/locales/zh-cn.go +++ b/client/webserver/locales/zh-cn.go @@ -80,8 +80,7 @@ var ZhCN = map[string]string{ "outdated_tooltip": "账户可能已过期。请连接到钱包进行更新。", "available": "可用", "connect_refresh_tooltip": "点击连接并刷新", - "add_a_base_wallet": `添加一个

钱包`, - "add_a_quote_wallet": `添加一个

钱包`, + "add_a_wallet": `添加一个 钱包`, "locked": "锁定", "immature": "不成熟", "Sell Orders": "卖单", diff --git a/client/webserver/site/src/css/application.scss b/client/webserver/site/src/css/application.scss index f7d7c803ca..a1e77f4f8c 100644 --- a/client/webserver/site/src/css/application.scss +++ b/client/webserver/site/src/css/application.scss @@ -2,17 +2,14 @@ $grid-columns: 24; $font-color-dark: #dfe2e1; $font-color-light: #333; -$buycolor_dark: #05a35a; -$sellcolor_dark: #ae3333; +$buycolor_dark: #29bb77; +$sellcolor_dark: #e95e5e; $buycolor_light: #207a46; $sellcolor_light: #99302b; -$light_bg_1: #eaeaea; -$light_bg_2: #d5d5d5; -$dark_bg_1: #111; -$dark_bg_2: #1e1e1e; -$dark_bg_3: #292929; -$dark_body_bg: #13202b; -$light_body_bg: #e0e0e0; +$light_body_bg: white; +$dark_body_bg: #091a28; +$light_border_color: #ddd; +$dark_border_color: #383f4b; $sans: "source-sans", sans-serif; $demi-sans: "demi-sans", sans-serif; $mono: "mono", monospace; diff --git a/client/webserver/site/src/css/forms.scss b/client/webserver/site/src/css/forms.scss index f65bf71b57..7c59355762 100644 --- a/client/webserver/site/src/css/forms.scss +++ b/client/webserver/site/src/css/forms.scss @@ -1,10 +1,6 @@ #regAssetForm { position: relative; - .grey { - color: #999; - } - div.reg-asset-allmkts { min-width: 210px; max-width: 320px; @@ -117,10 +113,6 @@ #confirmRegForm { width: 425px; - .grey { - color: grey; - } - button.submit { width: auto; padding: 12px 30px; @@ -155,10 +147,6 @@ #newWalletForm { width: 425px; - .grey { - color: #999; - } - .wallet-tabs { width: 100%; display: flex; @@ -255,7 +243,7 @@ button.form-button { bottom: 0; right: 0; padding: 25px 0; - background-color: #e0e0e0f3; + background-color: $light_body_bg; z-index: 100; & > form { @@ -274,10 +262,6 @@ button.form-button { #walletWait { max-width: 425px; - .grey { - color: #999; - } - .icons { width: 25px; } @@ -345,3 +329,10 @@ button.form-button { #authorizeSeedDisplay { width: 425px; } + +#deposit { + #copyAlert { + margin-left: 12px; + position: absolute; + } +} diff --git a/client/webserver/site/src/css/icons.scss b/client/webserver/site/src/css/icons.scss index 65d1321b2f..75d0908a7d 100644 --- a/client/webserver/site/src/css/icons.scss +++ b/client/webserver/site/src/css/icons.scss @@ -110,6 +110,12 @@ transform: rotate(180deg); } +.ico-arrowup::before { + content: "\e90c"; + display: inline-block; + transform: rotate(-90deg); +} + .ico-checkbox::before { content: "\e90d"; } diff --git a/client/webserver/site/src/css/main.scss b/client/webserver/site/src/css/main.scss index 52d111e367..eb38e67515 100644 --- a/client/webserver/site/src/css/main.scss +++ b/client/webserver/site/src/css/main.scss @@ -60,39 +60,34 @@ input:invalid { overflow-y: auto; } -.overflow-x-hidden { +.overflow-y-hidden { + overflow-y: hidden; +} + +.overflow-x-hidden, +.stylish-overflow.overflow-x-hidden { overflow-x: hidden; } header.maintop { width: 100%; - height: 60px; - min-height: 60px; + height: 70px; + min-height: 70px; display: flex; justify-content: space-between; align-items: center; z-index: 100; - background-color: white; - border-bottom: 1px solid #777; + border-bottom: 1px solid $light_border_color; } -a.logo, a.logo-icon { display: block; - height: 30px; - margin: 0 20px; + margin: 0 10px; background-size: cover; cursor: pointer; -} - -a.logo { - width: 145px; - background-image: url("/img/logo_wide_v1.svg"); -} - -a.logo-icon { - width: 30px; - background-image: url("/img/logo_icon_v1.svg"); + height: 40px; + width: 40px; + background-image: url("/img/softened-icon.png"); } div.main { @@ -116,31 +111,6 @@ button:focus { outline: none; } -.card { - width: 400px; - border-radius: 3px; - position: relative; - - button { - padding: 6px 0; - } - - input, - select { - background-color: $light_bg_2; - } - - input:focus, - select:focus { - background-color: $light_bg_2; - } - - form label { - font-size: 15px; - font-family: $demi-sans; - } -} - .dynamicopts { display: flex; align-items: stretch; @@ -154,11 +124,17 @@ button:focus { } } -div.mainlinks > div, -div.mainlinks > a { - padding-right: 1em; - color: #4a4949; - cursor: pointer; +div.mainlinks { + white-space: nowrap; + + & > div, + & > a { + color: #4a4949; + cursor: pointer; + padding-top: 5px; + padding-bottom: 5px; + padding-left: 10px; + } } .plainlink { @@ -187,12 +163,8 @@ header.maintop a:hover, cursor: pointer; } -div.mainlinks .hoverbright:hover { - color: $dark_bg_3; -} - -form.card button:hover { - color: black; +div.mainlinks .hoverbg:hover { + color: #222; } div.spinner { @@ -246,6 +218,19 @@ input[type=number] { @include stylish-overflow; } +.stylish-overflow.hoveronly:not(:hover) { + scrollbar-color: transparent transparent; + + &::-webkit-scrollbar-track { + background: transparent; + } + + &::-webkit-scrollbar-thumb { + background-color: transparent; + border-radius: 4px; + } +} + .max-h-100 { max-height: 100%; } @@ -327,7 +312,7 @@ div.popup-notes { display: flex; flex-direction: column; align-items: stretch; - background-color: white; + background-color: $light_body_bg; border: 1px solid #7777; z-index: 100; font-family: $sans; @@ -389,32 +374,36 @@ div.popup-notes { display: none !important; } -.bg0 { - background-color: white; +.buycolor { + color: $buycolor_light; } -.bg1 { - background-color: $light_bg_1; +.sellcolor { + color: $sellcolor_light; } -.border1 { - border: 1px solid #aaa; +.errcolor { + color: #e61c00; } -.bg2 { - background-color: $light_bg_2; +.grey { + color: #999; } -.buycolor { - color: $buycolor_light; +.brdrleft { + border-left: 1px solid $light_border_color; } -.sellcolor { - color: $sellcolor_light; +.brdrright { + border-right: 1px solid $light_border_color; } -.errcolor { - color: #e61c00; +.brdrtop { + border-top: 1px solid $light_border_color; +} + +.brdrbottom { + border-bottom: 1px solid $light_border_color; } hr.dashed { @@ -477,10 +466,6 @@ div.form-closer { font-size: 15px; } -div.border1 { - border: 1px solid #aaa; -} - #loader { background-color: #e0e0e077; } @@ -498,6 +483,11 @@ span.token-aware-symbol sup { @include media-breakpoint-up(md) { div.mainlinks > div, div.mainlinks > a { - padding-right: 1.7em; + padding-left: 18px; + padding-right: 18px; + + &:last-child { + padding-right: 0; + } } } diff --git a/client/webserver/site/src/css/main_dark.scss b/client/webserver/site/src/css/main_dark.scss index 343ff4a467..8cddd35ed2 100644 --- a/client/webserver/site/src/css/main_dark.scss +++ b/client/webserver/site/src/css/main_dark.scss @@ -3,49 +3,51 @@ body.dark { color: $font-color-dark; header.maintop { - background-color: black; - border-bottom-style: none; + // background-color: black; + border-bottom-style: solid; + border-color: $dark_border_color; + border-width: 1px; + } + + a.logo-icon { + background-image: url("/img/softened-icon-dark.png"); } .offwhite { color: #a1a1a1; } + .grey { + color: #666; + } + div.mainlinks > div, div.mainlinks > a { color: #a8a8a8; } - div.mainlinks .hoverbright:hover { + div.mainlinks .hoverbg:hover { color: #c5c5c5; } - a.logo { - background-image: url("/img/logo_wide_dark_v1.svg"); - } - div.note:not(:last-child) { border-color: #333; } - .bg0 { - background-color: black; - } - - .border1 { - border: 1px solid #333; + .brdrleft { + border-left: 1px solid dark_border_color; } - .bg1 { - background-color: $dark_bg_1; + .brdrright { + border-right: 1px solid dark_border_color; } - .bg2 { - background-color: $dark_bg_2; + .brdrtop { + border-top: 1px solid dark_border_color; } - .bg3 { - background-color: $dark_bg_3; + .brdrbottom { + border-bottom: 1px solid dark_border_color; } .subtlelink, @@ -99,22 +101,13 @@ body.dark { opacity: 1; } - form.card button, - form.card label { - text-shadow: 0 0 4px black; - } - - form.card button:hover { - color: #dde9ff; - } - div.popup-notes > span { background-color: white; color: $font-color-light; } #forms { - background-color: #13202bf3; + background-color: $dark_body_bg; } .buycolor { @@ -125,13 +118,9 @@ body.dark { color: $sellcolor_dark; } - div.border1 { - border: 1px solid #333; - } - #noteBox, #profileBox { - background-color: $dark_bg_1; + background-color: $dark_body_bg; } #tooltip { diff --git a/client/webserver/site/src/css/market.scss b/client/webserver/site/src/css/market.scss index d64694cb41..bf89f95b1e 100644 --- a/client/webserver/site/src/css/market.scss +++ b/client/webserver/site/src/css/market.scss @@ -1,406 +1,405 @@ -div.marketlist { - // width: 175px; - border-right: 1px solid #626262; - z-index: 99; - background-color: #dbdbdb; - min-width: 190px; - - .selected { - border-style: solid none; - border-width: 1px; - border-color: #aaa; - } - - .header { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; +div[data-handler=markets] { + .ordertable-wrap { width: 100%; - max-width: 250px; - } - .xc:not(:first-child) .header { - padding-top: 15px; - } + &:first-child { + border-bottom: 1px solid $light_border_color; + } - .grey { - color: #555; - } -} + &:last-child { + border-top: 1px solid $light_border_color; + } -div.marketrow { - font-size: 16px; - padding: 3px 4px; - cursor: pointer; - white-space: nowrap; - display: flex; - flex-direction: column; - align-items: stretch; - margin: 3px; - background-color: #c2c9d4; - border-radius: 3px; - // border: 1px solid #7775; - - & > div { - display: flex; - align-items: center; - flex-direction: row; - line-height: 1; - padding: 2px 0; + tbody#sellRows { + border-top: 1px solid $light_border_color; + } } - &:hover, - &.selected { - padding: 2px 3px; - border: 1px solid #1b966d; + .ordertable-header { + height: 30px; + padding: 0 45px 0 10px; } - span.upgreen { - color: #35b97c; - } + .orderbook { + min-width: 300px; + width: 90%; + border-right: 1px solid $light_border_color; + border-left: 1px solid $light_border_color; + border-top: 1px solid $light_border_color; - span.downred { - color: #c33b3b; - } + & > div:first-child { // buy orders + order: 3; + } + + & > div:nth-child(2) { // header + order: 1; + } - span.pct-change { - min-width: 50px; - text-align: right; + & > div:last-child { // sell orders + order: 2; + } } -} -label.market-search { - display: flex; - justify-content: space-between; - align-items: stretch; - margin: 1px; - background-color: white; + .order-panel { + min-width: 375px; + width: 90%; - input { - border: none; - width: 100%; - } + & > div { + border: 1px solid $light_border_color; + } - span { - width: 25px; - text-align: center; - } -} + #orderForm { + input[type=number] { + height: 30px; + border: 1px solid #6a6a6a; + border-radius: 0; + font-size: 14px; + } -div.market-orders-table-container { - @include media-breakpoint-down(lg) { - max-height: 200px; - } + input:focus { + outline: none; + } - @include media-breakpoint-up(lg) { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - } -} + span.unitbox { + position: absolute; + font-size: 14px; + font-family: "demi-sans", sans-serif; + right: 5px; + top: 48%; // Looks better than 50 for some reason. + transform: translateY(-50%); + white-space: nowrap; + } -div.user-orders-table-container { - @include media-breakpoint-down(xxl) { - max-height: 200px; - } + button { + padding: 5px 25px; + border-radius: 3px; + color: #555; + } - @include media-breakpoint-up(xxl) { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - } -} + button:hover, + button.selected { + color: black; + } -table.ordertable { - border-collapse: collapse; - border: none; - width: 100%; - margin-bottom: 10px; + button.submit { + background-color: #5cba8b; + } - th { - font-size: 14px; - font-family: "demi-sans", sans-serif; - } + button.selected, + button.submit { + &.buygreen-bg { + background-color: #207a4699; + } - td { - font-size: 14px; - } + &.sellred-bg { + background-color: #99302b99; + } + } - td, - th { - font-size: 14px; - padding: 3px 0; - } + .ico-unlocked { + color: #1e7d11; + } - tr { - border-bottom: 1px solid #b3b3b3; + #orderPreview, + .h21 { + height: 21px; + } + } } - tbody > tr:hover, - tbody > tr.hover { - background-color: white; - } + .market-chart { + @extend .flex-center; - .ico-check { - color: #9b8c09; + flex-grow: 1; + position: relative; + min-width: 100px; // Letting it go to zero can be problematic, causing some major cpu during chart calcs + + canvas { + position: absolute; + left: 0; + top: 0; + user-select: none; + } } -} -table.balance-table { - width: 96%; - margin: 0 2%; - font-size: 15px; + .user-order { + margin: 0 20px; + border: 1px solid $light_border_color; - td, - th { - white-space: nowrap; - text-align: left; - border-width: 1px; - border-color: #3a3a3a; - font-size: 14px; - } + &:not(:last-child) { + border-bottom-style: none; + } - th { - border-bottom-style: solid; - } + &:last-child .order-details { + border-bottom-style: none; + padding-bottom: 0; + } - button { - font-family: $sans; - padding: 2px 10px; - margin: 5px 0; - font-size: 14px; - border: 1px solid #444; - border-radius: 3px; - background-color: transparent; - } + .user-order-header { + @extend .flex-center; - td:not(:first-child) { - font-family: $mono; - } + padding: 5px 10px 5px 20px; + font-size: 14px; + position: relative; + // border: 1px solid grey; - td:first-child { - font-size: 14px; - } + .side-indicator { + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 8px; + + &.buy { + background-color: $buycolor_light; + } + + &.sell { + background-color: $sellcolor_light; + } + } - td.fs16 { - font-size: 16px; - } + .active-indicator { + height: 8px; + border-radius: 4px; - th:not(:first-child), - td:not(:first-child) { - padding: 0 10px; - border-left-style: solid; - } + &.active { + margin: 0 5px; + width: 8px; + background-color: $buycolor_light; + } + } + } - td.pointer:hover { - background-color: #fff1; - } + .order-details { + margin-bottom: 25px; + padding: 0 10px 10px; + border-width: 1px; + border-color: $light_border_color; + border-style: solid none; + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + row-gap: 10px; + line-height: 1; - .ico-expired { - color: orangered; + .user-order-datum { + flex-grow: 1; + display: flex; + flex-direction: column; + align-items: flex-start; + + & > span:first-child { + font-size: 12px; + font-family: $demi-sans; + color: grey; + margin-bottom: 2px; + } + + & > span:nth-child(2) { + font-size: 14px; + } + + &.full-span { + grid-column: 1 / -1; + } + } + } } - td .ico-spinner, - td .ico-sleeping, - td .ico-cross { - font-size: 18px; - width: 18px; - height: 18px; - margin: 0 auto; - } + table.ordertable { + border-collapse: collapse; + border: none; + width: 100%; - .micro-icon { - width: 13px; - height: 13px; - bottom: 1px; - } -} + th { + font-family: "demi-sans", sans-serif; + } -.card { - .grey { - color: #939b99; - } + td, + th { + font-size: 15px; + padding: 3px 0; + } - .buygreen { - background-color: #207a4699; - } + td:first-child { + width: 100%; + } - .micro-icon { - bottom: auto; - } -} + td:last-child { + min-width: 30px; + } -table#vFeeTable { - width: 100%; - font-size: 15px; + tbody > tr:hover, + tbody > tr.hover { + background-color: white; + } - tbody { - width: 100%; + .ico-check { + color: #9b8c09; + } } - td { - padding: 3px 6px; - border-color: #333; - } + .markettab { + height: 30px; + border-style: none; - td:first-child { - white-space: nowrap; + &.selected { + background-color: #fffe; + } } - td.squeeze { - width: 1px; + .numorders { + background-color: #c5c5e6; + border-radius: 3px; + line-height: 1; + padding: 1px; + font-size: 0.9em; } - tr:not(:first-child) > td { - border-style: solid; + #leftColumnV1 { + height: 100%; + position: absolute; + display: flex; + top: 0; + left: 0; + border-right-style: solid; + border-color: $light_border_color; border-width: 1px; + background-color: $light_body_bg; + z-index: 2; - &:first-child { - border-style: solid solid solid none; + &.default { + display: none; } - &:last-child { - border-style: solid none solid solid; + #searchBoxV1 { + height: 55px; + border-bottom-style: solid; + border-color: $light_border_color; + border-width: 1px; } - } - - tr.heavy-bottom > td, - td.heavy-bottom { - border-bottom-color: #555; - } - tr.heavy-top > td { - border-top-color: #555; - } -} + &.stashed { + display: none; + } -.market-header button:hover { - color: black; -} + #marketSearchV1:focus { + border: none; + outline: none; + } -table.balance-table button:hover { - border-color: #959595; -} + #marketSearchV1 { + @extend .fill-abs; -.market-header { - height: 30px; - background-color: $light_bg_2; - color: #222; + z-index: 2; + background-color: transparent; + font-size: 25px; + text-align: center; + font-family: $demi-sans; + font-variant: small-caps; + border: none; - button.selected { - color: black; - } -} + & + .ico-search { + z-index: 1; + position: absolute; + left: 50%; + top: 50%; + transform: translateX(-50%) translateY(-50%); + opacity: 0.25; + } -#orderForm { - input[type=number] { - height: 30px; - border: 1px solid #6a6a6a; - border-radius: 0; - font-size: 14px; - } + &:hover + .ico-search { + opacity: 0.5; + } - input:focus { - outline: none; - } + &:focus + .ico-search { + display: none; + } + } - span.unitbox { - position: absolute; - font-size: 14px; - font-family: "demi-sans", sans-serif; - right: 5px; - top: 48%; // Looks better than 50 for some reason. - transform: translateY(-50%); - white-space: nowrap; - } + #leftHider { + padding: 0 5px; + border-left-style: solid; + border-color: $light_border_color; + border-width: 1px; - button { - padding: 5px 25px; - border-radius: 3px; - color: #555; - } + .ico-arrowback { + transform: scaleX(0.5); + opacity: 0.5; + } - button:hover, - button.selected { - color: black; - } + &:hover .ico-arrowback { + opacity: 1; + } + } - button.submit { - background-color: #5cba8b; - } + #marketListV1 { + height: 100%; + min-width: 225px; - button.selected, - button.submit { - &.buygreen { - background-color: #207a4699; - } + .market-tmpl-v1 { + line-height: 1; + margin-bottom: 10px; + width: 100%; - &.sellred { - background-color: #99302b99; - } - } + img { + width: 20px; + height: 20px; + position: relative; - .ico-unlocked { - color: #1e7d11; - } + // &:nth-child(0) { + // top: 5px; + // } - #orderPreview, - .h21 { - height: 21px; + // &:nth-child(1) { + // top: -5px; + // } + } + } + } } -} -#marketChart { - position: relative; - background-color: white; - height: 40%; - border-bottom: 1px solid #626262; - padding-top: 20px; + #mainContent { + @extend .fill-abs; - .chart-legend { display: flex; + flex-direction: column; align-items: center; - position: absolute; - top: 0; - left: 0; - right: 0; - padding: 0 5px; - height: 30px; - font-size: 14px; - color: #444; - - .category-spacer { - display: inline-block; - margin: 0 7px; - position: relative; - bottom: 2px; + row-gap: 30px; + padding-top: 20px; + padding-bottom: 20px; + + & > div { + &:first-child { // order book + max-height: 1000px; + order: 3; + } - &::after { - content: "|"; + &:nth-child(2) { // charts + min-height: 750px; + width: 90%; + order: 3; } - } - button.chart-selector { - width: 52px; - height: 20px; - padding: 1px; - margin-right: 10px; - background-color: #7772; - border: 1px solid #777; - border-radius: 5px; + &:last-child { // order form, wallets, user orders + order: 2; + } } + } - button.chart-selector:hover { - background-color: #7777; - border-color: #6cac78; - } + #epochLine, + #durBttnBox { + position: absolute; + left: 50px; + top: 5px; + background-color: $light_body_bg; + z-index: 1; + display: none; // shown on hover + } + #durBttnBox { .candle-dur-bttn { - background-color: #7772; + background-color: $light_body_bg; border: 1px solid #777; padding: 2px 4px; font-size: 14px; @@ -417,6 +416,12 @@ table.balance-table button:hover { border-color: #6cac78; } } + } + + #epochLine { + @extend .flex-center; + + display: none; .epoch-line { display: inline-block; @@ -427,238 +432,252 @@ table.balance-table button:hover { position: relative; top: 1px; } - - #candlestickBttn { - background-image: url("/img/candlestick_bttn.png"); - } - - #depthBttn { - background-image: url("/img/depth_bttn.png"); - } } -} - -#marketLoader { - z-index: 50; - background-color: rgba(0 0 0 / 50%); -} - -#marketLoader > div { - width: 40px; - height: 40px; - font-size: 40px; -} -#chartResizer { - position: absolute; - bottom: 0; - height: 6px; - width: 100%; - z-index: 2; - cursor: ns-resize; -} + .market-chart:hover > #durBttnBox, + .market-chart:hover > #epochLine { + display: block; + } -.markettab { - background-color: transparent; - border-top-style: none; - border-bottom-style: none; - border-right: 1px solid black; - border-radius: 4px 4px 0 0; -} + .chart-legend { + display: flex; + align-items: center; + padding: 0 5px; + height: 30px; + font-size: 14px; + } -.markettab.selected { - background-color: #f9f9f9; -} + #loaderMsg { + color: #777; + } -.brdrleft { - border-left: 1px solid #6a6a6a; -} + #registrationStatus { + .title { + font-weight: bold; + margin-bottom: 5px; + } -.brdrright { - border-right: 1px solid #6a6a6a; -} + &.waiting { + .title { + color: #9b8c09; + } + } -.market-bal { - border: 1px solid #6a6a6a; - border-radius: 3px; -} + &.completed { + .title { + color: #5cba8b; + } -.market-bal-lbl { - display: block; - position: absolute; - left: 10px; - top: -11px; - padding: 0 3px; - font-size: 16px; - font-family: "demi-sans", sans-serif; - background-color: $light_bg_1; -} + #regStatusMessage { + display: none; + } + } -#orders { - .ico-unlocked { - color: #1e7d11; + &.error { + .title { + color: red; + } + } } -} -.orders-left { - min-height: 350px; -} + #verifyForm { + .echo-data span { + margin: 0 5px; + } -.order-panel { - min-height: 500px; -} + .red { + color: #f55a; + } -#loaderMsg { - color: #777; -} + .disclaimer { + text-align: justify; + } -#registrationStatus { - .title { - font-weight: bold; - margin-bottom: 5px; - } + .header { + &.buygreen-bg { + background-color: #207a4699; + } - &.waiting { - .title { - color: #9b8c09; + &.sellred-bg { + background-color: #99302b99; + } } - } - &.completed { - .title { - color: #5cba8b; - } + button.selected { + &.buygreen-bg { + background-color: #207a4699; + } - #regStatusMessage { - display: none; + &.sellred-bg { + background-color: #99302b99; + } } - } - &.error { - .title { - color: red; + .loader { + height: 40px; } - } -} -#verifyForm { - .echo-data span { - margin: 0 5px; - } + .order-opt { + border: 1px solid #424242; + border-radius: 3px; + padding: 4px; + margin-top: 8px; + opacity: 0.7; - .red { - color: #f55a; - } + div.opt-check { + width: 15px; + height: 15px; + border-radius: 7.5px; + border: 2px solid #424242; + margin-top: 5px; + cursor: pointer; + } - .disclaimer { - text-align: justify; - } + .xy-range-input { + width: 35px; + font-size: 14px; + height: 16px; + } + + .slider { + margin: 10px 10px 5px; + height: 2px; + background-color: grey; + position: relative; + + .slider-handle { + position: absolute; + height: 20px; + width: 14px; + top: -9px; + border-radius: 7px; + background-color: #2cce9c; + border: 2px solid #424242; + cursor: pointer; + } + } + + &:not(.selected) { + cursor: pointer; + } + + &.selected { + opacity: 1; + background-color: #e8ebed; - .header { - &.buygreen { - background-color: #207a4699; + div.opt-check { + background-color: #2cce9c; + } + } } - &.sellred { - background-color: #99302b99; + #vUnlockPreorder { + .ico-locked { + font-size: 35px; + } } } - button.selected { - &.buygreen { - background-color: #207a4699; + #vDetailPane { + max-width: 425px; + + .indent { + border-left: 2px solid #777a; } - &.sellred { - background-color: #99302b99; + table.fee-breakout { + margin: 5px 0; + + td { + border: 1px solid #777a; + text-align: center; + padding: 2px 5px; + } } } +} - .loader { - height: 40px; - } +.market-stats-v1 { + display: flex; + margin: 0 5px; + gap: 15px; - .order-opt { - border: 1px solid #424242; - border-radius: 3px; - padding: 4px; - margin-top: 8px; - opacity: 0.7; + .data-point { + display: flex; + flex-direction: column; + justify-content: flex-start; + margin-left: 20px; + font-size: 18px; + line-height: 1.25; - div.opt-check { - width: 15px; - height: 15px; - border-radius: 7.5px; - border: 2px solid #424242; - margin-top: 5px; - cursor: pointer; + span.label { + font-family: $demi-sans; + font-size: 15px; } + } - .xy-range-input { - width: 35px; - font-size: 14px; - height: 16px; - } + .twentyfour { + margin-left: 0; + border-left: 1px solid $light_border_color; - .slider { - margin: 10px 10px 5px; - height: 2px; - background-color: grey; - position: relative; + .data-point { + margin-left: 0; - .slider-handle { - position: absolute; - height: 20px; - width: 14px; - top: -9px; - border-radius: 7px; - background-color: #2cce9c; - border: 2px solid #424242; - cursor: pointer; + & > * { + padding-right: 20px; } - } - &:not(.selected) { - cursor: pointer; - } + span.label { + width: 100%; + border-bottom: 1px solid $light_border_color; + } - &.selected { - opacity: 1; - background-color: #e8ebed; + &:first-child > span.label { + padding-right: 5px; + padding-left: 5px; + } - div.opt-check { - background-color: #2cce9c; + &:nth-child(3), + &:nth-child(4) { + align-items: flex-end; + + span.label { + text-align: right; + } + } + + &:nth-child(4) > * { + padding-right: 0; } } } - #vUnlockPreorder { - .ico-locked { - font-size: 35px; - } + img { + width: 30px; + height: 30px; + + // &:nth-child(1) { + // position: relative; + // left: 5px; + // } } } -div.numorders { - background-color: #c5c5e6; - border-radius: 3px; - line-height: 1; - padding: 1px; - font-size: 0.9em; +#headerSpace .market-stats-v1 { + display: none; } -#liveTable { - th, - td { - padding: 2px 10px; - white-space: nowrap; +#main .market-stats-v1 { + border-bottom: 1px solid $light_border_color; +} - &.last { - flex: 1; - min-width: 57px; - } - } +#recentMatchesBox { + @extend .stylish-overflow; + + max-height: 350px; +} +#recentMatchesTable { th { align-items: center; @@ -691,67 +710,123 @@ div.numorders { tr { cursor: pointer; } +} - .ico-cross { - font-size: 12px; - cursor: pointer; +@include media-breakpoint-up(xl) { + #main .market-stats-v1 { + display: none; + border-top: none; } - .ico-rocket { - font-size: 12px; - cursor: pointer; + #headerSpace .market-stats-v1 { + display: flex; } -} -#recentMatchesTable { - th { - align-items: center; + div[data-handler=markets] #leftColumnV1 { + position: relative; - &:hover { - opacity: 0.7; + &.default { + display: flex; } + } +} - .ico-arrowdown { - display: inline-block; - visibility: hidden; - vertical-align: middle; - font-size: 10px; - margin-left: 5px; +@include media-breakpoint-up(lg) { + div[data-handler=markets] { + #mainContent { + overflow: hidden; + flex-direction: row; + align-items: stretch; + row-gap: 0; + padding-top: 0; + padding-bottom: 0; + + & > div:nth-child(n) { // need nth-child for specificity + min-height: auto; + } + + & > div:first-child { // order book + order: 1; + } + + & > div:nth-child(2) { // charts + width: auto; + order: 2; + } + + & > div:last-child { // order form, wallets, user orders + order: 3; + } } - &.sorted-dsc { - .ico-arrowdown { - visibility: visible; + .ordertable-wrap { + height: calc(50% - 15px); + display: flex; + + &.reversible { + flex-direction: column-reverse; + } + + &:first-child { + border-bottom: 1px solid $light_border_color; + } + + &:last-child { + border-top: 1px solid $light_border_color; + } + + tbody { + display: flex; + } + + tbody#sellRows { + flex-direction: column-reverse; + border-top: none; + } + + tbody#buyRows { + flex-direction: column; } } - &.sorted-asc { - .ico-arrowdown { - visibility: visible; - transform: rotate(180deg); + .orderbook { + border-left: none; + border-top: none; + width: auto; + + & > div:first-child { // sell orders + order: 1; + } + + & > div:nth-child(2) { // header + order: 2; + } + + & > div:last-child { // buy orders + order: 3; } } - } - tr { - cursor: pointer; - } -} + .order-panel { + width: 375px; -#vDetailPane { - max-width: 425px; + & > div { + @include fill-abs; + @include stylish-overflow; - .indent { - border-left: 2px solid #777a; + height: 100%; + overflow-x: hidden; + border-style: none none none solid; + } + } } - table.fee-breakout { - margin: 5px 0; + table.ordertable { + width: auto; + } - td { - border: 1px solid #777a; - text-align: center; - padding: 2px 5px; - } + #recentMatchesBox { + overflow: visible; + max-height: none; } } diff --git a/client/webserver/site/src/css/market_dark.scss b/client/webserver/site/src/css/market_dark.scss index 21bef59e6a..8f38b625c5 100644 --- a/client/webserver/site/src/css/market_dark.scss +++ b/client/webserver/site/src/css/market_dark.scss @@ -1,154 +1,208 @@ body.dark { - input[type=number] { - border-color: #444; - } + div[data-handler=markets] { + input[type=number] { + border-color: #444; + } - table.ordertable { - color: #a1a1a1; + table.ordertable { + color: #a1a1a1; - tr { - border-bottom: 1px solid #222; + tbody > tr:hover, + tbody > tr.hover { + background-color: #1d2936; + } } - tbody > tr:hover, - tbody > tr.hover { - background-color: #1d2936; + .numorders { + background-color: #141488; } - } - div.marketorders { - background-color: #080808; + .markettab.selected { + background-color: #fff1; + } - table.ordertable tr { - border-bottom: 1px solid #131313; + .market-bal { + border: 1px solid $dark_border_color; + border-radius: 3px; } - } - div.numorders { - background-color: #141488; - } + .brdrleft { + border-left: 1px solid $dark_border_color; + } - div.marketlist { - background-color: #1c1c1f; - border-right-color: black; + .brdrright { + border-right: 1px solid $dark_border_color; + } - .grey { - color: #999; + .brdrtop { + border-top: 1px solid $dark_border_color; } - } - .marketrow { - background-color: #34383e; + .brdrbottom { + border-bottom: 1px solid $dark_border_color; + } - &.selected { - border: 1px solid #7a97; + .chart-legend { + color: #999; } - } - label.market-search { - background-color: black; - } + .ordertable-wrap { + &:first-child { + border-bottom: 1px solid $dark_border_color; + } - .markettab.selected, - .market-bal-lbl { - background-color: $dark_bg_1; - } + &:last-child { + border-top: 1px solid $dark_border_color; + } - .market-header { - background-color: $dark_bg_3; - color: inherit; + tbody#sellRows { + border-top: 1px solid $dark_border_color; + } + } - button { - color: #bbb; + .orderbook { + border-right: 1px solid $dark_border_color; + border-left: 1px solid $dark_border_color; + border-top: 1px solid $dark_border_color; } - button:hover, - button.selected { - color: #f2fffd; + .order-panel > div { + border: 1px solid $dark_border_color; } - } - .market-bal { - border: 1px solid #3a3a3a; - border-radius: 3px; - } + .user-order { + border: 1px solid $dark_border_color; - .brdrleft { - border-left: 1px solid black; - } + .order-details { + border-color: $dark_border_color; + } - .brdrright { - border-right: 1px solid black; - } + .user-order-header { + .side-indicator { + &.buy { + background-color: $buycolor_dark; + } - #marketChart { - background-color: #131313; - border-bottom-color: black; + &.sell { + background-color: $buycolor_dark; + } + } - .chart-legend { - color: #999; + .active-indicator.active { + background-color: $buycolor_dark; + } + } } - } - #orderForm { - color: #a1a1a1; + #orderForm { + color: #a1a1a1; - button { - color: #aaa; - } - - button:hover, - button.selected { - color: #eee; - } + button { + color: #aaa; + } - button.submit { - background-color: #0b5831; - color: #eee; - } + button:hover, + button.selected { + color: #eee; + } - button.selected, - button.submit { - &.buygreen { - background-color: #05a35a99; + button.submit { + background-color: #0b5831; + color: #eee; } - &.sellred { - background-color: #ae333399; + button.selected, + button.submit { + &.buygreen-bg { + background-color: #29bb7799; + } + + &.sellred-bg { + background-color: #e95e5e99; + } } } - } - #verifyForm { - .header { - &.buygreen { - background-color: #05a35a99; + #verifyForm { + .header { + &.buygreen-bg { + background-color: #29bb7799; + } + + &.sellred-bg { + background-color: #e95e5e99; + } } - &.sellred { - background-color: #ae333399; + button.selected { + &.buygreen-bg { + background-color: #29bb7799; + } + + &.sellred-bg { + background-color: #e95e5e99; + } } - } - button.selected { - &.buygreen { - background-color: #05a35a99; + .order-opt.selected { + background-color: #222e38; } + } - &.sellred { - background-color: #ae333399; + #leftColumnV1 { + border-color: $dark_border_color; + background-color: $dark_body_bg; + + #searchBoxV1 { + border-color: $dark_border_color; + + #leftHider { + border-color: $dark_border_color; + } } } + } - .order-opt.selected { - background-color: #222e38; + .twentyfour { + border-left: 1px solid $dark_border_color; + + .data-point span.label { + border-bottom: 1px solid $dark_border_color; + } + } + + #main .market-stats-v1 { + border-bottom: 1px solid $dark_border_color; + } + + #durBttnBox, + #epochLine { + background-color: $dark_body_bg; + + .candle-dur-bttn { + background-color: $dark_body_bg; } } +} + +@include media-breakpoint-up(lg) { + body.dark div[data-handler=markets] { + .orderbook { + border-left: none; + border-top: none; + } + + .ordertable-wrap { + &:first-child { + border-bottom: 1px solid $dark_border_color; + } + + &:last-child { + border-top: 1px solid $dark_border_color; + } - #liveTable { - th { - .ico-arrowdown { - color: #a1a1a1; + tbody#sellRows { + border-top: none; } } } diff --git a/client/webserver/site/src/css/wallets.scss b/client/webserver/site/src/css/wallets.scss index 76a854266f..6fc0384016 100644 --- a/client/webserver/site/src/css/wallets.scss +++ b/client/webserver/site/src/css/wallets.scss @@ -1,8 +1,4 @@ .walletspage { - .grey { - color: #999; - } - .ico-unlocked { color: #1e7d11; } @@ -23,15 +19,6 @@ min-width: 90%; } - .bg1 { - background-color: #0e0c1b; - } - - .border-top-lt-xxl, - .border-top-lt-lg { - border-top: 1px solid #7777; - } - #depositAddress { user-select: all; } @@ -52,12 +39,9 @@ margin-right: 5px; } - #copyAlert { - margin-left: 12px; - position: absolute; - } - #assetSelect { + border-right: 1px solid $dark-border-color; + .icon-select { padding: 15px; cursor: pointer; @@ -185,6 +169,15 @@ width: 100px; height: 100px; } + + #marketsOverviewBox { + border-left: 1px solid $light_border_color; + border-bottom: 1px solid $light_border_color; + } + + #walletDetailsBox { + border-bottom: $light_border_color; + } } @include media-breakpoint-up(xxl) { @@ -193,13 +186,13 @@ } .walletspage { - .border-top-lt-xxl { - border-top: none; - } - .flex-nowrap-xxl { flex-wrap: nowrap; } + + div#orderActivityBox { + border-top: none; + } } } @@ -213,12 +206,17 @@ } .walletspage { - .bg1-lg { - background-color: #0e0c1b; + #orderActivityBox { + border-top: 1px solid $dark-border-color; } - .border-top-lt-lg { - border-top: none; + #marketsOverviewBox { + border-right: 1px solid $dark-border-color; + border-bottom: none; + } + + #walletDetailsBox { + border-bottom: none; } } diff --git a/client/webserver/site/src/css/wallets_dark.scss b/client/webserver/site/src/css/wallets_dark.scss index 778d7792dc..97b6d8df8d 100644 --- a/client/webserver/site/src/css/wallets_dark.scss +++ b/client/webserver/site/src/css/wallets_dark.scss @@ -1,16 +1,12 @@ -body.dark .walletspage { - table.wallets { - tbody tr { - background-color: $dark_bg_2; +body.dark { + .walletspage { + #marketsOverviewBox { + border-left: 1px solid $dark_border_color; + border-bottom: 1px solid $dark_border_color; } - button { - background-color: black; - color: $font-color-dark; - } - - td { - border-color: #333; + #walletDetailsBox { + border-bottom: $dark_border_color; } } } diff --git a/client/webserver/site/src/html/bodybuilder.tmpl b/client/webserver/site/src/html/bodybuilder.tmpl index 8a9239b0fd..29d6132304 100644 --- a/client/webserver/site/src/html/bodybuilder.tmpl +++ b/client/webserver/site/src/html/bodybuilder.tmpl @@ -8,7 +8,7 @@ {{.Title}} - +