Skip to content

Commit

Permalink
Merge branch 'master' into rating-disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored Apr 10, 2019
2 parents 1a72a4f + 2bb3953 commit 5c0f1e1
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 18 deletions.
Binary file added app/assets/v2/images/press/hosting-advice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ -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();
Expand Down
33 changes: 19 additions & 14 deletions app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,33 +123,38 @@ var callbacks = {
'"><img class=avatar src="/dynamic/avatar/' + username + '"></a>' ];
},
'status': function(key, val, result) {
var ui_status = val;
let ui_status = val;

if (ui_status == 'open') {
if (ui_status === 'open') {
ui_status = '<span>' + gettext('OPEN ISSUE') + '</span>';

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 += '<p class="text-highlight-light-blue" style="text-transform: none;">' +
if (!isBountyOwner && can_submit && is_bounty_expired(result)) {
ui_status += '<p class="text-highlight-light-blue font-weight-light font-body" style="text-transform: none;">' +
gettext('This issue is past its expiration date, but it is still active.') +
'<br>' +
gettext('Check with the submitter to see if they still want to see it fulfilled.') +
'</p>';
}
}
if (ui_status == 'started') {
} else if (ui_status === 'started') {
ui_status = '<span>' + gettext('work started') + '</span>';
}
if (ui_status == 'submitted') {
} else if (ui_status === 'submitted') {
ui_status = '<span>' + gettext('work submitted') + '</span>';
}
if (ui_status == 'done') {
} else if (ui_status === 'done') {
ui_status = '<span>' + gettext('done') + '</span>';
}
if (ui_status == 'cancelled') {
} else if (ui_status === 'cancelled') {
ui_status = '<span style="color: #f9006c;">' + gettext('cancelled') + '</span>';
}

if (isBountyOwner && is_bounty_expired(result) &&
ui_status !== 'done' && ui_status !== 'cancelled') {

ui_status += '<p class="font-weight-light font-body" style="color: black; text-transform: none;">' +
'This issue has expired. Click <a class="text-highlight-light-blue font-weight-semibold" href="/extend-deadlines">here to extend expiration</a> ' +
'before taking any bounty actions. </p>';
}

return [ 'status', ui_status ];
},
'issue_description': function(key, val, result) {
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions app/dashboard/templates/bounty/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ <h5 class="bounty-heading">{% trans "Funder" %}</h5>
<div class="col-12 col-md-7 started-status-column d-flex">
<div class="activity-status">
[[:text]]
[[if signed_nda && signed_nda != 'false']]
<a href="[[:signed_nda]]" download class="d-flex">View signed NDA</a>
[[if signed_nda]]
<a href="[[:signed_nda.signed_nda.doc]]" download class="d-flex">View signed NDA</a>
[[/if]]
</div>
[[if can_approve_worker ]]
Expand Down
4 changes: 4 additions & 0 deletions app/retail/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
]

Expand Down

0 comments on commit 5c0f1e1

Please sign in to comment.