Browse Source

add explorer link

main
ghost 12 months ago
parent
commit
de1b97e8d0
  1. 5
      .env
  2. 3
      config/services.yaml
  3. 5
      public/css/default.css
  4. 9
      src/Controller/ModuleController.php
  5. 8
      templates/default/module/info.html.twig

5
.env

@ -40,8 +40,11 @@ APP_KEVACOIN_PASSWORD=EDIT_ME @@ -40,8 +40,11 @@ APP_KEVACOIN_PASSWORD=EDIT_ME
APP_KEVACOIN_MINE_POOL_URL=https://miningpoolstats.stream/kevacoin
APP_KEVACOIN_MINE_SOLO_URL=https://kevacoin.org/tutorial_solo_mining.html
# Explorer URL
APP_KEVACOIN_EXPLORER_URL=https://keva.one/explorer/address/
# Address to receive kevacoin powers (make others able to fill node balance)
APP_KEVACOIN_MINE_ADDRESS=EDIT_ME
APP_KEVACOIN_BOOST_ADDRESS=EDIT_ME
# Allowed room namespaces, separated with | (must be owned to accept posts)
APP_KEVACOIN_ROOM_NAMESPACES=EDIT_ME

3
config/services.yaml

@ -18,7 +18,8 @@ parameters: @@ -18,7 +18,8 @@ parameters:
app.kevacoin.room.namespaces.readonly: '%env(APP_KEVACOIN_ROOM_NAMESPACES_READONLY)%'
app.kevacoin.room.namespace.default: '%env(APP_KEVACOIN_ROOM_NAMESPACE_DEFAULT)%'
app.kevacoin.room.namespace.external: '%env(APP_KEVACOIN_ROOM_NAMESPACE_EXTERNAL)%'
app.kevacoin.mine.address: '%env(APP_KEVACOIN_MINE_ADDRESS)%'
app.kevacoin.boost.address: '%env(APP_KEVACOIN_BOOST_ADDRESS)%'
app.kevacoin.explorer.url: '%env(APP_KEVACOIN_EXPLORER_URL)%'
app.kevacoin.mine.pool.url: '%env(APP_KEVACOIN_MINE_POOL_URL)%'
app.kevacoin.mine.solo.url: '%env(APP_KEVACOIN_MINE_SOLO_URL)%'
app.add.room.remote.ip.regex: '%env(APP_ADD_ROOM_REMOTE_IP_REGEX)%'

5
public/css/default.css

@ -52,11 +52,6 @@ header > div @@ -52,11 +52,6 @@ header > div
margin: 8px 0;
}
header > div > pre
{
display: inline-block;
}
main
{
display: block;

9
src/Controller/ModuleController.php

@ -28,9 +28,12 @@ class ModuleController extends AbstractController @@ -28,9 +28,12 @@ class ModuleController extends AbstractController
'balance' => (float) $client->getBalance(),
'block' => (int) $client->getBlockCount()
],
'boost' =>
[
'address' => $this->getParameter('app.kevacoin.boost.address')
],
'mine' =>
[
'address' => $this->getParameter('app.kevacoin.mine.address'),
'pool' =>
[
'url' => $this->getParameter('app.kevacoin.mine.pool.url')
@ -39,6 +42,10 @@ class ModuleController extends AbstractController @@ -39,6 +42,10 @@ class ModuleController extends AbstractController
[
'url' => $this->getParameter('app.kevacoin.mine.solo.url')
]
],
'explorer' =>
[
'url' => $this->getParameter('app.kevacoin.explorer.url')
]
]
);

8
templates/default/module/info.html.twig

@ -2,10 +2,14 @@ @@ -2,10 +2,14 @@
{{ 'block:' | trans }} {{ wallet.block }}
/
{{ 'balance:' | trans }} {{ wallet.balance }}
{% if mine.address %}
{% if boost.address %}
/
{{ 'charge:' | trans }}
<pre>{{ mine.address }}</pre>
{% if explorer.url %}
<a href="{{ explorer.url }}{{ boost.address }}" target="_blank">{{ boost.address }}</a>
{% else %}
{{ boost.address }}
{% endif %}
{% endif %}
{% if mine.pool %}
/

Loading…
Cancel
Save