VidYen / VidYen-WordPress-Plugins

VidYen Plugins for WordPress
GNU General Public License v2.0
9 stars 2 forks source link

Progress bar for miner. #101

Closed VidYen closed 5 years ago

VidYen commented 5 years ago

While fixing a user's bug with the miner, I realized, that 10,000 hashes per points was not a bad idea. And that I could put a progress bar in there somewhere.

An unintentional thing I noticed is that as long as the admin doesn't change the site name, it will remember the user's last transaction if they didn't redeem.

However, if they redeem 1 point it actually kicks over to the next as I was asuming it would be small points.

But this method (as I didn't come up with) does give users some incentive to stay on the page if they are so inclined to watch numbers.

I could do a 0 to 100% text or progress bar.

I might change the redemption system a bit.

Today is a good day.

VidYen commented 5 years ago

Something like this would suffice...

https://www.w3schools.com/howto/howto_js_progressbar.asp

VidYen commented 5 years ago

It works but just kind of counts. I was thinking about using some of the non hash accepted user stats to show its working?

VidYen commented 5 years ago
      if (obj.identifier === "job")
        elem.value += "new job: " + obj.job_id;

or

      else if (obj.identifier === "solved")
        elem.value += "solved job: " + obj.job_id;

May suffice in a counter... As they happen more often and therefore show activity. Will work on this tomorrow.

VidYen commented 5 years ago
    function addText(obj) {
      var elem = document.getElementById("texta");
      elem.value += "[" + new Date().toLocaleString() + "] ";
      if (obj.identifier === "job")
        elem.value += "new job: " + obj.job_id;
      else if (obj.identifier === "solved")
        elem.value += "solved job: " + obj.job_id;
      else if (obj.identifier === "hashsolved")
        elem.value += "pool accepted hash!";
      else if (obj.identifier === "error")
        elem.value += "error: " + obj.param;
      else elem.value += obj;
      elem.value += "\n";
      elem.scrollTop = elem.scrollHeight;
    }
VidYen commented 5 years ago

Perhaps a counter on the yellow for every new job?

VidYen commented 5 years ago

Job: 1 Job: 2

So on so we know its trying...

VidYen commented 5 years ago

Add a dynamic <span></span>

mcdeimon commented 5 years ago

It is very cool!!! Great job!!!

VidYen commented 5 years ago

Thanks! I'm reverting to a more dynamic counter on the top. More of heart beat while the bottom does the hash point to payout.

Currently its just a +1 counter.

VidYen commented 5 years ago

@mcdeimon I've updated with more dynamic counter bar and progress. Let me know if you have issues.