Hide API-related extra buttons if --hide-api is specified

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2025-06-15 12:03:43 +02:00
parent 2b3f51a28b
commit 73f0309df1
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

View File

@ -64,14 +64,16 @@
</a>
<ul id="nav" class="right hide-on-med-and-down top-nav position-relative">
{% set menulinks %}
{% if not hide_api %}
<li><a href="{{ swagger_url }}">{{ _h("API Docs") }}</a></li>
{% if get_api_key_link %}
<li><a href="{{ get_api_key_link }}">{{ _h("Get API Key") }}</a></li>
{% endif %}
<li><a href="https://github.com/LibreTranslate/LibreTranslate" rel="noopener noreferrer">{{ _h("GitHub") }}</a></li>
{% if api_keys %}
<li><a class="noline" href="javascript:setApiKey()" title="{{ _h('Set API Key') }}" aria-label="{{ _h('Set API Key') }}"><i class="material-icons">vpn_key</i></a></li>
{% endif %}
{% endif %}
<li><a href="https://github.com/LibreTranslate/LibreTranslate" rel="noopener noreferrer">{{ _h("GitHub") }}</a></li>
<li class="change-language"><a class="noline" href="javascript:void(0)" title="{{ _h('Change language') }}"><i class="material-icons">language</i></a>
</li>
<li class="locale-panel">