Service Menu UI

This commit is contained in:
rootzoll 2021-08-30 23:35:55 +02:00
parent de96278a92
commit ebffb38875
2 changed files with 25 additions and 23 deletions

View File

@ -169,7 +169,6 @@ OPTIONS+=(UPDATE "Check/Prepare RaspiBlitz Update")
OPTIONS+=(REBOOT "Reboot RaspiBlitz") OPTIONS+=(REBOOT "Reboot RaspiBlitz")
OPTIONS+=(OFF "PowerOff RaspiBlitz") OPTIONS+=(OFF "PowerOff RaspiBlitz")
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1")) CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
HEIGHT=$((CHOICE_HEIGHT+6)) HEIGHT=$((CHOICE_HEIGHT+6))
CHOICE=$(dialog --clear \ CHOICE=$(dialog --clear \

View File

@ -30,36 +30,39 @@ if [ ${#sparko} -eq 0 ]; then sparko="off"; fi
echo "run dialog ..." echo "run dialog ..."
OPTIONS=() OPTIONS=()
OPTIONS+=(e 'Electrum Rust Server' ${ElectRS})
# just available for BTC
if [ "${chain}" == "bitcoin" ]; then
OPTIONS+=(e 'BTC Electrum Rust Server' ${ElectRS})
OPTIONS+=(p 'BTC PayServer' ${BTCPayServer}) OPTIONS+=(p 'BTC PayServer' ${BTCPayServer})
OPTIONS+=(b 'BTC-RPC-Explorer' ${BTCRPCexplorer}) OPTIONS+=(b 'BTC RPC-Explorer' ${BTCRPCexplorer})
OPTIONS+=(s 'Specter Desktop' ${specter}) OPTIONS+=(s 'BTC Specter Desktop' ${specter})
OPTIONS+=(a 'Mempool Space' ${mempoolExplorer}) OPTIONS+=(a 'BTC Mempool Space' ${mempoolExplorer})
OPTIONS+=(j 'BTC JoinMarket+JoininBox menu' ${joinmarket})
OPTIONS+=(w 'BTC Download Bitcoin Whitepaper' ${whitepaper})
fi
# just available for LND # just available for LND
if [ "${lightning}" == "lnd" ]; then if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
OPTIONS+=(r 'RTL LND Webinterface' ${rtlWebinterface}) OPTIONS+=(r 'LND RTL Webinterface' ${rtlWebinterface})
OPTIONS+=(t 'ThunderHub' ${thunderhub}) OPTIONS+=(t 'LND ThunderHub' ${thunderhub})
OPTIONS+=(l 'LIT (loop, pool, faraday)' ${lit}) OPTIONS+=(l 'LND LIT (loop, pool, faraday)' ${lit})
OPTIONS+=(i 'LNbits' ${LNBits}) OPTIONS+=(i 'LND LNbits' ${LNBits})
OPTIONS+=(o 'Balance of Satoshis' ${bos}) OPTIONS+=(o 'LND Balance of Satoshis' ${bos})
OPTIONS+=(y 'PyBLOCK' ${pyblock}) OPTIONS+=(y 'LND PyBLOCK' ${pyblock})
OPTIONS+=(h 'ChannelTools (Fund Rescue)' ${chantools}) OPTIONS+=(h 'LND ChannelTools (Fund Rescue)' ${chantools})
OPTIONS+=(x 'Sphinx-Relay' ${sphinxrelay}) OPTIONS+=(x 'LND Sphinx-Relay' ${sphinxrelay})
fi fi
# just available for CLN # just available for CLN
if [ "${lightning}" == "cln" ]; then if [ "${lightning}" == "cln" ] || [ "${cln}" == "on" ]; then
OPTIONS+=(c 'RTL C-Lightning Webinterface' ${crtlWebinterface}) OPTIONS+=(c 'C-Lightning RTL Webinterface' ${crtlWebinterface})
OPTIONS+=(k 'Sparko C-Lightning WebWallet' ${sparko}) OPTIONS+=(k 'C-Lightning Sparko WebWallet' ${sparko})
fi fi
OPTIONS+=(j 'JoinMarket with JoininBox menu' ${joinmarket}) CHOICES=$(dialog --title ' Additional Mainnet Services ' \
OPTIONS+=(w 'Download Bitcoin Whitepaper' ${whitepaper})
CHOICES=$(dialog --title ' Additional Services ' \
--checklist ' use spacebar to activate/de-activate ' \ --checklist ' use spacebar to activate/de-activate ' \
24 45 17 "${OPTIONS[@]}" 2>&1 >/dev/tty) 24 55 17 "${OPTIONS[@]}" 2>&1 >/dev/tty)
dialogcancel=$? dialogcancel=$?
echo "done dialog" echo "done dialog"