Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
danlipert committed Jun 8, 2020
2 parents 77126d1 + b6dad7f commit ddac4bd
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 23 deletions.
7 changes: 6 additions & 1 deletion app/assets/v2/css/gitcoin.css
Original file line number Diff line number Diff line change
Expand Up @@ -929,4 +929,9 @@ textarea.status-textarea {

.dark-mode .bg-light {
background-color: var(--bg-shade-0)!important;
}
}

.svg-animated-logo {
height: 42px;
max-width: 100%;
}
2 changes: 1 addition & 1 deletion app/assets/v2/js/metamask-approval.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function metamaskApproval() {
is_metamask_unlocked = await window.ethereum._metamask.isUnlocked();

try {
if (is_metamask_unlocked && is_metamask_approved) {
if (!is_metamask_unlocked || !is_metamask_approved) {
var start_time = ((new Date()).getTime() / 1000);

await ethereum.enable();
Expand Down
11 changes: 10 additions & 1 deletion app/dashboard/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,16 @@ def build_profile_pairs(bounty):
if fulfillment.profile and fulfillment.profile.handle.strip() and fulfillment.profile.absolute_url:
profile_handles.append((fulfillment.profile.handle, fulfillment.profile.absolute_url))
else:
addr = f"https://etherscan.io/address/{fulfillment.fulfiller_address}"
if bounty.tenant == 'ETH':
addr = f"https://etherscan.io/address/{fulfillment.fulfiller_address}"
elif bounty.tenant == 'ZIL':
addr = f"https://viewblock.io/zilliqa/address/{fulfillment.fulfiller_address}"
elif bounty.tenant == 'CELO':
addr = f"https://alfajores-blockscout.celo-testnet.org/address/{fulfillment.fulfiller_address}"
elif bounty.tenant == 'ETC':
addr = f"https://blockscout.com/etc/mainnet/address/{fulfillment.fulfiller_address}"
else:
addr = None
profile_handles.append((fulfillment.fulfiller_address, addr))
return profile_handles

Expand Down
18 changes: 9 additions & 9 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
from dashboard.context import quickstart as qs
from dashboard.tasks import increment_view_count
from dashboard.utils import (
ProfileHiddenException, ProfileNotFoundException, get_bounty_from_invite_url, get_orgs_perms, profile_helper,
ProfileHiddenException, ProfileNotFoundException, build_profile_pairs, get_bounty_from_invite_url, get_orgs_perms,
profile_helper,
)
from economy.utils import ConversionRateNotFoundError, convert_amount, convert_token_to_usdt
from eth_utils import to_checksum_address, to_normalized_address
Expand Down Expand Up @@ -4874,9 +4875,7 @@ def create_bounty_v1(request):
event_name = 'new_bounty'
record_bounty_activity(bounty, user, event_name)
maybe_market_to_email(bounty, event_name)

# maybe_market_to_slack(bounty, event_name)
# maybe_market_to_user_slack(bounty, event_name)
maybe_market_to_github(bounty, event_name)

response = {
'status': 204,
Expand Down Expand Up @@ -4938,9 +4937,8 @@ def cancel_bounty_v1(request):

event_name = 'killed_bounty'
record_bounty_activity(bounty, user, event_name)
# maybe_market_to_email(bounty, event_name)
# maybe_market_to_slack(bounty, event_name)
# maybe_market_to_user_slack(bounty, event_name)
maybe_market_to_email(bounty, event_name)
maybe_market_to_github(bounty, event_name)

bounty.bounty_state = 'cancelled'
bounty.idx_status = 'cancelled'
Expand Down Expand Up @@ -5029,8 +5027,8 @@ def fulfill_bounty_v1(request):
event_name = 'work_submitted'
record_bounty_activity(bounty, user, event_name)
maybe_market_to_email(bounty, event_name)
# maybe_market_to_slack(bounty, event_name)
# maybe_market_to_user_slack(bounty, event_name)
profile_pairs = build_profile_pairs(bounty)
maybe_market_to_github(bounty, event_name, profile_pairs)

if bounty.bounty_state != 'work_submitted':
bounty.bounty_state = 'work_submitted'
Expand Down Expand Up @@ -5269,6 +5267,8 @@ def close_bounty_v1(request, bounty_id):

event_name = 'work_done'
record_bounty_activity(bounty, user, event_name)
maybe_market_to_email(bounty, event_name)
maybe_market_to_github(bounty, event_name)

bounty.bounty_state = 'done'
bounty.idx_status = 'done' # TODO: RETIRE
Expand Down
4 changes: 2 additions & 2 deletions app/grants/templates/grants/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</a>
<i class="white font-bigger-2 d-none d-md-block fa fa-angle-right"></i>
<a class="navbar-brand ml-2 py-0" href="{% url 'grants:grants' %}">
<img class="mw-100 logo-static" src="{% static "v2/images/top-bar/grants-neg.svg" %}" alt="Grants" height="35">
<!-- <img class="mw-100 logo-animated" src="{% static "v2/images/grants/grants-white.gif" %}" alt="Grants" height="50"> -->
<!-- <img class="mw-100 logo-static" src="{% static "v2/images/top-bar/grants-neg.svg" %}" alt="Grants" height="35"> -->
{% include 'shared/svg-embed/h35px_grants.svg' %}
</a>
{% if request.path|matches:"^\/((.*new)|(.*cancel)|(.*fund))$" %}
<button id="wallet-button" class="navbar-network ml-xl-5 py-1 px-2 hidden btn btn-outline-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Expand Down
7 changes: 7 additions & 0 deletions app/grants/templates/grants/new-whitelabel.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,11 @@ <h3 class="text-center">
<script src="{% static "v2/js/pages/shared_bounty_mutation_estimate_gas.js" %}"></script>
<script src="{% static "v2/js/grants/shared.js" %}"></script>
<script src="{% static "v2/js/grants/new.js" %}"></script>
<script>
is_logged_in = {{ is_logged_in }};
if (is_logged_in == 0) {
_alert("You must be logged in to register your DApp");
$('#new_button').prop('disabled', true);
}
</script>
</html>
4 changes: 3 additions & 1 deletion app/grants/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,16 +613,18 @@ def flag(request, grant_id):
})


@login_required
def grant_new_whitelabel(request):
"""Create a new grant, with a branded creation form for specific tribe"""

profile = get_profile(request)

params = {
'active': 'new_grant',
'title': _('Matic Build-n-Earn x Gitcoin'),
'card_desc': _('Earn Rewards by Making Your DApps Superior'),
'card_player_thumb_override': request.build_absolute_uri(static('v2/images/grants/maticxgitcoin.png')),
'profile': profile,
'is_logged_in': 1 if profile else 0,
'grant': {},
'keywords': get_keywords(),
'recommend_gas_price': recommend_min_gas_price_to_confirm_in_time(4),
Expand Down
4 changes: 2 additions & 2 deletions app/kudos/templates/shared/kudos_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</a>
<i class="white font-bigger-2 d-none d-md-block fa fa-angle-right"></i>
<a class="navbar-brand ml-2 py-0" href="{% url 'kudos_marketplace' %}">
<img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/kudos-neg.svg' %}" alt="kudos" height="35">
<!-- <img class="mw-100 logo-animated" src="{% static "v2/images/kudos/kudos_faster_repeat.gif" %}" alt="kudos" height="50"> -->
<!-- <img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/kudos-neg.svg' %}" alt="kudos" height="35"> -->
{% include 'shared/svg-embed/h35px_kudos.svg' %}
</a>
{% if request.path|matches:"^\/((explorer)|(issue.*)|(.*new.*))$" %}
<button id="wallet-button" class="navbar-network ml-xl-5 py-1 px-2 hidden btn btn-outline-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Expand Down
4 changes: 2 additions & 2 deletions app/quests/templates/quests/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</a>
<i class="white font-bigger-2 d-none d-md-block fa fa-angle-right"></i>
<a class="navbar-brand ml-2 py-0" href="{% url 'quests_index' %}">
<img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/quests-neg.svg' %}" alt="Quests" height="35">
<!-- <img class="mw-100 logo-animated" src="{% static 'v2/images/quest_logo_hover.png' %}" alt="Quests" height="50"> -->
<!-- <img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/quests-neg.svg' %}" alt="Quests" height="35"> -->
{% include 'shared/svg-embed/h35px_quests.svg' %}
</a>
{% if request.path|matches:"^\/((.*new)|(.*cancel)|(.*fund))$" %}
<div class="navbar-network ml-xl-5 py-1 px-2 hidden">
Expand Down
4 changes: 2 additions & 2 deletions app/retail/templates/shared/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</a>
<i class="white font-bigger-2 d-none d-md-block fa fa-angle-right"></i>
<a class="navbar-brand ml-2 py-0" href="/explorer">
<img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/bounties-neg.svg' %}" alt="Bounties" height="35">
<!-- <img class="mw-100 logo-animated" src="{% static "v2/images/top-bar/bounties_desktop_hearbeating.gif" %}" alt="Logo" height="50"> -->
<!-- <img class="mw-100 logo-static" src="{% static 'v2/images/top-bar/bounties-neg.svg' %}" alt="Bounties" height="35"> -->
{% include 'shared/svg-embed/h35px_bounties.svg' %}
</a>
{% if request.path|matches:"^\/((explorer)|(issue.*)|(.*new.*))$" %}
<!-- TODO: FIGURE HOW TO HANDLE FOR CROSS CHAIN -->
Expand Down
4 changes: 2 additions & 2 deletions app/retail/templates/shared/nav_hackathons.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</a>
<i class="white font-bigger-2 d-none d-md-block fa fa-angle-right"></i>
<a class="navbar-brand ml-2 py-0" href="/hackathon-list">
<img class="mw-100 logo-static" id="logo" src="{% static 'v2/images/top-bar/hackathons-neg.svg' %}" height="35" alt="Logo" />
<!-- <img class="mw-100 logo-animated" src="{% static "v2/images/products/hackathons.gif" %}" alt="kudos" height="35" style="margin-top: -2px;"> -->
<!-- <img class="mw-100 logo-static" id="logo" src="{% static 'v2/images/top-bar/hackathons-neg.svg' %}" height="35" alt="Logo" /> -->
{% include 'shared/svg-embed/h35px_hackathons.svg' %}
</a>
{% if request.path|matches:"^\/((explorer)|(issue.*)|(.*new.*))$" %}
<div class="navbar-network ml-xl-5 py-1 px-2 hidden">
Expand Down
2 changes: 2 additions & 0 deletions app/retail/templates/shared/svg-embed/h35px_bounties.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/retail/templates/shared/svg-embed/h35px_codefund.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/retail/templates/shared/svg-embed/h35px_grants.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/retail/templates/shared/svg-embed/h35px_hackathons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/retail/templates/shared/svg-embed/h35px_kudos.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/retail/templates/shared/svg-embed/h35px_quests.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ddac4bd

Please sign in to comment.