forked from btclock/webui
Get available pools from device
This commit is contained in:
parent
711c625648
commit
a00eb54573
1 changed files with 15 additions and 2 deletions
|
@ -44,6 +44,18 @@
|
||||||
['5dBm', 20] // 5dBm
|
['5dBm', 20] // 5dBm
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const miningPoolMap = new Map<string, string>([
|
||||||
|
['noderunners', 'pool.noderunners.network'],
|
||||||
|
['braiins', 'braiins pool'],
|
||||||
|
['ocean', 'ocean.xyz']
|
||||||
|
]);
|
||||||
|
|
||||||
|
const getMiningPoolName = (name: string) => {
|
||||||
|
if (miningPoolMap.has(name)) return miningPoolMap.get(name);
|
||||||
|
|
||||||
|
return name;
|
||||||
|
};
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
const handleReset = (e: Event) => {
|
const handleReset = (e: Event) => {
|
||||||
|
@ -712,8 +724,9 @@
|
||||||
bsSize={$uiSettings.inputSize}
|
bsSize={$uiSettings.inputSize}
|
||||||
class={$uiSettings.selectClass}
|
class={$uiSettings.selectClass}
|
||||||
>
|
>
|
||||||
<option value="braiins">Braiins Pool</option>
|
{#each $settings.availablePools as pool}
|
||||||
<option value="ocean">Ocean</option>
|
<option value={pool}>{getMiningPoolName(pool)}</option>
|
||||||
|
{/each}
|
||||||
</Input>
|
</Input>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
Loading…
Reference in a new issue