pool: rework title plurals and asterisk explanations

also fix page refresh on pool status algo switch
This commit is contained in:
Tanguy Pruvot 2016-08-20 23:57:53 +02:00
parent b276cc0a7f
commit ac70dbe318
3 changed files with 11 additions and 8 deletions

View file

@ -1027,7 +1027,8 @@ class SiteController extends CommonController
public function actionGomining() public function actionGomining()
{ {
user()->setState('yaamp-algo', getparam('algo')); $algo = substr(getparam('algo'), 0, 32);
user()->setState('yaamp-algo', $algo);
$this->redirect("/site/mining"); $this->redirect("/site/mining");
} }

View file

@ -70,7 +70,7 @@ var global_algo = '$algo';
function select_algo(algo) function select_algo(algo)
{ {
window.location.href = '/site/algo?algo='+algo; window.location.href = '/site/gomining?algo='+algo;
} }
function page_refresh() function page_refresh()

View file

@ -12,7 +12,7 @@ $showrental = (bool) YAAMP_RENTAL;
$algo = user()->getState('yaamp-algo'); $algo = user()->getState('yaamp-algo');
$total_rate = yaamp_pool_rate(); $total_rate = yaamp_pool_rate();
$total_rate_d = $total_rate? Itoa2($total_rate).'h/s': ''; $total_rate_d = $total_rate? 'at '.Itoa2($total_rate).'h/s': '';
if($algo == 'all') if($algo == 'all')
$list = getdbolist('db_coins', "enable and visible order by index_avg desc"); $list = getdbolist('db_coins', "enable and visible order by index_avg desc");
@ -33,7 +33,9 @@ else
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////
WriteBoxHeader("Mining $count coins at $total_rate_d * with $worker miners ($algo)"); $coin_count = $count > 1 ? "on $count wallets" : 'on a single wallet';
$miner_count = $worker > 1 ? "$worker miners" : "$worker miner";
WriteBoxHeader("Mining $coin_count $total_rate_d, $miner_count");
showTableSorter('maintable3', "{ showTableSorter('maintable3', "{
tableClass: 'dataGrid2', tableClass: 'dataGrid2',
@ -52,9 +54,9 @@ echo <<<END
<th align="right">Amount</th> <th align="right">Amount</th>
<th data-sorter="numeric" align="right">Diff</th> <th data-sorter="numeric" align="right">Diff</th>
<th align="right">Block</th> <th align="right">Block</th>
<th align="right">TTF*</th> <th align="right">TTF***</th>
<th data-sorter="numeric" align="right">Hash**</th> <th data-sorter="numeric" align="right">Hash**</th>
<th data-sorter="currency" align="right">Profit***</th> <th data-sorter="currency" align="right">Profit*</th>
</tr> </tr>
</thead> </thead>
END; END;
@ -216,9 +218,9 @@ if(isset($price_rent) && $showrental)
echo "</table>"; echo "</table>";
echo "<p style='font-size: .8em'> echo "<p style='font-size: .8em'>
&nbsp;* estimated average time to find a block at full pool speed<br> &nbsp;*** estimated average time to find a block at full pool speed<br>
&nbsp;** approximate from the last 5 minutes submitted shares<br> &nbsp;** approximate from the last 5 minutes submitted shares<br>
&nbsp;*** mBTC/Mh/day (mBTC/Gh/day for sha256 and blake algos)<br> &nbsp;* 24h estimation from network difficulty in mBTC/Mh/day (mBTC/Gh/day for sha256 and blake algos)<br>
</p>"; </p>";
echo "</div></div><br>"; echo "</div></div><br>";