Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oeth dapp UI style fixes #1511

Merged
merged 11 commits into from
May 19, 2023
4 changes: 4 additions & 0 deletions dapp-oeth/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export default function DApp({ locale, onLocale }) {
</div>
</Layout>
<style jsx>{`
.home {
padding-top: 20px;
}

@media (max-width: 799px) {
.home {
padding: 0;
Expand Down
3 changes: 3 additions & 0 deletions dapp-oeth/public/images/activity-failed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions dapp-oeth/public/images/activity-pending.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions dapp-oeth/public/images/activity-success.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dapp-oeth/public/images/activity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions dapp-oeth/public/images/external-link-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed dapp-oeth/public/images/externalLink.png
Binary file not shown.
9 changes: 9 additions & 0 deletions dapp-oeth/public/images/splitarrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion dapp-oeth/src/components/AccountStatusDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const AccountStatusDropdown = ({ className, showLogin }) => {
setOpen(true)
}
event({
'event': 'open_account',
event: 'open_account',
})
}}
>
Expand Down Expand Up @@ -68,6 +68,7 @@ const AccountStatusDropdown = ({ className, showLogin }) => {
color: #fafbfb;
padding: 20px 30px 20px 20px;
min-width: 170px;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}
.dropdown-menu .dropdown-marble {
margin-right: 18px;
Expand Down
2 changes: 1 addition & 1 deletion dapp-oeth/src/components/AppFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default function Footer({ onLocale, locale }) {
</footer>
<style jsx>{`
footer {
background-color: #141519;
background-color: #1e1f25;
color: #828699;
font-size: 0.75rem;
padding: 18px 0;
Expand Down
52 changes: 40 additions & 12 deletions dapp-oeth/src/components/ApySelect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState } from 'react'
import classnames from 'classnames'
import Dropdown from 'components/Dropdown'
import { assetRootPath } from 'utils/image'
import { event } from '../../lib/gtm'
Expand All @@ -14,18 +15,23 @@ const ApySelect = ({ apyDayOptions, apyDays, setApyDays, nav, homepage }) => {
return (
<div
key={days}
className="dropdown-item justify-content-start align-items-center"
className={classnames(
'dropdown-item justify-content-start align-items-center',
{
selected: String(days) === String(apyDays),
}
)}
onClick={(e) => {
e.preventDefault()
setApyDays(days)
setOpen(false)
event({
'event': 'change_apy',
'change_apy_to': days
event: 'change_apy',
change_apy_to: days,
})
}}
>
{`${days}${homepage ? ' days' : 'd'}`}
{`${days} day trailing APY`}
</div>
)
})}
Expand All @@ -44,7 +50,11 @@ const ApySelect = ({ apyDayOptions, apyDays, setApyDays, nav, homepage }) => {
}}
>
{`${apyDays} day trailing`}
<div className="downcaret">
<div
className={classnames('downcaret', {
opened: open,
})}
>
<img
className="apy-select-icon"
src={assetRootPath('/images/downcaret.png')}
Expand Down Expand Up @@ -78,26 +88,39 @@ const ApySelect = ({ apyDayOptions, apyDays, setApyDays, nav, homepage }) => {
}

