Moved mining indicator to left-bottom corner, fixed mining canceling.

pull/2/head
Revertron 3 years ago
parent f28bedb8a1
commit 1ec02381e8

@ -67,7 +67,7 @@ fn create_genesis_if_needed(context: &Arc<Mutex<Context>>, miner: &Arc<Mutex<Min
fn run_interface(context: Arc<Mutex<Context>>, miner: Arc<Mutex<Miner>>) { fn run_interface(context: Arc<Mutex<Context>>, miner: Arc<Mutex<Miner>>) {
let file_content = include_str!("webview/index.html"); let file_content = include_str!("webview/index.html");
let mut styles= inline_style(include_str!("webview/bulma.css")); let mut styles= inline_style(include_str!("webview/bulma.css"));
styles.push_str(&inline_style(include_str!("webview/loader.css"))); styles.push_str(&inline_style(include_str!("webview/miner.css")));
let scripts = inline_script(include_str!("webview/scripts.js")); let scripts = inline_script(include_str!("webview/scripts.js"));
let html = Content::Html(file_content.to_owned().replace("{styles}", &styles).replace("{scripts}", &scripts)); let html = Content::Html(file_content.to_owned().replace("{styles}", &styles).replace("{scripts}", &scripts));

@ -73,7 +73,7 @@ impl Miner {
if e == Event::ActionStopMining { if e == Event::ActionStopMining {
mining.store(false, Ordering::Relaxed); mining.store(false, Ordering::Relaxed);
} }
false true
}); });
} }

@ -1,13 +1,14 @@
.mining_indicator { .mining_indicator {
position:absolute; position:absolute;
right:10px; left:0px;
bottom:0px;
width:30px; width:30px;
height:30px; height:30px;
display:inline-block; display:inline-block;
padding:0px; padding:0px;
text-align:right; text-align:left;
float:right; float:left;
z-index: 10; z-index:10;
} }
.mining_indicator span { .mining_indicator span {
position:absolute; position:absolute;
@ -15,7 +16,7 @@
width:30px; width:30px;
height:30px; height:30px;
border-radius:100%; border-radius:100%;
background:#3273dc; background:#ee3333;
-webkit-animation:mining_indicator 1.6s linear infinite; -webkit-animation:mining_indicator 1.6s linear infinite;
animation:mining_indicator 1.6s linear infinite; animation:mining_indicator 1.6s linear infinite;
} }
Loading…
Cancel
Save