diff --git a/app/assets/v2/images/press/hosting-advice.png b/app/assets/v2/images/press/hosting-advice.png new file mode 100644 index 00000000000..074ee849eab Binary files /dev/null and b/app/assets/v2/images/press/hosting-advice.png differ diff --git a/app/assets/v2/js/metamask-approval.js b/app/assets/v2/js/metamask-approval.js index 69750887eb0..94fef0ef7d4 100644 --- a/app/assets/v2/js/metamask-approval.js +++ b/app/assets/v2/js/metamask-approval.js @@ -3,7 +3,7 @@ var is_metamask_approved = is_metamask_approved || false; var is_metamask_unlocked = is_metamask_unlocked || false; async function metamaskApproval() { - if (window.ethereum) { + if (window.ethereum && window.ethereum._metamask) { window.web3 = new Web3(ethereum); is_metamask_approved = await window.ethereum._metamask.isApproved(); is_metamask_unlocked = await window.ethereum._metamask.isUnlocked(); diff --git a/app/assets/v2/js/pages/bounty_details.js b/app/assets/v2/js/pages/bounty_details.js index b34da67c92d..1fda02a3c44 100644 --- a/app/assets/v2/js/pages/bounty_details.js +++ b/app/assets/v2/js/pages/bounty_details.js @@ -123,33 +123,38 @@ var callbacks = { '">' ]; }, 'status': function(key, val, result) { - var ui_status = val; + let ui_status = val; - if (ui_status == 'open') { + if (ui_status === 'open') { ui_status = '' + gettext('OPEN ISSUE') + ''; - let soft = result['can_submit_after_expiration_date']; + let can_submit = result['can_submit_after_expiration_date']; - if (soft && is_bounty_expired(result)) { - ui_status += '

' + + if (!isBountyOwner && can_submit && is_bounty_expired(result)) { + ui_status += '

' + gettext('This issue is past its expiration date, but it is still active.') + '
' + gettext('Check with the submitter to see if they still want to see it fulfilled.') + '

'; } - } - if (ui_status == 'started') { + } else if (ui_status === 'started') { ui_status = '' + gettext('work started') + ''; - } - if (ui_status == 'submitted') { + } else if (ui_status === 'submitted') { ui_status = '' + gettext('work submitted') + ''; - } - if (ui_status == 'done') { + } else if (ui_status === 'done') { ui_status = '' + gettext('done') + ''; - } - if (ui_status == 'cancelled') { + } else if (ui_status === 'cancelled') { ui_status = '' + gettext('cancelled') + ''; } + + if (isBountyOwner && is_bounty_expired(result) && + ui_status !== 'done' && ui_status !== 'cancelled') { + + ui_status += '

' + + 'This issue has expired. Click here to extend expiration ' + + 'before taking any bounty actions.

'; + } + return [ 'status', ui_status ]; }, 'issue_description': function(key, val, result) { @@ -1423,7 +1428,7 @@ const process_activities = function(result, bounty_activities) { const new_bounty = meta.new_bounty || {}; const old_bounty = meta.old_bounty || {}; const has_signed_nda = result.interested.length ? - result.interested.map(interest => { + result.interested.find(interest => { if (interest.profile.handle === _activity.profile.handle && interest.signed_nda) { return interest.signed_nda.doc; } diff --git a/app/assets/v2/js/shared.js b/app/assets/v2/js/shared.js index 502b79d35bc..be2a3279e60 100644 --- a/app/assets/v2/js/shared.js +++ b/app/assets/v2/js/shared.js @@ -991,7 +991,7 @@ var listen_for_web3_changes = async function() { } } - if (window.ethereum && !document.has_checked_for_ethereum_enable) { + if (window.ethereum && !document.has_checked_for_ethereum_enable && window.ethereum._metamask) { document.has_checked_for_ethereum_enable = true; is_metamask_approved = await window.ethereum._metamask.isApproved(); is_metamask_unlocked = await window.ethereum._metamask.isUnlocked(); diff --git a/app/dashboard/templates/bounty/details.html b/app/dashboard/templates/bounty/details.html index e974bfaef71..1d1abb207e9 100644 --- a/app/dashboard/templates/bounty/details.html +++ b/app/dashboard/templates/bounty/details.html @@ -278,8 +278,8 @@
{% trans "Funder" %}
[[:text]] - [[if signed_nda && signed_nda != 'false']] - View signed NDA + [[if signed_nda]] + View signed NDA [[/if]]
[[if can_approve_worker ]] diff --git a/app/retail/views.py b/app/retail/views.py index b10dd1d3a2f..caac91e9510 100644 --- a/app/retail/views.py +++ b/app/retail/views.py @@ -166,6 +166,10 @@ def index(request): { 'link': 'https://www.ethnews.com/gitcoin-offers-bounties-for-ens-integration-into-dapps', 'img': 'v2/images/press/ethnews.jpg' + }, + { + 'link': 'https://www.hostingadvice.com/blog/grow-open-source-projects-with-gitcoin/', + 'img': 'v2/images/press/hosting-advice.png' } ]