From f7b4c9621fde7840fcdc0583c3cfde97b5e81cd8 Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 28 Mar 2018 14:42:58 -0700 Subject: ui - css - use relative path for fonts --- ui/app/css/itcss/settings/typography.scss | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'ui') diff --git a/ui/app/css/itcss/settings/typography.scss b/ui/app/css/itcss/settings/typography.scss index 8a56d9c6c..18c444c8a 100644 --- a/ui/app/css/itcss/settings/typography.scss +++ b/ui/app/css/itcss/settings/typography.scss @@ -1,4 +1,4 @@ -@import url('/fonts/Font_Awesome/font-awesome.min.css'); +@import url('./fonts/Font_Awesome/font-awesome.min.css'); @font-face { font-family: 'Roboto'; @@ -338,8 +338,8 @@ @font-face { font-family: 'Montserrat Regular'; - src: url('/fonts/Montserrat/Montserrat-Regular.woff') format('woff'); - src: url('/fonts/Montserrat/Montserrat-Regular.ttf') format('truetype'); + src: url('./fonts/Montserrat/Montserrat-Regular.woff') format('woff'); + src: url('./fonts/Montserrat/Montserrat-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-size: 'small'; @@ -347,59 +347,59 @@ @font-face { font-family: 'Montserrat Bold'; - src: url('/fonts/Montserrat/Montserrat-Bold.woff') format('woff'); - src: url('/fonts/Montserrat/Montserrat-Bold.ttf') format('truetype'); + src: url('./fonts/Montserrat/Montserrat-Bold.woff') format('woff'); + src: url('./fonts/Montserrat/Montserrat-Bold.ttf') format('truetype'); font-weight: 400; font-style: normal; } @font-face { font-family: 'Montserrat Light'; - src: url('/fonts/Montserrat/Montserrat-Light.woff') format('woff'); - src: url('/fonts/Montserrat/Montserrat-Light.ttf') format('truetype'); + src: url('./fonts/Montserrat/Montserrat-Light.woff') format('woff'); + src: url('./fonts/Montserrat/Montserrat-Light.ttf') format('truetype'); font-weight: 400; font-style: normal; } @font-face { font-family: 'Montserrat UltraLight'; - src: url('/fonts/Montserrat/Montserrat-UltraLight.woff') format('woff'); - src: url('/fonts/Montserrat/Montserrat-UltraLight.ttf') format('truetype'); + src: url('./fonts/Montserrat/Montserrat-UltraLight.woff') format('woff'); + src: url('./fonts/Montserrat/Montserrat-UltraLight.ttf') format('truetype'); font-weight: 400; font-style: normal; } @font-face { font-family: 'DIN OT'; - src: url('/fonts/DIN_OT/DINOT-2.otf') format('opentype'); + src: url('./fonts/DIN_OT/DINOT-2.otf') format('opentype'); font-weight: 400; font-style: normal; } @font-face { font-family: 'DIN OT Light'; - src: url('/fonts/DIN_OT/DINOT-2.otf') format('opentype'); + src: url('./fonts/DIN_OT/DINOT-2.otf') format('opentype'); font-weight: 200; font-style: normal; } @font-face { font-family: 'DIN NEXT'; - src: url('/fonts/DIN Next/DIN Next W01 Regular.otf') format('opentype'); + src: url('./fonts/DIN Next/DIN Next W01 Regular.otf') format('opentype'); font-weight: 400; font-style: normal; } @font-face { font-family: 'DIN NEXT Light'; - src: url('/fonts/DIN Next/DIN Next W10 Light.otf') format('opentype'); + src: url('./fonts/DIN Next/DIN Next W10 Light.otf') format('opentype'); font-weight: 400; font-style: normal; } @font-face { font-family: 'Lato'; - src: url('/fonts/Lato/Lato-Regular.ttf') format('truetype'); + src: url('./fonts/Lato/Lato-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; } -- cgit v1.2.3 From 8760dc6bdac3e20a426853bc3f26b4b74a7bde95 Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 28 Mar 2018 21:53:08 -0700 Subject: ui - use relative url for i18n-helper fetching locales --- ui/i18n-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/i18n-helper.js b/ui/i18n-helper.js index 3ce24ddfb..db2fd2dc4 100644 --- a/ui/i18n-helper.js +++ b/ui/i18n-helper.js @@ -27,7 +27,7 @@ const getMessage = (locale, key, substitutions) => { function fetchLocale (localeName) { return new Promise((resolve, reject) => { - return fetch(`/_locales/${localeName}/messages.json`) + return fetch(`./_locales/${localeName}/messages.json`) .then(response => response.json()) .then( locale => resolve(locale), -- cgit v1.2.3 From cf82e766d4c08ee874e0c077d73186b5b134669f Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 28 Mar 2018 22:21:49 -0700 Subject: ui - fix relative url for deposit-ether-modal --- ui/app/components/modals/deposit-ether-modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/components/modals/deposit-ether-modal.js b/ui/app/components/modals/deposit-ether-modal.js index e38899d04..5af484af1 100644 --- a/ui/app/components/modals/deposit-ether-modal.js +++ b/ui/app/components/modals/deposit-ether-modal.js @@ -144,7 +144,7 @@ DepositEtherModal.prototype.render = function () { this.renderRow({ logo: h('img.deposit-ether-modal__logo', { - src: '../../../images/deposit-eth.svg', + src: './images/deposit-eth.svg', }), title: DIRECT_DEPOSIT_ROW_TITLE, text: DIRECT_DEPOSIT_ROW_TEXT, -- cgit v1.2.3 From 10609493c5a23a930dd8f7bda0435e576fd24815 Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 28 Mar 2018 22:30:35 -0700 Subject: ui - use relative location for images --- ui/app/app.js | 2 +- ui/app/components/modals/deposit-ether-modal.js | 4 ++-- ui/app/components/sender-to-recipient.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index d23238bab..d658cf809 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -288,7 +288,7 @@ App.prototype.renderAppBar = function () { h('img.metafox-icon', { height: 42, width: 42, - src: '/images/metamask-fox.svg', + src: './images/metamask-fox.svg', }), // metamask name diff --git a/ui/app/components/modals/deposit-ether-modal.js b/ui/app/components/modals/deposit-ether-modal.js index 5af484af1..30be1d450 100644 --- a/ui/app/components/modals/deposit-ether-modal.js +++ b/ui/app/components/modals/deposit-ether-modal.js @@ -165,7 +165,7 @@ DepositEtherModal.prototype.render = function () { this.renderRow({ logo: h('div.deposit-ether-modal__logo', { style: { - backgroundImage: 'url(\'../../../images/coinbase logo.png\')', + backgroundImage: 'url(\'./images/coinbase logo.png\')', height: '40px', }, }), @@ -179,7 +179,7 @@ DepositEtherModal.prototype.render = function () { this.renderRow({ logo: h('div.deposit-ether-modal__logo', { style: { - backgroundImage: 'url(\'../../../images/shapeshift logo.png\')', + backgroundImage: 'url(\'./images/shapeshift logo.png\')', }, }), title: SHAPESHIFT_ROW_TITLE, diff --git a/ui/app/components/sender-to-recipient.js b/ui/app/components/sender-to-recipient.js index 4c3881668..299616612 100644 --- a/ui/app/components/sender-to-recipient.js +++ b/ui/app/components/sender-to-recipient.js @@ -46,7 +46,7 @@ class SenderToRecipient extends Component { h('img', { height: 15, width: 15, - src: '/images/arrow-right.svg', + src: './images/arrow-right.svg', }), ]), ]), -- cgit v1.2.3 From f9b680b09f3de33865371bb8430f1d62b5b19a1c Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 28 Mar 2018 22:39:45 -0700 Subject: ui - identicon - use relative link for ether logo --- ui/app/components/identicon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/components/identicon.js b/ui/app/components/identicon.js index 6b2a1b428..96bb89f5f 100644 --- a/ui/app/components/identicon.js +++ b/ui/app/components/identicon.js @@ -47,7 +47,7 @@ IdenticonComponent.prototype.render = function () { ) : ( h('img.balance-icon', { - src: '../images/eth_logo.svg', + src: './images/eth_logo.svg', style: { height: diameter, width: diameter, -- cgit v1.2.3 From ac4cb3444df5753da6e10f607466e232afa538a2 Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 28 Mar 2018 23:11:41 -0700 Subject: ui - add guard against unset locale --- ui/app/settings.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/settings.js b/ui/app/settings.js index 8764dcafe..171264ed4 100644 --- a/ui/app/settings.js +++ b/ui/app/settings.js @@ -108,11 +108,12 @@ class Settings extends Component { renderCurrentLocale () { const { updateCurrentLocale, currentLocale } = this.props const currentLocaleMeta = locales.find(locale => locale.code === currentLocale) + const currentLocaleName = currentLocaleMeta ? currentLocaleMeta.name || '' return h('div.settings__content-row', [ h('div.settings__content-item', [ h('span', 'Current Language'), - h('span.settings__content-description', `${currentLocaleMeta.name}`), + h('span.settings__content-description', `${currentLocaleName}`), ]), h('div.settings__content-item', [ h('div.settings__content-item-col', [ -- cgit v1.2.3 From 085e7d7dec1cdd05069db1fb7afa797c6be2f6ad Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 28 Mar 2018 23:19:07 -0700 Subject: ui - fix typo in settings --- ui/app/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/app/settings.js b/ui/app/settings.js index 171264ed4..ec24172e8 100644 --- a/ui/app/settings.js +++ b/ui/app/settings.js @@ -108,7 +108,7 @@ class Settings extends Component { renderCurrentLocale () { const { updateCurrentLocale, currentLocale } = this.props const currentLocaleMeta = locales.find(locale => locale.code === currentLocale) - const currentLocaleName = currentLocaleMeta ? currentLocaleMeta.name || '' + const currentLocaleName = currentLocaleMeta ? currentLocaleMeta.name : '' return h('div.settings__content-row', [ h('div.settings__content-item', [ -- cgit v1.2.3