Skip to content

Commit

Permalink
qa fixes
Browse files Browse the repository at this point in the history
- wired up active state
- show alpha banner only when needed

Refs: gitcoinco#2949
  • Loading branch information
thelostone-mc committed Nov 30, 2018
1 parent 468b326 commit 4ae0ddc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/assets/v2/js/grants/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ $(document).ready(function() {
$('#unlock_metamask_error').css('display', 'none');
$('#connect_metamask_error').css('display', 'none');
$('#no_issue_error').css('display', 'none');
$('.alpha-warning').addClass('hidden');
mixpanel_track_once('No Metamask Error', params);
} else if (is_metamask_unlocked && !is_metamask_approved) {
$('#connect_metamask_error').css('display', 'block');
Expand All @@ -78,6 +79,7 @@ $(document).ready(function() {
$('#grants_form').addClass('hidden');
$('.submit_bounty .newsletter').addClass('hidden');
$('#no_issue_error').css('display', 'none');
$('.alpha-warning').addClass('hidden');
mixpanel_track_once('Unlock Metamask Error', params);
} else if (!result) {
$('#unlock_metamask_error').css('display', 'block');
Expand All @@ -88,6 +90,7 @@ $(document).ready(function() {
$('#grants_form').addClass('hidden');
$('.submit_bounty .newsletter').addClass('hidden');
$('#no_issue_error').css('display', 'none');
$('.alpha-warning').addClass('hidden');
mixpanel_track_once('Unlock Metamask Error', params);
} else if (is_zero_balance_not_okay && document.balance == 0) {
$('#zero_balance_error').css('display', 'block');
Expand All @@ -98,6 +101,7 @@ $(document).ready(function() {
$('#connect_metamask_error').css('display', 'none');
$('#no_metamask_error').css('display', 'none');
$('#no_issue_error').css('display', 'none');
$('.alpha-warning').addClass('hidden');
mixpanel_track_once('Zero Balance Metamask Error', params);
} else {
$('#zero_balance_error').css('display', 'none');
Expand All @@ -108,6 +112,7 @@ $(document).ready(function() {
$('#robot_error').addClass('hidden');
$('#grants_form').removeClass('hidden');
$('.submit_bounty .newsletter').removeClass('hidden');
$('.alpha-warning').removeClass('hidden');
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion app/grants/templates/grants/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h2 class="grant-item__title font-subheader"><a href="{% url 'grants:details' gr
</div>
</div>
<div class="grant-item__state mt-3">
{% if grant %} <!-- TODO: wire up grant state -->
{% if grant.active %}
<div class="grant-item__state-active">
<div class="inner"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/grants/templates/grants/shared/alpha.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}
{% load static humanize i18n %}
<div class="alpha-warning font-caption mb-0">
<div class="alpha-warning font-caption mb-0 hidden">
{% trans "WARNING: Gitcoin Grants is in" %}
<span class="font-weight-bold">ALPHA</span>
{% trans "release. Please use caution if funding at high values." %}
Expand Down

0 comments on commit 4ae0ddc

Please sign in to comment.