Skip to content

Commit

Permalink
simplify redirect, add SEO tags, move svgs from js to separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
JMatej authored and refi93 committed Dec 12, 2018
1 parent 4e85730 commit 0688a56
Show file tree
Hide file tree
Showing 25 changed files with 395 additions and 331 deletions.
549 changes: 278 additions & 271 deletions about/index.html

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions app/frontend/components/common/addressDetailDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const actions = require('../../actions')
const Tooltip = require('./tooltip')
const Modal = require('./modal')
const CopyOnClick = require('./copyOnClick')
const {LinkIcon} = require('./svg')

class AddressDetailDialogClass extends Component {
componentDidUpdate() {
Expand Down Expand Up @@ -92,7 +91,7 @@ class AddressDetailDialogClass extends Component {
}
},
},
h(LinkIcon)
h('img', {src: 'assets/link-icon.svg'})
)
)
)
Expand Down
9 changes: 6 additions & 3 deletions app/frontend/components/common/balance.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const {h} = require('preact')
const printAda = require('../../helpers/printAda')
const printConversionRates = require('../../helpers/printConversionRates')
const {AdaIcon, RefreshIcon} = require('./svg')

const truncatePrintAda = (amount, maxDigits) => {
const amountString = amount.toString()
Expand Down Expand Up @@ -37,8 +36,12 @@ const Balance = ({balance, reloadWalletInfo, conversionRates}) =>
{class: 'narrow-screen-only'},
isNaN(Number(balance)) ? balance : `${truncatePrintAda(printAda(balance), 10)}`
),
h(AdaIcon, {className: 'ada-sign-big'}),
h('button', {class: 'button button--refresh', onClick: reloadWalletInfo}, h(RefreshIcon))
h('img', {src: 'assets/ada-icon.svg', className: 'ada-sign-big'}),
h(
'button',
{class: 'button button--refresh', onClick: reloadWalletInfo},
h('img', {src: 'assets/refresh-icon.svg'})
)
),
conversionRates &&
h(
Expand Down
3 changes: 1 addition & 2 deletions app/frontend/components/common/copyOnClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const {h, Component} = require('preact')

const debugLog = require('../../helpers/debugLog')
const Tooltip = require('./tooltip')
const CopyIcon = require('../common/svg').CopyIcon

class CopyOnClick extends Component {
constructor(props) {
Expand Down Expand Up @@ -54,7 +53,7 @@ class CopyOnClick extends Component {
tabIndex,
ref: copyBtnRef,
},
h(CopyIcon)
h('img', {src: 'assets/copy-icon.svg'})
)
)
}
Expand Down
7 changes: 5 additions & 2 deletions app/frontend/components/common/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const {
ETH_DONATION_ADDRESS,
ADA_DONATION_ADDRESS,
} = require('../../wallet/constants')
const {VacuumlabsLogo} = require('./svg')

const showRatesOn = ['/txHistory', '/send']

Expand All @@ -25,7 +24,11 @@ const Footer = connect(
'p',
undefined,
h('span', {class: 'footer-text-before-logo'}, 'Developed by '),
h('a', {href: 'https://vacuumlabs.com', target: '_blank'}, h(VacuumlabsLogo))
h(
'a',
{href: 'https://vacuumlabs.com', target: '_blank'},
h('img', {src: 'assets/vacuumlabs-logo.svg'})
)
),
h(
'p',
Expand Down
7 changes: 5 additions & 2 deletions app/frontend/components/common/modal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const {h} = require('preact')
const {CloseIcon} = require('./svg')

const Modal = ({children, closeHandler, bodyClass = ''}) =>
h(
Expand All @@ -19,7 +18,11 @@ const Modal = ({children, closeHandler, bodyClass = ''}) =>
e.key === 'Escape' && closeHandler()
},
},
h('span', {class: 'modal-close-button', onClick: closeHandler}, h(CloseIcon)),
h(
'span',
{class: 'modal-close-button', onClick: closeHandler},
h('img', {src: 'assets/close-icon.svg'})
),
children
)
)
Expand Down
9 changes: 4 additions & 5 deletions app/frontend/components/common/navbar/navbarAuth.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const {h} = require('preact')
const connect = require('unistore/preact').connect
const actions = require('../../../actions')
const {ExitIcon, AdaLiteLogo, MenuIcon} = require('../svg')
const APP_VERSION = require('../../../config').ADALITE_CONFIG.ADALITE_APP_VERSION