.dropdown-menu {
margin-right: 200px;
margin-right: 0;
background-color: #1e1f25;
color: #fafbfb;
font-size: 16px;
min-width: 98px;
top: 100%;
left: 0;
padding: 5px;
min-width: 140px;
top: 115%;
left: -20px;
border: solid 1px #141519;
padding: 0;
overflow: hidden;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

.dropdown-item {
display: flex;
align-items: center;
color: #fafbfb;
padding: 3px 5px 3px 10px;
padding: 10px 16px;
line-height: 20px;
cursor: pointer;
border-bottom: solid 1px #141519;
font-size: 12px;
}

.dropdown-item.selected {
color: #828699;
}
.dropdown-item:nth-child(:last-child) {
border-bottom: none;
}

.dropdown-item:hover {
background-color: rgba(255, 255, 255, 0.1);
background-color: #24252b;
}

.downcaret {
Expand All @@ -110,6 +133,11 @@ const ApySelect = ({ apyDayOptions, apyDays, setApyDays, nav, homepage }) => {
margin: 0 8px;
background-color: rgba(255, 255, 255, 0.1);
border-radius: 20px;
transition: transform 0.2s ease-in;
}

.downcaret.opened {
transform: rotate(180deg);
}

.apy-select-icon {
Expand Down
8 changes: 5 additions & 3 deletions dapp-oeth/src/components/GetOUSD.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const GetOUSD = ({
style={style}
onClick={() => {
if (process.browser) {
event({'event': 'connect_click'})
event({ event: 'connect_click' })
walletLogin(showLogin, activate)
}
}}
Expand Down Expand Up @@ -92,8 +92,10 @@ const GetOUSD = ({

.btn-nav {
color: #fafbfb;
font-size: 0.8125rem;
font-weight: normal;
font-size: 16px;
font-weight: 500;
letter-spacing: 0em;
text-align: left;
}

@media (max-width: 992px) {
Expand Down
5 changes: 5 additions & 0 deletions dapp-oeth/src/components/IPFSDappLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export default function IPFSDappLink({ css }) {
margin-right: 10px;
background-color: #1e1f25;
color: #fafbfb;
font-size: 16px;
font-weight: 500;
letter-spacing: 0em;
text-align: left;
height: 42px;
}

.ipfs-link span {
Expand Down
4 changes: 4 additions & 0 deletions dapp-oeth/src/components/MissionControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const MissionControl = ({}) => {
<SwapHomepage />
</div>
<style jsx>{`
.swap-contain {
margin-top: 18px;
}

@media (max-width: 767px) {
.swap-contain {
padding: 0 8px;
Expand Down
13 changes: 7 additions & 6 deletions dapp-oeth/src/components/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,27 +197,27 @@ const TransactionActivityDropdown = () => {
!lastProcessedTransaction?.mined ? (
<img
className="activity-icon rotating"
src={assetRootPath('/images/activity-pending.png')}
src={assetRootPath('/images/activity-pending.svg')}
alt="Transaction activity pending"
/>
) : lastProcessedTransaction?.mined &&
!lastProcessedTransaction?.isError ? (
<img
className="activity-icon "
src={assetRootPath('/images/activity-success.png')}
src={assetRootPath('/images/activity-success.svg')}
alt="Transaction activity success"
/>
) : (
<img
className="activity-icon"
src={assetRootPath('/images/activity-failed.png')}
src={assetRootPath('/images/activity-failed.svg')}
alt="Transaction activity failed"
/>
)
) : (
<img
className="activity-icon"
src={assetRootPath('/images/activity.png')}
src={assetRootPath('/images/activity.svg')}
alt="Transaction activity button"
/>
)}
Expand Down Expand Up @@ -256,6 +256,7 @@ const TransactionActivityDropdown = () => {
color: #fafbfb;
padding: 20px 30px 20px 20px;
min-width: 170px;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

.dropdown-menu .dropdown-marble {
Expand Down Expand Up @@ -546,7 +547,7 @@ const Nav = ({ isMobile, locale, onLocale, page }) => {
}

.banner.burn {
background-color: #141519;
background-color: #1e1f25;
border: solid 1px;
border-radius: 5px;
}
Expand Down Expand Up @@ -586,7 +587,7 @@ const Nav = ({ isMobile, locale, onLocale, page }) => {
}

.navbar.lightBg {
background: #141519;
background: #1e1f25;
display: block;
}

Expand Down
1 change: 1 addition & 0 deletions dapp-oeth/src/components/_AccountStatusContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ const AccountStatusContent = ({ className, onOpen }) => {
border: solid 1px #141519;
background-color: #1e1f25;
color: #fafbfb;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

.account-status-content {
Expand Down
2 changes: 1 addition & 1 deletion dapp-oeth/src/components/buySell/BalanceHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const BalanceHeader = ({
setBalanceEmphasised(false)
},
// non even duration number so more of the decimals in oethBalance animate
duration: 1985,
duration: 0,
id: 'header-balance-ousd-animation',
stepTime: 30,
})
Expand Down
5 changes: 3 additions & 2 deletions dapp-oeth/src/components/buySell/SettingsDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ const SettingsDropdown = ({ setPriceToleranceValue, priceToleranceValue }) => {
const newOpenState = !settingsOpen
setSettingsOpen(newOpenState)
if (!settingsOpen) {
event({
'event': 'open_settings'
event({
event: 'open_settings',
})
}
}}
Expand All @@ -121,6 +121,7 @@ const SettingsDropdown = ({ setPriceToleranceValue, priceToleranceValue }) => {
border: solid 1px #141519;
background-color: #1e1f25;
color: #fafbfb;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

.settings-icon {
Expand Down
Loading