Add options for resellers

This commit is contained in:
Taylor Helsper 2020-04-30 20:37:17 -05:00
parent 7102e03148
commit dea1440801
8 changed files with 24 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

View File

@ -58,6 +58,21 @@ if [ ! -f /var/lib/mynode/.expanded_rootfs ]; then
fi
fi
# Customize logo for resellers
if [ -f /opt/mynode/custom/reseller ]; then
if [ -f /opt/mynode/custom/logo_custom.png ]; then
cp -f /opt/mynode/custom/logo_custom.png /var/www/mynode/static/images/logo.png
else
cp -f /var/www/mynode/static/images/logo_original.png /var/www/mynode/static/images/logo.png
fi
if [ -f /opt/mynode/custom/logo_dark_custom.png ]; then
cp -f /opt/mynode/custom/logo_dark_custom.png /var/www/mynode/static/images/logo_dark.png
else
cp -f /var/www/mynode/static/images/logo_dark_original.png /var/www/mynode/static/images/logo_dark.png
fi
fi
# Verify we are in a clean state
if [ $IS_RASPI -eq 1 ] || [ $IS_ROCKPRO64 -eq 1 ]; then
dphys-swapfile swapoff || true

View File

@ -165,6 +165,12 @@ def get_recent_upgrade_logs():
pass
return logs
#==================================
# Reseller Info
#==================================
def is_device_from_reseller():
return os.path.isfile("/opt/mynode/custom/reseller")
#==================================
# Device Info

View File

@ -466,6 +466,7 @@ def index():
"lnd_ready": lnd_ready,
"tor_status_color": tor_status_color,
"is_installing_docker_images": is_installing_docker_images(),
"is_device_from_reseller": is_device_from_reseller(),
"electrs_status_color": electrs_status_color,
"electrs_status": Markup(electrs_status),
"electrs_enabled": is_electrs_enabled(),

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

View File

@ -73,6 +73,7 @@
{% endif %}
</div>
</div>
{% if not is_device_from_reseller %}
<div class="app_tile">
<div class="app_status_icon {{ dojo_status_color }}"></div>
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/samourai.png")}}"/></div>
@ -107,6 +108,7 @@
</a>
</div>
</div>
{% endif %}
<div class="app_tile">
<div class="app_status_icon {% if product_key_skipped %}gray{% else %} {{mempoolspace_status_color}} {% endif %}"></div>
<div class="app_logo"><img class="app_logo_icon" src="{{ url_for('static', filename="images/mempoolspace.png")}}"/></div>