Skip to content

Commit cdccd88

Browse files
committed
Merge pull request #2621 from getsentry/keys
Stylize disabled client keys more obviously
1 parent d730d12 commit cdccd88

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/sentry/static/sentry/less/project-settings.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,7 @@
162162
color: #fff;
163163
}
164164
}
165+
.client-key-item.disabled {
166+
opacity: 0.5;
167+
}
165168
}

src/sentry/templates/sentry/projects/keys.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ <h2>{% trans "Client Keys" %}</h2>
1919
a look at our <a href="https://docs.getsentry.com">documentation</a>.</p>
2020

2121
<div class="client-key-list">
22-
{% for key in key_list %}
23-
<div class="client-key-item">
22+
{% for key in key_list|dictsortreversed:"is_active" %}
23+
<div class="client-key-item{% if not key.is_active %} disabled{% endif %}">
2424
<div class="pull-right">
2525
<a class="btn btn-default btn-sm" href="{% url 'sentry-edit-project-key' project.organization.slug project.slug key.id %}">{% trans "Details" %}</a>
2626
{% if ACCESS.project_write %}
@@ -32,7 +32,7 @@ <h2>{% trans "Client Keys" %}</h2>
3232
{% else %}
3333
<form method="POST" action="{% url 'sentry-enable-project-key' project.organization.slug project.slug key.id %}" style="display:inline">
3434
{% csrf_token %}
35-
<input type="submit" class="btn btn-primary btn-sm" value="{% trans "Enable" %}">
35+
<input type="submit" class="btn btn-default btn-sm" value="{% trans "Enable" %}">
3636
</form>
3737
{% endif %}
3838
{% endif %}
@@ -44,9 +44,9 @@ <h2>{% trans "Client Keys" %}</h2>
4444
{% endif %}
4545
</div>
4646
{% if key.label %}
47-
<h5><a href="{% url 'sentry-edit-project-key' project.organization.slug project.slug key.id %}">{{ key.label }}</a></h5>
47+
<h5><a href="{% url 'sentry-edit-project-key' project.organization.slug project.slug key.id %}">{{ key.label }}</a>{% if not key.is_active %} <small><i class="icon-ban"></i> Disabled</small>{% endif %}</h5>
4848
{% else %}
49-
<h5><a href="{% url 'sentry-edit-project-key' project.organization.slug project.slug key.id %}">{{ key.public_key }}</a></h5>
49+
<h5><a href="{% url 'sentry-edit-project-key' project.organization.slug project.slug key.id %}">{{ key.public_key }}</a>{% if not key.is_active %} <small><i class="icon-ban"></i> Disabled</small>{% endif %}</h5>
5050
{% endif %}
5151

5252
<div class="form-group">

0 commit comments

Comments
 (0)