const LoginStatus = connect(
Expand All @@ -19,7 +18,7 @@ const LoginStatus = connect(
h(
'div',
{class: 'button', onClick: () => setTimeout(logout, 100)},
h(ExitIcon),
h('img', {src: 'assets/exit-icon.svg'}),
h('div', {class: 'status-icon-button-content'}, 'Logout')
)
)
Expand Down Expand Up @@ -51,7 +50,7 @@ const NavbarAuth = connect(
class: 'title',
onClick: () => window.history.pushState({}, 'txHistory', 'txHistory'),
},
h(AdaLiteLogo)
h('img', {src: 'assets/adalite-logo.svg', alt: 'AdaLite - Cardano Wallet'})
),
isDemoWallet ? h('div', {class: 'public-wallet-badge pulse'}, 'DEMO WALLET') : null,
h('div', {class: 'logo-version-number'}, APP_VERSION),
Expand All @@ -67,14 +66,14 @@ const NavbarAuth = connect(
h(
'div',
{class: 'button', onClick: () => setTimeout(logout, 100)},
h(ExitIcon),
h('img', {src: 'assets/exit-icon.svg'}),
h('div', {class: 'status-icon-button-content'}, 'Logout')
)
),
h(
'label',
{class: 'navcollapse-label', for: 'navcollapse'},
h('a', {class: 'menu-btn'}, h(MenuIcon))
h('a', {class: 'menu-btn'}, h('img', {src: 'assets/menu-icon.svg'}))
)
)
),
Expand Down
7 changes: 5 additions & 2 deletions app/frontend/components/common/navbar/navbarUnauth.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const {h} = require('preact')
const {AdaLiteLogo} = require('../svg')
const APP_VERSION = require('../../../config').ADALITE_CONFIG.ADALITE_APP_VERSION

const NavbarUnauth = () =>
Expand All @@ -9,7 +8,11 @@ const NavbarUnauth = () =>
h(
'div',
{class: 'navbar-wrap-unauth'},
h('a', {class: 'title', href: '/'}, h(AdaLiteLogo)),
h(
'a',
{class: 'title', href: '/'},
h('img', {src: 'assets/adalite-logo.svg', alt: 'AdaLite - Cardano Wallet'})
),
h('div', {class: 'logo-version-number'}, APP_VERSION),
h(
'span',
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/components/pages/login/loginPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class LoginPage extends Component {
h(
'div',
undefined,
h('h1', {class: 'intro-header'}, 'Access Cardano Wallet via'),
h('h2', {class: 'intro-header'}, 'Access Cardano Wallet via'),
h(
'ul',
{class: 'tab-row'},
Expand Down
3 changes: 1 addition & 2 deletions app/frontend/components/pages/receiveAda/addressContainer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const {h} = require('preact')
const connect = require('unistore/preact').connect
const actions = require('../../../actions')
const DetailIcon = require('../../common/svg').DetailIcon

const Tooltip = require('../../common/tooltip')

Expand All @@ -28,7 +27,7 @@ const AddressContainer = connect(
class: 'show-address-detail margin-top-s',
onClick: () => openAddressDetail({address, bip32path}),
},
h(DetailIcon)
h('img', {src: 'assets/detail-icon.svg'})
)
)
)
Expand Down
17 changes: 14 additions & 3 deletions app/frontend/components/pages/txHistory/transactionHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const {h} = require('preact')
const printAda = require('../../../helpers/printAda')
const printConversionRates = require('../../../helpers/printConversionRates')
const formatDate = require('../../../helpers/formatDate')
const AdaIcon = require('../../common/svg').AdaIcon
const Tooltip = require('../../common/tooltip')

const PrettyValue = ({effect}) => {
Expand Down Expand Up @@ -46,8 +45,20 @@ const TransactionHistory = ({transactionHistory, conversionRates}) =>
'tr',
undefined,
h('th', undefined, 'Time'),
h('th', undefined, 'Movement (', h(AdaIcon, {className: 'ada-sign-inline'}), ')'),
h('th', undefined, 'Fee (', h(AdaIcon, {className: 'ada-sign-inline'}), ')'),
h(
'th',
undefined,
'Movement (',
h('img', {src: 'assets/ada-icon.svg', className: 'ada-sign-inline'}),
')'
),
h(
'th',
undefined,
'Fee (',
h('img', {src: 'assets/ada-icon.svg', className: 'ada-sign-inline'}),
')'
),
h('th', undefined, 'Transaction')
)
),
Expand Down
3 changes: 3 additions & 0 deletions app/public/assets/ada-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/public/assets/adalite-logo.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 app/public/assets/close-icon.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 app/public/assets/copy-icon.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 app/public/assets/detail-icon.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 app/public/assets/download-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/public/assets/exit-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/public/assets/link-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0688a56

Please sign in to comment.