mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
Slightly improved onboarding
- Hides left nav Wallet UI until there is at least one device registered. - Auto-routes the index to the new_device page. - new_device title change
This commit is contained in:
parent
07d8b10fba
commit
3c14d42201
3 changed files with 51 additions and 42 deletions
|
|
@ -59,7 +59,12 @@ def index():
|
|||
specter.check()
|
||||
if len(specter.wallets) > 0:
|
||||
return redirect("/wallets/%s" % specter.wallets[specter.wallets.names()[0]]["alias"])
|
||||
|
||||
# TODO: add onboarding process
|
||||
if not specter.devices:
|
||||
# For now: can't do anything until a device is registered
|
||||
return redirect("/new_device/")
|
||||
|
||||
return render_template("base.html", specter=specter, rand=rand)
|
||||
|
||||
@app.route('/settings/', methods=['GET', 'POST'])
|
||||
|
|
|
|||
|
|
@ -27,49 +27,53 @@
|
|||
</small>
|
||||
</div>
|
||||
</a>
|
||||
<div class="separator">
|
||||
Wallets
|
||||
</div>
|
||||
{% for wallet in specter.wallets %}
|
||||
{% if wallet_alias == wallet.alias %}
|
||||
<a href="/wallets/{{wallet.alias}}/" class="item active">
|
||||
{% else %}
|
||||
<a href="/wallets/{{wallet.alias}}/" class="item">
|
||||
{% endif %}
|
||||
{% if wallet.is_multisig() %}
|
||||
<svg width="18px" height="25px" viewBox="0 0 140 170" version="1.1">
|
||||
{% else %}
|
||||
<svg width="18px" height="25px" viewBox="0 50 100 150" version="1.1">
|
||||
{% endif %}
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Group-2" transform="translate(57.000000, 99.500000) rotate(75.000000) translate(-57.000000, -99.500000) translate(-37.000000, 25.000000)">
|
||||
<path d="M109.318138,82.5452222 C104.547229,67.7885555 91.6308655,57.2118888 76.445411,57.2118888 C57.1872292,57.2118888 41.5363201,74.2485555 41.5363201,95.2118888 C41.5363201,116.175222 57.1872292,133.211889 76.445411,133.211889 C91.6308655,133.211889 104.547229,122.635222 109.318138,107.878555 L134.627229,107.878555 L134.627229,133.211889 L157.899956,133.211889 L157.899956,107.878555 L169.53632,107.878555 L169.53632,82.5452222 L109.318138,82.5452222 Z M76.445411,107.878555 C70.045411,107.878555 64.8090473,102.178555 64.8090473,95.2118888 C64.8090473,88.2452222 70.045411,82.5452222 76.445411,82.5452222 C82.845411,82.5452222 88.0817746,88.2452222 88.0817746,95.2118888 C88.0817746,102.178555 82.845411,107.878555 76.445411,107.878555 Z" id="Shape" fill="#FFFFFF" fill-rule="nonzero" transform="translate(105.536320, 95.211889) rotate(15.000000) translate(-105.536320, -95.211889) "></path>
|
||||
{% if wallet.is_multisig() %}
|
||||
<path d="M119.379895,40.6029336 C114.608986,25.846267 101.692623,15.2696003 86.5071681,15.2696003 C67.2489863,15.2696003 51.5980772,32.306267 51.5980772,53.2696003 C51.5980772,74.2329336 67.2489863,91.2696003 86.5071681,91.2696003 C101.692623,91.2696003 114.608986,80.6929336 119.379895,65.936267 L144.688986,65.936267 L144.688986,91.2696003 L167.961714,91.2696003 L167.961714,65.936267 L179.598077,65.936267 L179.598077,40.6029336 L119.379895,40.6029336 Z M86.5071681,65.936267 C80.1071681,65.936267 74.8708045,60.236267 74.8708045,53.2696003 C74.8708045,46.3029336 80.1071681,40.6029336 86.5071681,40.6029336 C92.9071681,40.6029336 98.1435318,46.3029336 98.1435318,53.2696003 C98.1435318,60.236267 92.9071681,65.936267 86.5071681,65.936267 Z" id="Shape" fill-opacity="0.53" fill="#FFFFFF" fill-rule="nonzero" transform="translate(115.598077, 53.269600) rotate(-15.000000) translate(-115.598077, -53.269600) "></path>
|
||||
<circle id="Oval" stroke="#FFFFFF" stroke-width="10" cx="42" cy="64" r="42"></circle>
|
||||
{% endif %}
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="grow">
|
||||
<div class="row">
|
||||
{{wallet.name}}
|
||||
{% if specter.chain %}
|
||||
{% if wallet.fullbalance is not none %}
|
||||
<span class="balance">{{ "%0.8f" % (wallet.fullbalance ) | float}}
|
||||
<!-- {% if specter.chain != "main" %} t{%endif%}BTC -->
|
||||
</span>
|
||||
{%endif%}
|
||||
{%endif%}</div>
|
||||
<small>{{ wallet.description }}</small>
|
||||
|
||||
{% if specter.devices %}
|
||||
<div class="separator">
|
||||
Wallets
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
<div class="item">
|
||||
<a href="/new_wallet/" class="btn">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>Create new wallet
|
||||
{% for wallet in specter.wallets %}
|
||||
{% if wallet_alias == wallet.alias %}
|
||||
<a href="/wallets/{{wallet.alias}}/" class="item active">
|
||||
{% else %}
|
||||
<a href="/wallets/{{wallet.alias}}/" class="item">
|
||||
{% endif %}
|
||||
{% if wallet.is_multisig() %}
|
||||
<svg width="18px" height="25px" viewBox="0 0 140 170" version="1.1">
|
||||
{% else %}
|
||||
<svg width="18px" height="25px" viewBox="0 50 100 150" version="1.1">
|
||||
{% endif %}
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Group-2" transform="translate(57.000000, 99.500000) rotate(75.000000) translate(-57.000000, -99.500000) translate(-37.000000, 25.000000)">
|
||||
<path d="M109.318138,82.5452222 C104.547229,67.7885555 91.6308655,57.2118888 76.445411,57.2118888 C57.1872292,57.2118888 41.5363201,74.2485555 41.5363201,95.2118888 C41.5363201,116.175222 57.1872292,133.211889 76.445411,133.211889 C91.6308655,133.211889 104.547229,122.635222 109.318138,107.878555 L134.627229,107.878555 L134.627229,133.211889 L157.899956,133.211889 L157.899956,107.878555 L169.53632,107.878555 L169.53632,82.5452222 L109.318138,82.5452222 Z M76.445411,107.878555 C70.045411,107.878555 64.8090473,102.178555 64.8090473,95.2118888 C64.8090473,88.2452222 70.045411,82.5452222 76.445411,82.5452222 C82.845411,82.5452222 88.0817746,88.2452222 88.0817746,95.2118888 C88.0817746,102.178555 82.845411,107.878555 76.445411,107.878555 Z" id="Shape" fill="#FFFFFF" fill-rule="nonzero" transform="translate(105.536320, 95.211889) rotate(15.000000) translate(-105.536320, -95.211889) "></path>
|
||||
{% if wallet.is_multisig() %}
|
||||
<path d="M119.379895,40.6029336 C114.608986,25.846267 101.692623,15.2696003 86.5071681,15.2696003 C67.2489863,15.2696003 51.5980772,32.306267 51.5980772,53.2696003 C51.5980772,74.2329336 67.2489863,91.2696003 86.5071681,91.2696003 C101.692623,91.2696003 114.608986,80.6929336 119.379895,65.936267 L144.688986,65.936267 L144.688986,91.2696003 L167.961714,91.2696003 L167.961714,65.936267 L179.598077,65.936267 L179.598077,40.6029336 L119.379895,40.6029336 Z M86.5071681,65.936267 C80.1071681,65.936267 74.8708045,60.236267 74.8708045,53.2696003 C74.8708045,46.3029336 80.1071681,40.6029336 86.5071681,40.6029336 C92.9071681,40.6029336 98.1435318,46.3029336 98.1435318,53.2696003 C98.1435318,60.236267 92.9071681,65.936267 86.5071681,65.936267 Z" id="Shape" fill-opacity="0.53" fill="#FFFFFF" fill-rule="nonzero" transform="translate(115.598077, 53.269600) rotate(-15.000000) translate(-115.598077, -53.269600) "></path>
|
||||
<circle id="Oval" stroke="#FFFFFF" stroke-width="10" cx="42" cy="64" r="42"></circle>
|
||||
{% endif %}
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="grow">
|
||||
<div class="row">
|
||||
{{wallet.name}}
|
||||
{% if specter.chain %}
|
||||
{% if wallet.fullbalance is not none %}
|
||||
<span class="balance">{{ "%0.8f" % (wallet.fullbalance ) | float}}
|
||||
<!-- {% if specter.chain != "main" %} t{%endif%}BTC -->
|
||||
</span>
|
||||
{%endif%}
|
||||
{%endif%}</div>
|
||||
<small>{{ wallet.description }}</small>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="item">
|
||||
<a href="/new_wallet/" class="btn">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>Create new wallet
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="separator">
|
||||
Devices
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% block main %}
|
||||
<div class="spacer"></div>
|
||||
<h1>Select the hardware</h1>
|
||||
<h1>Add New Device</h1>
|
||||
<div class="row">
|
||||
<a href="./coldcard/" class="small-card">
|
||||
<img src="/static/img/coldcard_icon.svg?{{rand}}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue