Skip to content

Commit

Permalink
ui: hide token on data page as well
Browse files Browse the repository at this point in the history
See #9520
  • Loading branch information
nijel committed Aug 1, 2023
1 parent 81af019 commit c821091
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions weblate/templates/data.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load i18n %}
{% load translations %}
{% load icons %}

{% block breadcrumbs %}
<li><a href="{{ object.get_absolute_url }}">{{ object }}</a></li>
Expand Down Expand Up @@ -79,8 +80,8 @@ <h3>
<p>{% trans "You can fetch statistics for all translations in one component like this:" %}</p>

<pre>
curl \
-H "Authorization: Token {{ request.user.auth_token.key|default:"TOKEN" }}" \
<button type="button" class="btn btn-link btn-xs pull-right" data-visibility=".auth-token" title="{% trans "Toogle API key visibility" %}">{% icon "eye.svg" %}</button>curl \
-H "Authorization: Token <span class="auth-token">{{ request.user.auth_token.key|default:"TOKEN" }}</span>" \
{{ site_url }}{% url 'api:component-translations' project__slug=object.slug slug=component.slug %}
</pre>
{% endif %}
Expand Down Expand Up @@ -123,9 +124,9 @@ <h3>
<p>{% trans "You pull changes from a remote repository to Weblate like this:" %}</p>

<pre>
curl \
<button type="button" class="btn btn-link btn-xs pull-right" data-visibility=".auth-token" title="{% trans "Toogle API key visibility" %}">{% icon "eye.svg" %}</button>curl \
-d operation=pull \
-H "Authorization: Token {{ request.user.auth_token.key|default:"TOKEN" }}" \
-H "Authorization: Token <span class="auth-token">{{ request.user.auth_token.key|default:"TOKEN" }}</span>" \
{{ site_url }}{% url 'api:project-repository' slug=object.slug %}
</pre>

Expand Down

0 comments on commit c821091

Please sign in to comment.