Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

refactor font-awesome to use react font awesome individual imports, various revisions, removed code, and style changes related to the refactor

Ed Plato5dd98ec43d0a
diff --git a/config/default/common/config/wv.json/projections/ui.json b/config/default/common/config/wv.json/projections/ui.json
index 412109296..588baeb24 100644
--- a/config/default/common/config/wv.json/projections/ui.json
+++ b/config/default/common/config/wv.json/projections/ui.json
@@ -4,17 +4,17 @@
{
"id": "arctic",
"name": "Arctic",
- "style": "fa fa-arrow-circle-up fa-fw"
+ "style": "faArrowCircleUp"
},
{
"id": "geographic",
"name": "Geographic",
- "style": "fa fa-circle fa-fw"
+ "style": "faCircle"
},
{
"id": "antarctic",
"name": "Antarctic",
- "style": "fa fa-arrow-circle-down fa-fw"
+ "style": "faArrowCircleDown"
}
]
}
diff --git a/package-lock.json b/package-lock.json
index 465d5a406..7d78a24a1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2853,10 +2853,50 @@
}
}
},
- "@fortawesome/fontawesome-free": {
- "version": "5.11.2",
- "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.11.2.tgz",
- "integrity": "sha512-XiUPoS79r1G7PcpnNtq85TJ7inJWe0v+b5oZJZKb0pGHNIV6+UiNeQWiFGmuQ0aj7GEhnD/v9iqxIsjuRKtEnQ=="
+ "@fortawesome/fontawesome-common-types": {
+ "version": "0.2.27",
+ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.27.tgz",
+ "integrity": "sha512-97GaByGaXDGMkzcJX7VmR/jRJd8h1mfhtA7RsxDBN61GnWE/PPCZhOdwG/8OZYktiRUF0CvFOr+VgRkJrt6TWg=="
+ },
+ "@fortawesome/fontawesome-svg-core": {
+ "version": "1.2.27",
+ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.27.tgz",
+ "integrity": "sha512-sOD3DKynocnHYpuw2sLPnTunDj7rLk91LYhi2axUYwuGe9cPCw7Bsu9EWtVdNJP+IYgTCZIbyARKXuy5K/nv+Q==",
+ "requires": {
+ "@fortawesome/fontawesome-common-types": "^0.2.27"
+ }
+ },
+ "@fortawesome/free-brands-svg-icons": {
+ "version": "5.12.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-5.12.1.tgz",
+ "integrity": "sha512-IYUYcgGsQuwiIHjRGfeSTCIQKUSZMb6FsV6mDj78K0D+YzGJkM4cvEBBUMHtnla5D2HCxncMI/9JX5YIk2GHeQ==",
+ "requires": {
+ "@fortawesome/fontawesome-common-types": "^0.2.27"
+ }
+ },
+ "@fortawesome/free-regular-svg-icons": {
+ "version": "5.12.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.12.1.tgz",
+ "integrity": "sha512-bGda18seHXb+24K6DPUFzqn4kG7B+JViP/BscMcNUXvT00M86xNhdgP2TXSdflQXn53QWqymKjx/8rhaDOJyhA==",
+ "requires": {
+ "@fortawesome/fontawesome-common-types": "^0.2.27"
+ }
+ },
+ "@fortawesome/free-solid-svg-icons": {
+ "version": "5.12.1",
+ "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.12.1.tgz",
+ "integrity": "sha512-k3MwRFFUhyL4cuCJSaHDA0YNYMELDXX0h8JKtWYxO5XD3Dn+maXOMrVAAiNGooUyM2v/wz/TOaM0jxYVKeXX7g==",
+ "requires": {
+ "@fortawesome/fontawesome-common-types": "^0.2.27"
+ }
+ },
+ "@fortawesome/react-fontawesome": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.8.tgz",
+ "integrity": "sha512-I5h9YQg/ePA3Br9ISS18fcwOYmzQYDSM1ftH03/8nHkiqIVHtUyQBw482+60dnzvlr82gHt3mGm+nDUp159FCw==",
+ "requires": {
+ "prop-types": "^15.5.10"
+ }
},
"@istanbuljs/load-nyc-config": {
"version": "1.0.0",
diff --git a/package.json b/package.json
index d99817ab6..8688d4782 100644
--- a/package.json
+++ b/package.json
@@ -156,7 +156,11 @@
},
"dependencies": {
"@entryline/gifstream": "^1.2.0",
- "@fortawesome/fontawesome-free": "^5.11.2",
+ "@fortawesome/fontawesome-svg-core": "^1.2.27",
+ "@fortawesome/free-brands-svg-icons": "^5.12.1",
+ "@fortawesome/free-regular-svg-icons": "^5.12.1",
+ "@fortawesome/free-solid-svg-icons": "^5.12.1",
+ "@fortawesome/react-fontawesome": "^0.1.8",
"bluebird": "3.7.2",
"bootstrap": "4.4.1",
"cachai": "^1.0.2",
diff --git a/web/css/anim.widget.css b/web/css/anim.widget.css
index 0ca1aef1d..954e05622 100644
--- a/web/css/anim.widget.css
+++ b/web/css/anim.widget.css
@@ -99,7 +99,7 @@
position: relative;
width: 152px;
}
- & i.fa {
+ & svg.svg-inline--fa {
position: absolute;
&.wv-close {
top: 9px;
diff --git a/web/css/compare.css b/web/css/compare.css
index f451f479c..9e1a0c396 100644
--- a/web/css/compare.css
+++ b/web/css/compare.css
@@ -34,7 +34,7 @@
.ab-swipe-dragger:hover {
transform: scale(1.2);
}
-.ab-swipe-dragger i {
+.ab-swipe-dragger svg.svg-inline--fa {
font-size: 26px;
margin-top: 11px;
}
diff --git a/web/css/dataDownload.css b/web/css/dataDownload.css
index e5f26b08c..02a5ea208 100644
--- a/web/css/dataDownload.css
+++ b/web/css/dataDownload.css
@@ -136,7 +136,6 @@ ul.BulkDownload li a.link {
font-size: 15px;
font-weight: 700;
margin: 0 0 10px;
- color: #fffbe7;
}
#wv-data-bulk-download-links li {
@@ -159,16 +158,12 @@ ul.BulkDownload li a.link {
padding: 5px;
}
-#wv-data-selection-notice .icon {
- color: #fffbe7;
- width: 32px;
- height: 32px;
+#wv-data-selection-notice svg.svg-inline--fa {
float: left;
}
#wv-data-selection-notice .text {
margin-left: 47px;
- color: #fffbe7;
}
#wv-data-list table {
diff --git a/web/css/layers.css b/web/css/layers.css
index 22af72d2f..99c79ab16 100644
--- a/web/css/layers.css
+++ b/web/css/layers.css
@@ -383,7 +383,7 @@
}
}
-.search-row .layers-all-header .fa {
+.search-row .layers-all-header svg.svg-inline--fa {
position: absolute;
color: #ddd;
font-size: 18px;
@@ -391,12 +391,12 @@
right: 0;
top: 0;
}
-.selected .fa {
+.selected svg.svg-inline--fa {
color: #888;
transition: color 250ms linear;
}
-.layers-all-layer .fa:hover {
+.layers-all-layer svg.svg-inline--fa:hover {
cursor: pointer;
}
@@ -553,7 +553,10 @@
}
}
&.unavailable {
- & .fa {
+ &:hover {
+ background: #3a3a3a;
+ }
+ & svg.svg-inline--fa {
display: inline;
color: #999;
margin: 0 0 0 2px;
@@ -955,7 +958,7 @@
padding: 2px;
}
}
- & .fa {
+ & svg.svg-inline--fa {
color: #eee;
padding: 2px;
margin-left: 6px;
@@ -994,7 +997,7 @@
.no-results {
text-align: center;
margin-top: 40px;
- & .fa, .fas {
+ & svg.svg-inline--fa {
color: #777;
font-size: 100px;
}
@@ -1088,7 +1091,7 @@
border: none;
font-size: 20px;
}
- & .close-details .fa {
+ & .close-details svg.svg-inline--fa {
color: #666;
}
}
@@ -1104,7 +1107,7 @@
border-color: #b55a3c;
border-width: 2px;
color: #333;
- .fa {
+ svg.svg-inline--fa {
margin-right: 10px;
}
&:hover:not(.is-active) {
diff --git a/web/css/link.css b/web/css/link.css
index 9ac06bb87..d15879246 100644
--- a/web/css/link.css
+++ b/web/css/link.css
@@ -120,28 +120,24 @@
height: 48px;
line-height: 48px;
width: 48px;
- font-size: 24px;
+ font-size: 26px;
text-align: center;
cursor: pointer;
text-decoration: none;
}
-.social-share .facebook {
+.social-share .social-icon-container-facebook {
background-color: #3b5998;
}
-.social-share .twitter {
+.social-share .social-icon-container-twitter {
background-color: #00aced;
}
-.social-share .reddit {
+.social-share .social-icon-container-reddit-alien {
background-color: #ff5700;
}
-.social-share .fa-google-plus {
- background-color: #d34836;
-}
-
-.social-share .email {
+.social-share .social-icon-container-email {
background-color: #505050;
}
diff --git a/web/css/list.css b/web/css/list.css
index c4443938f..972878eca 100644
--- a/web/css/list.css
+++ b/web/css/list.css
@@ -11,7 +11,7 @@
background: #eee;
color: #282828;
}
-.list-group-item i {
+.list-group-item svg.svg-inline--fa {
margin-right: 6px;
line-height: 1.5;
}
diff --git a/web/css/map.css b/web/css/map.css
index efe0b180d..a03251318 100644
--- a/web/css/map.css
+++ b/web/css/map.css
@@ -21,14 +21,15 @@
pointer-events: none;
}
-.wv-map-zoom.ui-button-click-prevent i {
+.wv-map-zoom.ui-button-click-prevent svg.svg-inline--fa {
opacity: 0.4;
}
-.wv-map-zoom i {
- padding: 15px 14px;
+.wv-map-zoom svg.svg-inline--fa {
display: block;
- line-height: normal;
+ width: 40px;
+ padding: 14px;
+ height: 45px;
}
.wv-map-zoom:hover {
diff --git a/web/css/mobile.css b/web/css/mobile.css
index e82aebf5b..df783c2f7 100644
--- a/web/css/mobile.css
+++ b/web/css/mobile.css
@@ -51,7 +51,7 @@
background-image: none;
border-radius: 5px;
top: 58px;
- & .fa {
+ & svg.svg-inline--fa {
font-size: 33px;
position: absolute;
left: 10px;
diff --git a/web/css/sidebar-panel.css b/web/css/sidebar-panel.css
index 55d110d27..8dfd946d0 100644
--- a/web/css/sidebar-panel.css
+++ b/web/css/sidebar-panel.css
@@ -147,22 +147,6 @@ a.atexpand {
right: -6px;
}
-.sidebar-panel li.item a {
- color: #22a;
-}
-
-.sidebar-panel li.item a:hover {
- color: #88f;
-}
-
-#selectorboxcontent a {
- color: #22a;
-}
-
-#selectorboxcontent a:hover {
- color: #88f;
-}
-
.sidebar-panel li.item h4,
.inmotion h4 {
font-size: 0.9em;
@@ -270,10 +254,10 @@ li.item.productsitem.inmotion,
margin-top: -10px;
font-size: 18px;
}
-.productsitem i {
+.productsitem svg.svg-inline--fa {
color: #333;
}
-.layer-hidden i {
+.layer-hidden svg.svg-inline--fa {
color: #c5c5c8;
}
.productsitem .hdanchor:hover .layer-eye-icon {
@@ -298,17 +282,16 @@ li.item.productsitem.inmotion,
}
.wv-layers-info-icon {
- font-size: 9px;
- border: 1px solid #333;
- width: 14px;
+ border: thin solid #333;
+ width: 1.1em !important;
height: 14px;
text-align: center;
border-radius: 50%;
- padding-top: 1px;
+ padding: 1px;
margin-top: 3px;
}
-.layer-info i.wv-layers-options-icon {
+.layer-info svg.svg-inline--fa.wv-layers-options-icon {
width: 12px;
height: 12px;
position: absolute;
@@ -318,11 +301,11 @@ li.item.productsitem.inmotion,
margin-left: -6px;
}
-.productsitem.layer-hidden a.wv-layers-options i.wv-layers-options-icon {
+.productsitem.layer-hidden a.wv-layers-options svg.svg-inline--fa.wv-layers-options-icon {
background-position: -21px -69px;
}
-.productsitem.layer-hidden a.wv-layers-options:hover i.wv-layers-options-icon {
+.productsitem.layer-hidden a.wv-layers-options:hover svg.svg-inline--fa.wv-layers-options-icon {
background-position: 0 -69px;
}
@@ -365,16 +348,15 @@ li.item.productsitem.inmotion,
cursor: pointer;
}
-.productsitem a.button.wv-layers-close i {
+.productsitem a.button.wv-layers-close svg.svg-inline--fa {
width: 12px;
- height: 12px;
pointer-events: none;
position: absolute;
top: 50%;
margin-top: -7px;
left: 50%;
font-size: 14px;
- margin-left: -5px;
+ margin-left: -7px;
}
.productsitem {
@@ -433,6 +415,6 @@ li.item.productsitem.inmotion,
cursor: default;
}
-.productsitem.disabled.layer-hidden a.hdanchor:hover i {
+.productsitem.disabled.layer-hidden a.hdanchor:hover svg.svg-inline--fa {
color: #c5c5c8;
}
diff --git a/web/css/switch.css b/web/css/switch.css
index ab28c2997..11121d13f 100644
--- a/web/css/switch.css
+++ b/web/css/switch.css
@@ -12,7 +12,7 @@
}
.react-switch-label-case {
width: 80%;
- .fa {
+ svg.svg-inline--fa {
margin-left: 5px;
}
}
diff --git a/web/css/timeline.css b/web/css/timeline.css
index 8876a95d6..92376ac19 100644
--- a/web/css/timeline.css
+++ b/web/css/timeline.css
@@ -21,6 +21,7 @@ button:focus {
}
#timeline-header {
+ position: relative;
margin-top: 2px;
min-width: 310px;
display: inline-block;
@@ -161,12 +162,13 @@ button:focus {
}
& .button-action-group svg {
position: absolute;
+ }
+ & #zoom-buttons-group .button-action-group svg {
top: 50%;
margin-top: -15px;
left: 50%;
margin-left: -12px;
}
-
& #left-arrow-group {
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
@@ -193,17 +195,15 @@ button:focus {
}
& .animate-button {
- margin: 10px 0 0 10px;
+ position: absolute;
height: 40px;
- width: 40px;
+ width: 50px;
+ top: 18px;
+ right: 15px;
+ padding-left: 3px;
}
- & .animate-button .wv-animate {
- color: #fff;
- font-size: 2.5em;
- margin: 5px 0 0 2px;
- }
- & .animate-button:hover .wv-animate {
- color: #1a1a1a;
+ & .animate-button:hover svg.wv-animate path {
+ fill: #1a1a1a;
}
& .animate-button.wv-disabled-button {
cursor: auto;
@@ -352,13 +352,13 @@ button:focus {
}
}
-.custom-interval-widget i.wv-close {
+.custom-interval-widget svg.svg-inline--fa {
position: absolute;
top: 5px;
right: 5px;
}
-.custom-interval-widget i.wv-close:hover {
+.custom-interval-widget svg.svg-inline--fa.wv-close:hover {
color: #999;
cursor: pointer;
}
diff --git a/web/js/app.js b/web/js/app.js
index c05aee723..c715bbb6c 100644
--- a/web/js/app.js
+++ b/web/js/app.js
@@ -26,16 +26,15 @@ import ErrorBoundary from './containers/error-boundary';
import Debug from './components/util/debug';
// Dependency CSS
-import '../../node_modules/bootstrap/dist/css/bootstrap.css';
-import '../../node_modules/jquery-ui-bundle/jquery-ui.structure.css';
-import '../../node_modules/jquery-ui-bundle/jquery-ui.theme.css';
+import '../../node_modules/bootstrap/dist/css/bootstrap.min.css';
+import '../../node_modules/jquery-ui-bundle/jquery-ui.structure.min.css';
+import '../../node_modules/jquery-ui-bundle/jquery-ui.theme.min.css';
import '../../node_modules/icheck/skins/square/grey.css';
import '../../node_modules/icheck/skins/square/red.css';
import '../../node_modules/icheck/skins/line/red.css';
import '../../node_modules/ol/ol.css';
-import '../../node_modules/rc-slider/dist/rc-slider.css';
-import '../../node_modules/simplebar/dist/simplebar.css';
-import '../../node_modules/@fortawesome/fontawesome-free/css/all.css';
+import '../../node_modules/rc-slider/dist/rc-slider.min.css';
+import '../../node_modules/simplebar/dist/simplebar.min.css';
import 'react-image-crop/dist/ReactCrop.css';
import 'react-resizable/css/styles.css';
// App CSS
diff --git a/web/js/components/animation-widget/gif-panel-grid.js b/web/js/components/animation-widget/gif-panel-grid.js
index 5dc950e8f..5aa429744 100644
--- a/web/js/components/animation-widget/gif-panel-grid.js
+++ b/web/js/components/animation-widget/gif-panel-grid.js
@@ -1,5 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
+
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faTimes } from '@fortawesome/free-solid-svg-icons';
+
/*
* A table that updates with image
* data
@@ -14,7 +18,7 @@ export class GifPanelGrid extends React.Component {
if (!this.props.valid) {
return (
<div id="gif-size" className="gif-size gif-size-invalid grid-child">
- <i className="fa fa-times fa-fw" />
+ <FontAwesomeIcon icon={faTimes} fixedWidth />
<span>{this.props.maxGifSize + ' MB' + '~' + roundedSize + ' MB'}</span>
</div>
);
diff --git a/web/js/components/animation-widget/loop-button.js b/web/js/components/animation-widget/loop-button.js
index d3df312eb..381917edd 100644
--- a/web/js/components/animation-widget/loop-button.js
+++ b/web/js/components/animation-widget/loop-button.js
@@ -1,6 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faRetweet } from '@fortawesome/free-solid-svg-icons';
+
/*
* @class LoopButton
* @extends React.Component
@@ -17,7 +20,7 @@ class LoopButton extends React.Component {
}
onClick={this.props.onLoop}
>
- <i className="fa fa-retweet wv-animation-widget-icon" />
+ <FontAwesomeIcon icon={faRetweet} className="wv-animation-widget-icon" />
</a>
);
}
diff --git a/web/js/components/animation-widget/play-button.js b/web/js/components/animation-widget/play-button.js
index 04f0cc07c..1a0809711 100644
--- a/web/js/components/animation-widget/play-button.js
+++ b/web/js/components/animation-widget/play-button.js
@@ -1,6 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faPause, faPlay } from '@fortawesome/free-solid-svg-icons';
+
/*
* @class PlayButton
* @extends React.Component
@@ -13,13 +16,10 @@ class PlayButton extends React.Component {
className="wv-anim-play-case wv-icon-case"
onClick={this.props.playing ? this.props.pause : this.props.play}
>
- <i
- className={
- this.props.playing
- ? 'fa fa-pause wv-animation-widget-icon'
- : 'fa fa-play wv-animation-widget-icon'
- }
- />
+ {this.props.playing
+ ? <FontAwesomeIcon icon={faPause} className="wv-animation-widget-icon" />
+ : <FontAwesomeIcon icon={faPlay} className="wv-animation-widget-icon" />
+ }
</a>
);
}
diff --git a/web/js/components/feature-alert/alert.js b/web/js/components/feature-alert/alert.js
index 07e15d5eb..6049b477e 100644
--- a/web/js/components/feature-alert/alert.js
+++ b/web/js/components/feature-alert/alert.js
@@ -27,7 +27,7 @@ class FeaturedAlert extends React.Component {
// <AlertUtil
// id={'geostationary-alert'}
// isOpen={showAlert}
- // iconClassName='fa fa-layer-group fa-fw'
+ // iconClassName='faLayerGroup'
// onClick={this.props.showModal.bind(this)}
// onDismiss={this.dismissAlert.bind(this)}
// message="Check out our new geostationary layers!"
diff --git a/web/js/components/image-download/grid.js b/web/js/components/image-download/grid.js
index 7c27eb926..a5c2c8e3c 100644
--- a/web/js/components/image-download/grid.js
+++ b/web/js/components/image-download/grid.js
@@ -2,6 +2,9 @@ import React from 'react';
import PropTypes from 'prop-types';
import Button from '../util/button';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faTimes } from '@fortawesome/free-solid-svg-icons';
+
/*
* A table that updates with image
* data
@@ -18,7 +21,7 @@ export default class ResolutionTable extends React.Component {
id="wv-image-size"
className="wv-image-size wv-image-size-invalid grid-child"
>
- <i className="fa fa-times fa-fw" />
+ <FontAwesomeIcon icon={faTimes} fixedWidth />
<span>{'~' + size + 'MB'}</span>
</div>
);
diff --git a/web/js/components/layer/product-picker/category-layer-row.js b/web/js/components/layer/product-picker/category-layer-row.js
index d3eb8631b..46f237e63 100644
--- a/web/js/components/layer/product-picker/category-layer-row.js
+++ b/web/js/components/layer/product-picker/category-layer-row.js
@@ -13,6 +13,9 @@ import {
import MeasurementLayerRow from './measurement-layer-row';
import MeasurementMetadataDetail from './measurement-metadata-detail';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faChevronCircleDown, faChevronCircleRight } from '@fortawesome/free-solid-svg-icons';
+
/**
* A single category result row
* @class CategoryLayerRow
@@ -233,13 +236,10 @@ class CategoryLayerRow extends React.Component {
>
<h3>{measurement.title}</h3>
{measurement.subtitle && <h5>{measurement.subtitle}</h5>}
- <i
- className={
- isSelected
- ? 'fa fa-chevron-circle-down arrow-icon'
- : 'fa fa-chevron-circle-right arrow-icon'
- }
- />
+ {isSelected
+ ? <FontAwesomeIcon icon={faChevronCircleDown} className="arrow-icon" />
+ : <FontAwesomeIcon icon={faChevronCircleRight} className="arrow-icon" />
+ }
</div>
{isSelected ? this.renderContent() : ''}
</div>
diff --git a/web/js/components/layer/product-picker/header.js b/web/js/components/layer/product-picker/header.js
index 66f4c2391..12d89c648 100644
--- a/web/js/components/layer/product-picker/header.js
+++ b/web/js/components/layer/product-picker/header.js
@@ -13,6 +13,9 @@ import {
import LayerFilters from './layer-filters';
import util from '../../../util/util';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faFilter, faArrowLeft } from '@fortawesome/free-solid-svg-icons';
+
/*
* A scrollable list of layers
* @class LayerList
@@ -91,7 +94,7 @@ class ProductPickerHeader extends React.Component {
color="secondary"
onClick={this.revertToInitialScreen.bind(this)}
>
- <i className="fa fa-arrow-left" />{' '}
+ <FontAwesomeIcon icon={faArrowLeft} />
</Button>
{isBreadCrumb && BreadcrubEl}
</>
@@ -99,7 +102,7 @@ class ProductPickerHeader extends React.Component {
{isSearching && isMobile &&
<UncontrolledDropdown>
<DropdownToggle className="filter-button" caret>
- <i className="fas fa-filter"></i>
+ <FontAwesomeIcon icon={faFilter} />
</DropdownToggle>
<DropdownMenu>
<LayerFilters
diff --git a/web/js/components/layer/product-picker/layer-metadata-detail.js b/web/js/components/layer/product-picker/layer-metadata-detail.js
index 3a8d13d26..5a0d76803 100644
--- a/web/js/components/layer/product-picker/layer-metadata-detail.js
+++ b/web/js/components/layer/product-picker/layer-metadata-detail.js
@@ -4,6 +4,9 @@ import { getOrbitTrackTitle, dateOverlap } from '../../../modules/layers/util';
import util from '../../../util/util.js';
import { ListGroup, ListGroupItem, Button } from 'reactstrap';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faMinus, faPlus, faGlobeAmericas } from '@fortawesome/free-solid-svg-icons';
+
class LayerMetadataDetail extends React.Component {
constructor(props) {
super(props);
@@ -117,7 +120,7 @@ class LayerMetadataDetail extends React.Component {
if (!this.props.layer) {
return (
<div className="no-results">
- <i className="fa fa-globe-americas" aria-hidden="true"></i>
+ <FontAwesomeIcon icon={faGlobeAmericas} />
<h3> No layer selected. </h3>
<h5> Select a layer to view details here!</h5>
</div>
@@ -129,16 +132,15 @@ class LayerMetadataDetail extends React.Component {
const previewUrl = 'images/layers/previews/' + selectedProjection + '/' + layer.id + '.jpg';
const buttonText = isActive ? 'Remove Layer' : 'Add Layer';
const btnClass = isActive ? 'add-to-map-btn text-center is-active' : 'add-to-map-btn text-center';
- const btnIconClass = isActive ? 'fa fa-minus' : 'fa fa-plus';
-
+ const btnIconClass = isActive ? faMinus : faPlus;
return (
<div className="layers-all-layer">
<div className="layers-all-header">
{!track ? this.renderSplitTitle(layerTitle) : <h3>{layerTitle}</h3>}
{subtitle && <h5>{subtitle}</h5>}
- {/*
+ {/* NOTE - NEED TO ADD faChevronDown TO FONT AWESOME IMPORT ABOVE FROM '@fortawesome/free-solid-svg-icons'
<Button className="close-details" onClick={() => showMetadataForLayer(null)}>
- <i className="fa fa-chevron-down" aria-hidden="true"></i>
+ <FontAwesomeIcon icon={faChevronDown} />
</Button>
*/}
</div>
@@ -151,7 +153,7 @@ class LayerMetadataDetail extends React.Component {
}
<div className="text-center">
<Button className={btnClass} onClick={this.toggleLayer.bind(this)}>
- <i className={btnIconClass} aria-hidden="true"></i>
+ <FontAwesomeIcon icon={btnIconClass} />
{buttonText}
</Button>
</div>
diff --git a/web/js/components/layer/product-picker/measurement-layer-row.js b/web/js/components/layer/product-picker/measurement-layer-row.js
index 46e85d981..7ba3b8f0f 100644
--- a/web/js/components/layer/product-picker/measurement-layer-row.js
+++ b/web/js/components/layer/product-picker/measurement-layer-row.js
@@ -5,6 +5,8 @@ import { Checkbox } from '../../util/checkbox';
import { availableAtDate } from '../../../modules/layers/util';
import moment from 'moment';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faBan } from '@fortawesome/free-solid-svg-icons';
/*
* A scrollable list of layers
* @class LayerList
@@ -61,7 +63,7 @@ class MeasurementLayerRow extends React.Component {
>
{!layerIsAvailable &&
<>
- <i id="availability-info" className="fa fa-ban" />
+ <FontAwesomeIcon icon={faBan} id="availability-info" />
<Tooltip
placement="top"
isOpen={tooltipOpen}
diff --git a/web/js/components/layer/product-picker/measurement-metadata-detail.js b/web/js/components/layer/product-picker/measurement-metadata-detail.js
index 0da8857bf..d15cbdd38 100644
--- a/web/js/components/layer/product-picker/measurement-metadata-detail.js
+++ b/web/js/components/layer/product-picker/measurement-metadata-detail.js
@@ -2,6 +2,9 @@ import React from 'react';
import PropTypes from 'prop-types';
import util from '../../../util/util.js';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faMap, faMeteor } from '@fortawesome/free-solid-svg-icons';
+
class MeasurementMetadataDetail extends React.Component {
constructor(props) {
super(props);
@@ -79,7 +82,7 @@ class MeasurementMetadataDetail extends React.Component {
if (!isMobile && !source) {
return (
<div className="no-results">
- <i className="fa fa-map" aria-hidden="true"></i>
+ <FontAwesomeIcon icon={faMap} />
<h3> {categoryTitle} </h3>
<h5> Select a measurement to view details here!</h5>
</div>
@@ -90,7 +93,7 @@ class MeasurementMetadataDetail extends React.Component {
if (!description) {
return (
<div className="no-results">
- <i className="fa fa-meteor" aria-hidden="true"></i>
+ <FontAwesomeIcon icon={faMeteor} />
<h3> No metadata found. </h3>
</div>
);
diff --git a/web/js/components/layer/product-picker/product-picker.js b/web/js/components/layer/product-picker/product-picker.js
index b4d69817e..740396dd7 100644
--- a/web/js/components/layer/product-picker/product-picker.js
+++ b/web/js/components/layer/product-picker/product-picker.js
@@ -37,6 +37,9 @@ import {
updateListScrollTop
} from '../../../modules/product-picker/actions';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faMeteor } from '@fortawesome/free-solid-svg-icons';
+
/*
* A scrollable list of layers
* @class LayerList
@@ -372,7 +375,7 @@ class ProductPicker extends React.Component {
</>)
: (
<div className="no-results" style={{ height: listMinHeight - 45 + 'px' }}>
- <i className="fas fa-5x fa-meteor"></i>
+ <FontAwesomeIcon icon={faMeteor} size='5x' />
<h3> No layers found! </h3>
{numRowsFilteredOut > 0 &&
<p>
diff --git a/web/js/components/layer/product-picker/search-layer-row.js b/web/js/components/layer/product-picker/search-layer-row.js
index 9c457c363..c10a54e69 100644
--- a/web/js/components/layer/product-picker/search-layer-row.js
+++ b/web/js/components/layer/product-picker/search-layer-row.js
@@ -1,6 +1,10 @@
import React from 'react';
import PropTypes from 'prop-types';
import { getOrbitTrackTitle } from '../../../modules/layers/util';
+
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
+
/**
* A single layer search result row
* @class LayerRow
@@ -100,7 +104,7 @@ class LayerRow extends React.Component {
{!track ? this.renderSplitTitle(layerTitle) : <h3>{layerTitle}</h3>}
{subtitle && <h5>{subtitle}</h5>}
{description && !isMetadataShowing && (
- <i className="fa fa-info-circle" />
+ <FontAwesomeIcon icon={faInfoCircle} />
)}
</div>
</div>
diff --git a/web/js/components/measure-tool/measure-button.js b/web/js/components/measure-tool/measure-button.js
index 2dd7279f1..18028176c 100644
--- a/web/js/components/measure-tool/measure-button.js
+++ b/web/js/components/measure-tool/measure-button.js
@@ -7,6 +7,9 @@ import { openCustomContent } from '../../modules/modal/actions';
import AlertUtil from '../util/alert';
import googleTagManager from 'googleTagManager';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faRuler } from '@fortawesome/free-solid-svg-icons';
+
const MEASURE_MENU_PROPS = {
headerText: null,
type: 'toolbar',
@@ -60,7 +63,7 @@ class MeasureButton extends React.Component {
{showAlert && <AlertUtil
id={'measurement-alert'}
isOpen={true}
- iconClassName='fa fa-ruler fa-fw'
+ iconClassName='faRuler'
title='Measure Tool'
message={message}
onDismiss={this.dismissAlert}
@@ -73,7 +76,7 @@ class MeasureButton extends React.Component {
onTouchEnd={this.onButtonClick}
onMouseDown={this.onButtonClick}
>
- <i className="fas fa-ruler fa-2x"></i>{' '}
+ <FontAwesomeIcon icon={faRuler} size='2x' />
</Button>
</>
);
diff --git a/web/js/components/measure-tool/measure-menu.js b/web/js/components/measure-tool/measure-menu.js
index 78f3f5849..aebe75539 100644
--- a/web/js/components/measure-tool/measure-menu.js
+++ b/web/js/components/measure-tool/measure-menu.js
@@ -9,19 +9,22 @@ import { Form } from 'reactstrap';
const OPTIONS_ARRAY = [
{
text: 'Measure distance',
- iconClass: 'ui-icon icon-large fa fa-ruler fa-fw',
+ iconClass: 'ui-icon icon-large',
+ iconName: 'faRuler',
id: 'measure-distance-button',
key: 'measure-distance'
},
{
text: 'Measure area',
- iconClass: 'ui-icon icon-large fa fa-ruler-combined fa-fw',
+ iconClass: 'ui-icon icon-large',
+ iconName: 'faRulerCombined',
id: 'measure-area-button',
key: 'measure-area'
},
{
text: 'Remove Measurements',
- iconClass: 'ui-icon icon-large fa fa-trash fa-fw',
+ iconClass: 'ui-icon icon-large',
+ iconName: 'faTrash',
id: 'clear-measurements-button',
key: 'measure-clear'
}
diff --git a/web/js/components/notifications/notification-block.js b/web/js/components/notifications/notification-block.js
index 6d198a705..e8497a835 100644
--- a/web/js/components/notifications/notification-block.js
+++ b/web/js/components/notifications/notification-block.js
@@ -2,10 +2,18 @@ import React from 'react';
import PropTypes from 'prop-types';
import util from '../../util/util';
-const CLASS_MATCHING_OBJ = {
- alert: 'bolt',
- message: 'gift',
- outage: 'exclamation-circle'
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import {
+ faBolt,
+ faExclamationCircle,
+ faGift
+} from '@fortawesome/free-solid-svg-icons';
+
+// icons used with NotificationBlock by passing string as prop type
+const listIcons = {
+ alert: faBolt,
+ message: faGift,
+ outage: faExclamationCircle
};
class NotificationBlock extends React.Component {
@@ -26,7 +34,7 @@ class NotificationBlock extends React.Component {
return (
<li key={type + i} className={activeClass}>
<h2>
- <i className={'fa fa-' + CLASS_MATCHING_OBJ[type]} />
+ <FontAwesomeIcon icon={listIcons[type]} />
<span>{'Posted ' + date}</span>
</h2>
<p dangerouslySetInnerHTML={{ __html: notification.message }} />
diff --git a/web/js/components/sidebar/collapsed-button.js b/web/js/components/sidebar/collapsed-button.js
index 9f668d71d..45ce26a13 100644
--- a/web/js/components/sidebar/collapsed-button.js
+++ b/web/js/components/sidebar/collapsed-button.js
@@ -1,6 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faLayerGroup } from '@fortawesome/free-solid-svg-icons';
+
class CollapsedButton extends React.Component {
render() {
const {
@@ -22,7 +25,7 @@ class CollapsedButton extends React.Component {
title="Show Layer Selector"
onClick={onclick}
>
- <i className="fa fa-layer-group" aria-hidden="true"></i>
+ <FontAwesomeIcon icon={faLayerGroup} />
{isMobile
? (
<span className='layer-count mobile'>
diff --git a/web/js/components/sidebar/event.js b/web/js/components/sidebar/event.js
index 104e2cd7c..8a4406882 100644
--- a/web/js/components/sidebar/event.js
+++ b/web/js/components/sidebar/event.js
@@ -4,6 +4,9 @@ import util from '../../util/util';
import lodashFind from 'lodash/find';
import googleTagManager from 'googleTagManager';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
+
class Event extends React.Component {
constructor(props) {
super(props);
@@ -100,7 +103,7 @@ class Event extends React.Component {
e.stopPropagation();
}}
>
- <i className="fa fa-external-link-alt fa-1" />{' '}
+ <FontAwesomeIcon icon={faExternalLinkAlt} />
{' ' + source.title}
</a>
);
diff --git a/web/js/components/timeline/custom-interval-selector/interval-selector-widget.js b/web/js/components/timeline/custom-interval-selector/interval-selector-widget.js
index 046d9b48b..ace377aff 100644
--- a/web/js/components/timeline/custom-interval-selector/interval-selector-widget.js
+++ b/web/js/components/timeline/custom-interval-selector/interval-selector-widget.js
@@ -9,6 +9,9 @@ import {
import { toggleCustomModal } from '../../../modules/date/actions';
import { connect } from 'react-redux';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faTimes } from '@fortawesome/free-solid-svg-icons';
+
/*
* CustomIntervalSelectorWidget for Custom Interval Selector
* group. It is a parent component of this group.
@@ -66,7 +69,7 @@ class CustomIntervalSelectorWidget extends PureComponent {
changeZoomLevel={this.changeZoomLevel}
/>
</div>
- <i className="fa fa-times wv-close" onClick={closeModal}/>
+ <FontAwesomeIcon icon={faTimes} className="wv-close" onClick={closeModal} />
</div>
);
}
diff --git a/web/js/components/timeline/timeline-controls/animation-button.js b/web/js/components/timeline/timeline-controls/animation-button.js
index acd4fd71c..06a470038 100644
--- a/web/js/components/timeline/timeline-controls/animation-button.js
+++ b/web/js/components/timeline/timeline-controls/animation-button.js
@@ -1,6 +1,9 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faVideo } from '@fortawesome/free-solid-svg-icons';
+
class AnimationButton extends PureComponent {
render() {
const className = 'button-action-group animate-button';
@@ -12,7 +15,7 @@ class AnimationButton extends PureComponent {
title={this.props.title ? this.props.title : 'Set up animation'}
>
<div id="animate-button" onClick={this.props.clickAnimationButton}>
- <i className="fas fa-video wv-animate" />
+ <FontAwesomeIcon icon={faVideo} className='wv-animate' size='3x' />
</div>
</div>
);
diff --git a/web/js/components/toolbar/share/links.js b/web/js/components/toolbar/share/links.js
index 8b0d7dc7f..d6e7ff846 100644
--- a/web/js/components/toolbar/share/links.js
+++ b/web/js/components/toolbar/share/links.js
@@ -1,6 +1,10 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faEnvelope } from '@fortawesome/free-solid-svg-icons';
+import { faFacebookF, faTwitter, faRedditAlien } from '@fortawesome/free-brands-svg-icons';
+
class ShareLinks extends React.Component {
onClick(event, type) {
event.preventDefault();
@@ -12,32 +16,40 @@ class ShareLinks extends React.Component {
<div id="social-share" className="social-share">
<a
id="fb-share"
- className="icon-link fab facebook fa-facebook-f fa-2x"
+ className="icon-link social-icon-container-facebook"
href="#"
onClick={e => this.onClick(e, 'facebook')}
title="Share via Facebook!"
- />
+ >
+ <FontAwesomeIcon icon={faFacebookF} />
+ </a>
<a
id="tw-share"
- className="icon-link twitter fab fa-twitter fa-2x"
+ className="icon-link social-icon-container-twitter"
href="#"
onClick={e => this.onClick(e, 'twitter')}
title="Share via Twitter!"
- />
+ >
+ <FontAwesomeIcon icon={faTwitter} />
+ </a>
<a
id="rd-share"
- className="icon-link fab reddit fa-reddit-alien fa-2x"
+ className="icon-link social-icon-container-reddit-alien"
href="#"
onClick={e => this.onClick(e, 'reddit')}
title="Share via Reddit!"
- />
+ >
+ <FontAwesomeIcon icon={faRedditAlien} />
+ </a>
<a
id="email-share"
- className="icon-link email fa fa-envelope fa-2x"
+ className="icon-link social-icon-container-email"
href="#"
onClick={e => this.onClick(e, 'email')}
title="Share via Email!"
- />
+ >
+ <FontAwesomeIcon icon={faEnvelope} />
+ </a>
</div>
);
}
diff --git a/web/js/components/tour/content-intro.js b/web/js/components/tour/content-intro.js
index d71e29d23..24406639d 100644
--- a/web/js/components/tour/content-intro.js
+++ b/web/js/components/tour/content-intro.js
@@ -1,13 +1,16 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faArrowRight } from '@fortawesome/free-solid-svg-icons';
+
class TourIntro extends React.Component {
render() {
return (
<div className="tour-intro">
<p className="intro">
Visually explore the past and the present of this dynamic planet from a satellite&apos;s perspective.
- Select from an array of stories below to learn more about Worldview, the satellite imagery we provide and events occurring around the world. <a href="#" title="Start using Worldview" onClick={this.props.toggleModalStart}>Start using Worldview <i className="fa fa-arrow-right" aria-hidden="true"></i></a>
+ Select from an array of stories below to learn more about Worldview, the satellite imagery we provide and events occurring around the world. <a href="#" title="Start using Worldview" onClick={this.props.toggleModalStart}>Start using Worldview <FontAwesomeIcon icon={faArrowRight} /></a>
</p>
</div>
);
diff --git a/web/js/components/tour/widget-steps.js b/web/js/components/tour/widget-steps.js
index 9a0abad98..3405d78c7 100644
--- a/web/js/components/tour/widget-steps.js
+++ b/web/js/components/tour/widget-steps.js
@@ -1,36 +1,36 @@
import React from 'react';
import PropTypes from 'prop-types';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faCheckCircle, faArrowCircleLeft, faArrowCircleRight } from '@fortawesome/free-solid-svg-icons';
+
class Steps extends React.Component {
render() {
+ const { currentStep, decreaseStep, incrementStep, totalSteps } = this.props;
return (
<div className="step-container">
<a
className={'step-previous'}
aria-label="Previous"
- onClick={this.props.decreaseStep}
+ onClick={decreaseStep}
>
- <i className="fa fa-arrow-circle-left" aria-hidden="true" />
+ <FontAwesomeIcon icon={faArrowCircleLeft} />
</a>
<div className="step-counter">
<p>
- Step <span className="step-current">{this.props.currentStep}</span>/
- <span className="step-total">{this.props.totalSteps}</span>
+ Step <span className="step-current">{currentStep}</span>/
+ <span className="step-total">{totalSteps}</span>
</p>
</div>
<a
className="step-next"
aria-label="Next"
- onClick={this.props.incrementStep}
+ onClick={incrementStep}
>
- <i
- className={
- this.props.currentStep === this.props.totalSteps
- ? 'fa fa-check-circle'
- : 'fa fa-arrow-circle-right'
- }
- aria-hidden="true"
- />
+ {currentStep === totalSteps
+ ? <FontAwesomeIcon icon={faCheckCircle} />
+ : <FontAwesomeIcon icon={faArrowCircleRight} />
+ }
</a>
</div>
);
diff --git a/web/js/components/util/alert.js b/web/js/components/util/alert.js
index 874409972..c3c154c6e 100644
--- a/web/js/components/util/alert.js
+++ b/web/js/components/util/alert.js
@@ -2,6 +2,16 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Alert } from 'reactstrap';
import { Portal } from 'react-portal';
+
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faLayerGroup, faTimes, faRuler, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
+
+// icons used with alert by passing string as prop iconClassName
+const alertIcons = {
+ faRuler: faRuler,
+ faLayerGroup: faLayerGroup
+};
+
/*
* A react component, Builds a rather specific
* interactive widget
@@ -50,7 +60,7 @@ export default class AlertComponent extends React.Component {
onClick={onClick}
>
{iconClassName && (
- <i className={'wv-alert-icon ' + iconClassName} />
+ <FontAwesomeIcon icon={alertIcons[iconClassName] || faExclamationTriangle} className="wv-alert-icon" size="1x" />
)}
<div className="wv-alert-message">
{message}
@@ -58,7 +68,7 @@ export default class AlertComponent extends React.Component {
</div>
{onDismiss && (
<div id={`${this.props.id}-close`} className="close-alert" onClick={onDismiss}>
- <i className="fa fa-times exit fa-1x" />
+ <FontAwesomeIcon icon={faTimes} className="exit" size="1x" />
</div>
)}
</Alert>
@@ -77,7 +87,7 @@ export default class AlertComponent extends React.Component {
}
AlertComponent.defaultProps = {
- iconClassName: 'fas fa-exclamation-triangle fa-1x',
+ iconClassName: '',
title: ''
};
AlertComponent.propTypes = {
diff --git a/web/js/components/util/list.js b/web/js/components/util/list.js
index 063188207..9c38beeb7 100644
--- a/web/js/components/util/list.js
+++ b/web/js/components/util/list.js
@@ -2,6 +2,42 @@ import React from 'react';
import PropTypes from 'prop-types';
import { ListGroup, ListGroupItem, Badge } from 'reactstrap';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import {
+ faArrowCircleDown,
+ faArrowCircleUp,
+ faBolt,
+ faCircle,
+ faCode,
+ faEnvelope,
+ faExclamationCircle,
+ faFile,
+ faFlag,
+ faGift,
+ faRuler,
+ faRulerCombined,
+ faTrash,
+ faTruck
+} from '@fortawesome/free-solid-svg-icons';
+
+// icons used with List by passing string as prop iconClass
+const listIcons = {
+ faArrowCircleDown: faArrowCircleDown,
+ faArrowCircleUp: faArrowCircleUp,
+ faBolt: faBolt,
+ faCircle: faCircle,
+ faCode: faCode,
+ faEnvelope: faEnvelope,
+ faExclamationCircle: faExclamationCircle,
+ faFile: faFile,
+ faFlag: faFlag,
+ faGift: faGift,
+ faRuler: faRuler,
+ faRulerCombined: faRulerCombined,
+ faTrash: faTrash,
+ faTruck: faTruck
+};
+
/*
* A react reuseable list component
*
@@ -14,6 +50,7 @@ export default class List extends React.Component {
return (
<ListGroup className={listClass}>
{list.map(item => {
+ const iconName = item.iconName;
const iconClass = item.iconClass;
const isActive = item.key && active ? item.key === active : false;
const isDisabled =
@@ -41,7 +78,7 @@ export default class List extends React.Component {
}
disabled={isDisabled}
>
- {iconClass ? <i className={iconClass} /> : ''}
+ {iconName ? <FontAwesomeIcon icon={listIcons[iconName]} className={iconClass} fixedWidth /> : ''}
{item.text || ''}
{badge ? <Badge pill>{item.badge}</Badge> : ''}
</ListGroupItem>
diff --git a/web/js/components/util/switch.js b/web/js/components/util/switch.js
index 5c3cadea3..e8307f856 100644
--- a/web/js/components/util/switch.js
+++ b/web/js/components/util/switch.js
@@ -2,6 +2,9 @@ import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { Tooltip } from 'reactstrap';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
+
// https://upmostly.com/tutorials/build-a-react-switch-toggle-component
const Switch = (props) => {
const {
@@ -43,7 +46,7 @@ const Switch = (props) => {
{label}
{tooltip &&
<>
- <i id="availability-filter" className="fa fa-info-circle" />
+ <FontAwesomeIcon icon={faInfoCircle} id="availability-filter" />
<Tooltip
placement="right"
isOpen={tooltipOpen}
diff --git a/web/js/components/vector-metadata/tooltip.js b/web/js/components/vector-metadata/tooltip.js
index c603a654b..51a83baf3 100644
--- a/web/js/components/vector-metadata/tooltip.js
+++ b/web/js/components/vector-metadata/tooltip.js
@@ -3,6 +3,9 @@ import PropTypes from 'prop-types';
import { Tooltip } from 'reactstrap';
import util from '../../util/util';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faInfo } from '@fortawesome/free-solid-svg-icons';
+
export default class VectorMetaTooltip extends React.Component {
constructor(props) {
super(props);
@@ -38,8 +41,15 @@ export default class VectorMetaTooltip extends React.Component {
const elId = util.cleanId(String('tooltip' + id + index));
return (
- <div className='vector-info-tooltip-case' onMouseEnter={this.mouseEnter} onMouseLeave={this.mouseLeave} key={elId}>
- <div id={elId} className='sub-case' ><i className="fa fa-info vector-info-icon cursor-pointer"></i></div>
+ <div
+ className='vector-info-tooltip-case'
+ onMouseEnter={this.mouseEnter}
+ onMouseLeave={this.mouseLeave}
+ key={elId}
+ >
+ <div id={elId} className='sub-case'>
+ <FontAwesomeIcon icon={faInfo} className="vector-info-icon cursor-pointer" />
+ </div>
<Tooltip
dangerouslySetInnerHTML={{ __html: description }}
boundariesElement="window"
diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.js
index 40126198e..65097cc75 100644
--- a/web/js/containers/animation-widget.js
+++ b/web/js/containers/animation-widget.js
@@ -58,6 +58,9 @@ import { hasCustomPaletteInActiveProjection } from '../modules/palettes/util';
import { Tooltip } from 'reactstrap';
import Draggable from 'react-draggable';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faChevronUp, faChevronDown, faTimes, faFileVideo } from '@fortawesome/free-solid-svg-icons';
+
const RangeHandle = props => {
const { value, offset, dragging, ...restProps } = props;
@@ -413,8 +416,8 @@ class AnimationWidget extends React.Component {
play={this.onPushPlay}
pause={onPushPause}
/>
- <i className="fa fa-chevron-up wv-expand" onClick={this.toggleCollapse} />
- <i className="fa fa-times wv-close" onClick={this.props.onClose} />
+ <FontAwesomeIcon icon={faChevronUp} className='wv-expand' onClick={this.toggleCollapse} />
+ <FontAwesomeIcon icon={faTimes} className='wv-close' onClick={this.props.onClose} />
</div>
</div>
</Draggable>
@@ -501,10 +504,7 @@ class AnimationWidget extends React.Component {
onMouseEnter={this.toggleHoverGif}
onMouseLeave={this.toggleHoverGif}
>
- <i
- id="wv-animation-widget-file-video-icon"
- className="fas fa-file-video wv-animation-widget-icon"
- />
+ <FontAwesomeIcon icon={faFileVideo} className='wv-animation-widget-icon' />
</a>
{this.renderToolTip()}
@@ -530,9 +530,8 @@ class AnimationWidget extends React.Component {
subDailyMode={subDailyMode}
/>
</div>
-
- <i className="fa fa-chevron-down wv-minimize" onClick={this.toggleCollapse} />
- <i className="fa fa-times wv-close" onClick={this.props.onClose} />
+ <FontAwesomeIcon icon={faChevronDown} className='wv-minimize' onClick={this.toggleCollapse} />
+ <FontAwesomeIcon icon={faTimes} className='wv-close' onClick={this.props.onClose} />
{/* Custom time interval selection */}
<CustomIntervalSelectorWidget
diff --git a/web/js/containers/error-boundary.js b/web/js/containers/error-boundary.js
index e0929f01e..b17d5263c 100644
--- a/web/js/containers/error-boundary.js
+++ b/web/js/containers/error-boundary.js
@@ -2,11 +2,15 @@ import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { openCustomContent } from '../modules/modal/actions';
+
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
+
const HEADER_TEXT = 'Error!';
const BODY_COMPONENT = () => (
<React.Fragment>
<div className="error-header">
- <i className="error-icon fas fa-exclamation-triangle fa-3x" />
+ <FontAwesomeIcon icon={faExclamationTriangle} className='error-icon' size='3x' />
An unexpected error has occurred!
</div>
<div className="error-body">
diff --git a/web/js/containers/info.js b/web/js/containers/info.js
index a9f81823c..d0fb6b1c0 100644
--- a/web/js/containers/info.js
+++ b/web/js/containers/info.js
@@ -21,16 +21,15 @@ import Notifications from '../containers/notifications';
class InfoList extends Component {
getNotificationListItem(obj) {
const { number, type, object } = this.props.notifications;
- const baseIconclass = 'ui-icon fa fa-fw fa-';
return {
text: 'Notifications',
- iconClass:
- type === 'message'
- ? baseIconclass + 'gift'
- : type === 'outage'
- ? baseIconclass + 'exclamation-circle'
- : baseIconclass + 'bolt',
+ iconClass: 'ui-icon',
+ iconName: type === 'message'
+ ? 'faGift'
+ : type === 'outage'
+ ? 'faExclamationCircle'
+ : 'faBolt',
id: 'notifications_info_item',
badge: number,
className: type ? type + '-notification' : '',
@@ -61,25 +60,29 @@ class InfoList extends Component {
const arr = [
{
text: 'Send feedback',
- iconClass: 'ui-icon fa fa-envelope fa-fw',
+ iconClass: 'ui-icon',
+ iconName: 'faEnvelope',
id: 'send_feedback_info_item',
...feedbackAction
},
{
text: 'Source Code',
- iconClass: 'ui-icon fa fa-code fa-fw',
+ iconClass: 'ui-icon',
+ iconName: 'faCode',
id: 'source_code_info_item',
href: 'https://github.com/nasa-gibs/worldview'
},
{
text: 'What\'s new',
- iconClass: 'ui-icon fa fa-flag fa-fw',
+ iconClass: 'ui-icon',
+ iconName: 'faFlag',
id: 'whats_new_info_item',
href: 'https://wiki.earthdata.nasa.gov/pages/viewrecentblogposts.action?key=GIBS'
},
{
text: 'About',
- iconClass: 'ui-icon fa fa-file fa-fw',
+ iconClass: 'ui-icon',
+ iconName: 'faFile',
id: 'about_info_item',
onClick: () => {
aboutClick();
@@ -95,7 +98,8 @@ class InfoList extends Component {
) {
const exploreWorlviewObj = {
text: 'Explore Worldview',
- iconClass: 'ui-icon fa fa-truck fa-fw',
+ iconClass: 'ui-icon',
+ iconName: 'faTruck',
id: 'start_tour_info_item',
onClick: () => {
startTour(isTourActive);
diff --git a/web/js/containers/projection.js b/web/js/containers/projection.js
index 6085cffed..0ceb5550f 100644
--- a/web/js/containers/projection.js
+++ b/web/js/containers/projection.js
@@ -11,19 +11,22 @@ import googleTagManager from 'googleTagManager';
const DEFAULT_PROJ_ARRAY = [
{
text: 'Arctic',
- iconClass: 'ui-icon icon-large fa fa-arrow-circle-up fa-fw',
+ iconClass: 'ui-icon icon-large',
+ iconName: 'faArrowCircleUp',
id: 'change-arctic-button',
key: 'arctic'
},
{
text: 'Geographic',
- iconClass: 'ui-icon icon-large fa fa-circle fa-fw',
+ iconClass: 'ui-icon icon-large',
+ iconName: 'faCircle',
id: 'change-geographic-button',
key: 'geographic'
},
{
text: 'Antarctic',
- iconClass: 'ui-icon icon-large fa fa-arrow-circle-down fa-fw',
+ iconClass: 'ui-icon icon-large',
+ iconName: 'faArrowCircleDown',
id: 'change-antarctic-button',
key: 'antarctic'
}
@@ -32,7 +35,8 @@ const getInfoArray = function(projArray) {
return projArray.map(el => {
return {
text: el.name,
- iconClass: el.style + ' ui-icon icon-large',
+ iconClass: ' ui-icon icon-large',
+ iconName: el.style,
id: 'change-' + el.id + '-button',
key: el.id
};
diff --git a/web/js/containers/sidebar/layer.js b/web/js/containers/sidebar/layer.js
index 9dc1d8e99..27a0a40b4 100644
--- a/web/js/containers/sidebar/layer.js
+++ b/web/js/containers/sidebar/layer.js
@@ -21,6 +21,10 @@ import {
} from '../../modules/layers/actions';
import OrbitTrack from './orbit-track';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faTimes, faSlidersH, faInfo, faBan } from '@fortawesome/free-solid-svg-icons';
+import { faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
+
const visibilityButtonClasses = 'hdanchor hide hideReg bank-item-img';
const getItemStyle = (isDragging, draggableStyle) => ({
// some basic styles to make the items look a bit nicer
@@ -126,7 +130,7 @@ class Layer extends React.Component {
className="button wv-layers-close"
onClick={() => onRemoveClick(layer.id)}
>
- <i className="fa fa-times" />
+ <FontAwesomeIcon icon={faTimes} fixedWidth />
</a>
<a
title={'Layer options for ' + title}
@@ -134,7 +138,7 @@ class Layer extends React.Component {
onMouseDown={this.stopPropagation}
onClick={() => onOptionsClick(layer, title)}
>
- <i className="fas fa-sliders-h wv-layers-options-icon" />
+ <FontAwesomeIcon icon={faSlidersH} className="wv-layers-options-icon" />
</a>
<a
title={'Layer description for ' + title}
@@ -142,7 +146,7 @@ class Layer extends React.Component {
onMouseDown={this.stopPropagation}
onClick={() => onInfoClick(layer, title)}
>
- <i className="fa fa-info wv-layers-info-icon" />
+ <FontAwesomeIcon icon={faInfo} className="wv-layers-info-icon" />
</a>
</>
);
@@ -183,10 +187,10 @@ class Layer extends React.Component {
? this.getDisabledTitle(layer)
: 'Hide Layer';
const visibilityIconClass = isDisabled
- ? 'fas fa-ban layer-eye-icon'
+ ? faBan
: !isVisible
- ? 'far fa-eye-slash layer-eye-icon'
- : 'far fa-eye layer-eye-icon';
+ ? faEyeSlash
+ : faEye;
const zotTitle = zot
? 'Layer is overzoomed by ' + zot.toString() + 'x its maximum zoom level'
@@ -219,7 +223,7 @@ class Layer extends React.Component {
onClick={() => toggleVisibility(layer.id, !isVisible)}
title={visibilityTitle}
>
- <i className={visibilityIconClass} />
+ <FontAwesomeIcon icon={visibilityIconClass} className="layer-eye-icon" />
</a>
<div
diff --git a/web/js/containers/sidebar/orbit-track.js b/web/js/containers/sidebar/orbit-track.js
index 943434e3d..84cab4801 100644
--- a/web/js/containers/sidebar/orbit-track.js
+++ b/web/js/containers/sidebar/orbit-track.js
@@ -10,6 +10,8 @@ import {
import { requestPalette } from '../../modules/palettes/actions';
import { getOrbitTrackTitle } from '../../modules/layers/util';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faSatellite } from '@fortawesome/free-solid-svg-icons';
class OrbitTrack extends React.Component {
getPaletteLegend = () => {
const {
@@ -44,7 +46,7 @@ class OrbitTrack extends React.Component {
return (
<div className={containerClasses}>
{hasPalette ? this.getPaletteLegend() : ''}
- <i className='fa fa-satellite'/>
+ <FontAwesomeIcon icon={faSatellite} />
<span className='wv-orbit-track-label'>
{getOrbitTrackTitle(trackLayer)}
</span>
diff --git a/web/js/containers/toolbar.js b/web/js/containers/toolbar.js
index 61cdc909a..6e069fe82 100644
--- a/web/js/containers/toolbar.js
+++ b/web/js/containers/toolbar.js
@@ -25,6 +25,10 @@ import { Notify } from '../components/image-download/notify';
import Promise from 'bluebird';
import { hasCustomPaletteInActiveProjection } from '../modules/palettes/util';
import { getLayers } from '../modules/layers/selectors';
+
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faShareSquare, faArrowsAltH, faGlobeAsia, faCamera, faInfoCircle } from '@fortawesome/free-solid-svg-icons';
+
Promise.config({ cancellation: true });
const CUSTOM_MODAL_PROPS = {
@@ -151,7 +155,8 @@ class toolbarContainer extends Component {
)
}
>
- <i className="fas fa-share-square fa-2x" />
+ {/* <FontAwesomeIcon icon={faShareSquare} size='2x' /> */}
+ <FontAwesomeIcon icon={faArrowsAltH} />
</Button>
{config.ui && config.ui.projections ? (
<Button
@@ -165,7 +170,7 @@ class toolbarContainer extends Component {
)
}
>
- <i className="fas fa-globe-asia fa-2x" />{' '}
+ <FontAwesomeIcon icon={faGlobeAsia} size='2x' />
</Button>
) : (
''
@@ -187,7 +192,7 @@ class toolbarContainer extends Component {
}
onClick={this.openImageDownload}
>
- <i className="fa fa-camera fa-2x" />{' '}
+ <FontAwesomeIcon icon={faCamera} size='2x' />
</Button>
<Button
id="wv-info-button"
@@ -198,7 +203,7 @@ class toolbarContainer extends Component {
}
data-content={notificationContentNumber}
>
- <i className="fa fa-info-circle fa-2x" />{' '}
+ <FontAwesomeIcon icon={faInfoCircle} size='2x' />
</Button>
</ButtonToolbar>
</ErrorBoundary>
diff --git a/web/js/map/compare/swipe.js b/web/js/map/compare/swipe.js
index 10b0dcda9..19d7ef4c0 100644
--- a/web/js/map/compare/swipe.js
+++ b/web/js/map/compare/swipe.js
@@ -2,6 +2,8 @@ import lodashEach from 'lodash/each';
import lodashRound from 'lodash/round';
import util from '../../util/util';
+import { faIconArrowsAltHSVGDomEl } from '../../map/fa-map-icons';
+
var swipeOffset = null;
var line = null;
var bottomLayers = [];
@@ -139,7 +141,6 @@ var addLineOverlay = function(map) {
var lineCaseEl = document.createElement('div');
var draggerEl = document.createElement('div');
var draggerCircleEl = document.createElement('div');
- var iconEl = document.createElement('i');
var firstLabel = document.createElement('span');
var secondLabel = document.createElement('span');
var windowWidth = util.browser.dimensions[0];
@@ -150,13 +151,12 @@ var addLineOverlay = function(map) {
firstLabel.appendChild(document.createTextNode('A'));
secondLabel.appendChild(document.createTextNode('B'));
- iconEl.className = 'fas fa-arrows-alt-h';
draggerEl.className = 'ab-swipe-dragger';
lineCaseEl.className = 'ab-swipe-line';
lineCaseEl.appendChild(firstLabel);
lineCaseEl.appendChild(secondLabel);
draggerEl.appendChild(draggerCircleEl);
- draggerCircleEl.appendChild(iconEl);
+ draggerCircleEl.insertAdjacentHTML('beforeend', faIconArrowsAltHSVGDomEl);
lineCaseEl.appendChild(draggerEl);
mapCase.appendChild(lineCaseEl);
swipeOffset = percentSwipe
diff --git a/web/js/map/data/ui.js b/web/js/map/data/ui.js
index a04f99c6a..2733fe835 100644
--- a/web/js/map/data/ui.js
+++ b/web/js/map/data/ui.js
@@ -18,6 +18,7 @@ import { getLayers } from '../../modules/layers/selectors';
import { getDataProductsFromActiveLayers, doesSelectedExist } from '../../modules/data/selectors';
import * as LAYER_CONSTANTS from '../../modules/layers/constants';
import { CHANGE_PROJECTION } from '../../modules/projection/constants';
+import { faIconInfoCircleSVGDomEl } from '../fa-map-icons';
export function dataUi(store, ui, config) {
var queryActive = false;
@@ -425,7 +426,7 @@ var dataUiBulkDownloadPage = (function() {
var dataUiDownloadListPanel = function(config, store) {
var NOTICE =
"<div id='wv-data-selection-notice'>" +
- "<i class='icon fa fa-info-circle fa-3x'></i>" +
+ faIconInfoCircleSVGDomEl +
"<p class='text'>" +
'Some items you have selected require a profile with ' +
'Earthdata Login to download. ' +
@@ -466,14 +467,6 @@ var dataUiDownloadListPanel = function(config, store) {
$('a.wget').click(showWgetPage);
$('a.curl').click(showCurlPage);
- $dialog.find('.dd-collapse').accordion({
- collapsible: true,
- active: false,
- icons: {
- header: 'fas fa-caret-right fa-fw',
- activeHeader: 'fa fa-caret-down fa-fw'
- }
- });
$dialog.on('dialogclose', function() {
self.events.trigger('close');
});
@@ -740,7 +733,7 @@ var dataUiDownloadListPanel = function(config, store) {
var bulkDownloadText = function() {
var bulk =
- "<div class='bulk dd-collapse'>" +
+ "<div class='bulk'>" +
'<h5>Bulk Download</h5>' +
"<ul class='BulkDownload'>" +
"<li><a class='link wget'>List of Links</a>: " +
diff --git a/web/js/map/fa-map-icons.js b/web/js/map/fa-map-icons.js
new file mode 100644
index 000000000..73c738931
--- /dev/null
+++ b/web/js/map/fa-map-icons.js
@@ -0,0 +1,7 @@
+// string DOM element SVGs to bridge the gap for non-React FontAwesome icons in the map part of the app
+export const faIconUndoSVGDomEl = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="undo" class="svg-inline--fa fa-undo fa-w-16 " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"></path></svg>';
+export const faIconRedoSVGDomEl = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="redo" class="svg-inline--fa fa-redo fa-w-16 " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"></path></svg>';
+export const faIconInfoCircleSVGDomEl = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="info-circle" class="svg-inline--fa fa-info-circle fa-w-16 fa-3x " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"></path></svg>';
+export const faIconPlusSVGDomEl = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="plus" class="svg-inline--fa fa-plus fa-w-14 fa-1x " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg>';
+export const faIconMinusSVGDomEl = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="minus" class="svg-inline--fa fa-minus fa-w-14 fa-1x " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg>';
+export const faIconArrowsAltHSVGDomEl = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="arrows-alt-h" class="svg-inline--fa fa-arrows-alt-h fa-w-16 " role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M377.941 169.941V216H134.059v-46.059c0-21.382-25.851-32.09-40.971-16.971L7.029 239.029c-9.373 9.373-9.373 24.568 0 33.941l86.059 86.059c15.119 15.119 40.971 4.411 40.971-16.971V296h243.882v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.568 0-33.941l-86.059-86.059c-15.119-15.12-40.971-4.412-40.971 16.97z"></path></svg>';
diff --git a/web/js/map/rotation.js b/web/js/map/rotation.js
index 787b4623b..d3d8fd18b 100644
--- a/web/js/map/rotation.js
+++ b/web/js/map/rotation.js
@@ -1,6 +1,7 @@
import 'jquery-ui-bundle/jquery-ui';
import util from '../util/util';
import { debounce } from 'lodash';
+import { faIconUndoSVGDomEl, faIconRedoSVGDomEl } from './fa-map-icons';
export function MapRotate(ui, models, store) {
this.evts = util.events();
@@ -41,7 +42,8 @@ export function MapRotate(ui, models, store) {
'title',
'You may also rotate by holding Alt and dragging the mouse'
);
- var $lefticon = $('<i></i>').addClass('fa fa-undo');
+ // var $lefticon = $('<svg></svg>').addClass('fa fa-undo');
+ var $lefticon = $(faIconUndoSVGDomEl);
var $rotateRightButton = $('<button></button>')
.addClass('wv-map-rotate-right wv-map-zoom')
@@ -49,7 +51,8 @@ export function MapRotate(ui, models, store) {
'title',
'You may also rotate by holding Alt and dragging the mouse'
);
- var $righticon = $('<i></i>').addClass('fas fa-redo');
+ // var $righticon = $('<i></i>').addClass('fas fa-redo');
+ var $righticon = $(faIconRedoSVGDomEl);
var $resetButton = $('<button></button>')
.addClass('wv-map-reset-rotation wv-map-zoom')
diff --git a/web/js/map/ui.js b/web/js/map/ui.js
index b18249438..ca9e664b3 100644
--- a/web/js/map/ui.js
+++ b/web/js/map/ui.js
@@ -53,6 +53,7 @@ import { CLEAR_ROTATE, RENDERED, UPDATE_MAP_UI, FITTED_TO_LEADING_EXTENT, REFRES
import { getLeadingExtent } from '../modules/map/util';
import { updateVectorSelection } from '../modules/vector-styles/util';
+import { faIconPlusSVGDomEl, faIconMinusSVGDomEl } from './fa-map-icons';
export function mapui(models, config, store, ui) {
var layerBuilder, createLayer;
@@ -1025,10 +1026,11 @@ export function mapui(models, config, store, ui) {
var $zoomOut = $('<div></div>')
.addClass('wv-map-zoom-out')
.addClass('wv-map-zoom');
- var $outIcon = $('<i></i>')
- .addClass('fa')
- .addClass('fa-minus')
- .addClass('fa-1x');
+ // var $outIcon = $('<i></i>')
+ // .addClass('fa')
+ // .addClass('fa-minus')
+ // .addClass('fa-1x');
+ var $outIcon = $(faIconMinusSVGDomEl);
$zoomOut.append($outIcon);
$map.append($zoomOut);
$zoomOut.button({
@@ -1042,10 +1044,11 @@ export function mapui(models, config, store, ui) {
var $zoomIn = $('<div></div>')
.addClass('wv-map-zoom-in')
.addClass('wv-map-zoom');
- var $inIcon = $('<i></i>')
- .addClass('fa')
- .addClass('fa-plus')
- .addClass('fa-1x');
+ // var $inIcon = $('<i></i>')
+ // .addClass('fa')
+ // .addClass('fa-plus')
+ // .addClass('fa-1x');
+ var $inIcon = $(faIconPlusSVGDomEl);
$zoomIn.append($inIcon);
$map.append($zoomIn);
$zoomIn.button({
diff --git a/web/js/ui/ui.js b/web/js/ui/ui.js
index 06d92abb2..064720766 100644
--- a/web/js/ui/ui.js
+++ b/web/js/ui/ui.js
@@ -20,7 +20,6 @@ export default (function(self) {
self.notify(
"<div class='error-header'>" +
- "<i class='error-icon fas fa-exclamation-triangle fa-3x'></i>" +
'An unexpected error has occurred' +
'</div>' +
"<div class='error-body'>Please reload the page and try " +
@@ -71,44 +70,6 @@ export default (function(self) {
});
};
- self.alert = function(body, title, size, glyph, glyphType, closeFn) {
- var $message = $('<span/>', { class: 'notify-message' });
- glyphType = glyphType || 'fa';
- var $icon = $('<i/>', {
- class: glyphType + ' fa-' + glyph + ' fa-1x',
- title: title
- });
- var $messageWrapper = $('<div/>')
- .click(function() {
- self.notify(body, title, size);
- })
- .append($icon)
- .append($message);
- var $close = $('<i/>', { class: 'fa fa-times fa-1x' }).click(closeFn);
- var $alert = $('<div/>')
- .append($close)
- .append($messageWrapper)
- .dialog({
- autoOpen: false,
- resizable: false,
- height: 40,
- width: 420,
- draggable: false,
- show: {
- effect: 'fade',
- duration: 400
- },
- hide: {
- effect: 'fade',
- duration: 200
- },
- dialogClass: 'no-titlebar notify-alert',
- closeText: ''
- });
- $message.empty().append(title);
- return $alert;
- };
-
var getComponent = function(marker) {
var $element = $('<div></div>').addClass(marker);
$('body').append($element);