diff --git a/src/components/atoms/Coinhive.jsx b/src/components/atoms/Coinhive.jsx
index d3b43333..6c9cea35 100644
--- a/src/components/atoms/Coinhive.jsx
+++ b/src/components/atoms/Coinhive.jsx
@@ -1,10 +1,10 @@
-/* global CoinHive */
-
import React, { PureComponent } from 'react'
import loadScript from 'load-script'
import posed, { PoseGroup } from 'react-pose'
import { fadeIn } from './Transitions'
import styles from './Coinhive.module.scss'
+import { ReactComponent as Play } from '../../images/play.svg'
+import { ReactComponent as Pause } from '../../images/pause.svg'
const config = {
threads: 2,
@@ -37,7 +37,7 @@ export default class CoinHiveClient extends PureComponent {
return
}
resolve(
- CoinHive.Anonymous(config.siteKey, {
+ window.CoinHive.Anonymous(config.siteKey, {
throttle: config.throttle,
threads: config.threads,
autoThreads: config.autoThreads
@@ -114,6 +114,7 @@ export default class CoinHiveClient extends PureComponent {
onClick={this.toggleMiner}
>
+ {this.state.started ?
:
}
Mining {this.state.started ? 'enabled' : 'disabled'}
diff --git a/src/components/atoms/Coinhive.module.scss b/src/components/atoms/Coinhive.module.scss
index d602e998..34740a8d 100644
--- a/src/components/atoms/Coinhive.module.scss
+++ b/src/components/atoms/Coinhive.module.scss
@@ -6,11 +6,21 @@
right: 0;
z-index: 10;
font-size: $font-size-mini;
- padding: ($spacer / 3) ($spacer / 2);
+ padding: ($spacer / 3) ($spacer / 2) ($spacer / 3) $spacer;
background: rgba($page-background-color, .5);
border-top-left-radius: 4px;
line-height: 1.2;
cursor: pointer;
+
+ svg {
+ fill: $brand-grey-light;
+ margin-bottom: .1rem;
+ display: inline-block;
+ vertical-align: middle;
+ margin-left: -1rem;
+ margin-right: .2rem;
+ margin-top: -.1rem;
+ }
}
.hashrate {
diff --git a/src/images/pause.svg b/src/images/pause.svg
new file mode 100644
index 00000000..15b1717d
--- /dev/null
+++ b/src/images/pause.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/images/play.svg b/src/images/play.svg
new file mode 100644
index 00000000..0bae4d9b
--- /dev/null
+++ b/src/images/play.svg
@@ -0,0 +1,3 @@
+