Skip to content

Commit

Permalink
Merge pull request #6423 from gitcoinco/stable
Browse files Browse the repository at this point in the history
stable -> master
  • Loading branch information
thelostone-mc authored Apr 13, 2020
2 parents dd31769 + ce75a89 commit 3d0e575
Show file tree
Hide file tree
Showing 34 changed files with 828 additions and 344 deletions.
3 changes: 2 additions & 1 deletion app/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@
AUTH_USER_MODEL = 'auth.User'

# adds django debug toolbar
if DEBUG:
SUPRESS_DEBUG_TOOLBAR = env.bool('SUPRESS_DEBUG_TOOLBAR', default=False)
if DEBUG and not SUPRESS_DEBUG_TOOLBAR:
INTERNAL_IPS = [
# ...
'127.0.0.1',
Expand Down
4 changes: 2 additions & 2 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
name='profile_job_opportunity'
),
url(r'^api/v0.1/profile/(?P<handle>.*)', dashboard.views.profile_details, name='profile_details'),
url(r'^api/v0.1/user_card/(?P<handle>.*)', dashboard.views.user_card, name='user_card'),
url(r'^api/v0.1/banners', dashboard.views.load_banners, name='load_banners'),
url(
r'^api/v0.1/get_suggested_contributors',
Expand All @@ -156,7 +157,7 @@
url(r'^actions/api/v0.1/', include(dbrouter.urls)), # same as active
url(r'^api/v0.1/users_search/', dashboard.views.get_users, name='users_search'),
url(r'^api/v0.1/kudos_search/', dashboard.views.get_kudos, name='kudos_search'),
url(r'^api/v0.1/search/', search.views.search, name='search'),
url(r'^api/v0.1/search/', search.views.get_search, name='search'),
url(r'^api/v0.1/choose_persona/', dashboard.views.choose_persona, name='choose_persona'),

# chat
Expand Down Expand Up @@ -724,7 +725,6 @@

# For django versions before 2.0:
# url(r'^__debug__/', include(debug_toolbar.urls)),

] + urlpatterns

LOGIN_REDIRECT_URL = '/login'
Expand Down
15 changes: 15 additions & 0 deletions app/assets/v2/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,21 @@ div.busyOverlay {
padding: 1.4em 1.3em 1.3em;
}

.popover-user-card {
background-color: #FFF;
padding: 0;
width: 100%;
max-width: 30em;
font-size: 12px;
}

.user-card_donut-chart {
width: 56px;
}
.user-card_pie-chart {
width: 30px;
}

.big-popover {
max-width: 482px;
}
Expand Down
619 changes: 317 additions & 302 deletions app/assets/v2/images/avatar3d/walle3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 9 additions & 8 deletions app/assets/v2/js/activity.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* eslint no-useless-concat: 0 */ // --> OFF
window.addEventListener('load', function() {
setInterval(listen_for_web3_changes, 5000);
listen_for_web3_changes();
});

$(document).ready(function() {

var linkify = function(new_text) {
new_text = new_text.replace(/(?:^|\s)#([a-zA-Z\d-]+)/g, ' <a href="/?tab=search-$1">#$1</a>');
new_text = new_text.replace(/\B@([a-zA-Z0-9_-]*)/g, ' <a href="/profile/$1">@$1</a>');
new_text = new_text.replace(/\B@([a-zA-Z0-9_-]*)/g, ' <a data-usercard="$1" href="/profile/$1">@$1</a>');
return new_text;
};
// inserts links into the text where there are URLS detected
Expand Down Expand Up @@ -58,9 +59,9 @@ $(document).ready(function() {
const $target = $(this).parents('.activity_detail_content');
const html = `
<p class='float-right p-0 m-0 video_options_container'>
<a href=# class='full_screen'>Full Screen <i class="fas fa-expand-arrows-alt"></i></a> |
<a href=# class='popout_screen'>Pop Out <i class="fas fa-sign-out-alt"></i></a> |
<a href=# class='new_tab'>Open in New Tab <i class="fas fa-external-link-square-alt"></i></i></a> |
<a href=# class='full_screen'>Full Screen <i class="fas fa-expand-arrows-alt"></i></a> |
<a href=# class='popout_screen'>Pop Out <i class="fas fa-sign-out-alt"></i></a> |
<a href=# class='new_tab'>Open in New Tab <i class="fas fa-external-link-square-alt"></i></i></a> |
<a href=# class=' leave_video_call'>Leave Video Call <i class="far fa-times-circle"></i></a>
</p>`;

Expand Down Expand Up @@ -669,7 +670,7 @@ $(document).ready(function() {
${show_more_box}
<div class="row comment_row mx-auto ${is_hidden ? 'hidden' : ''}" data-id=${comment['id']}>
<div class="col-1 activity-avatar my-auto">
<a href="/profile/${comment['profile_handle']}" data-toggle="tooltip" title="@${comment['profile_handle']}">
<a href="/profile/${comment['profile_handle']}" data-usercard="${comment['profile_handle']}">
<img src="/dynamic/avatar/${comment['profile_handle']}">
</a>
</div>
Expand All @@ -680,9 +681,9 @@ $(document).ready(function() {
<span class="indicator" data-toggle="tooltip" title="Gitcoin Chat: ${comment['last_chat_status_title']}">
</span>
</span>
</span>
<b>${comment['name']}</b>
<span class="grey"><a class=grey href="/profile/${comment['profile_handle']}">
<span class="grey"><a class=grey href="/profile/${comment['profile_handle']}" data-usercard="${comment['profile_handle']}">
@${comment['profile_handle']}
</a></span>
${comment['match_this_round'] ? `
Expand Down Expand Up @@ -950,7 +951,7 @@ function throttle(fn, wait) {
}
};
}


window.addEventListener('scroll', throttle(function() {
var offset = 800;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/v2/js/grants/fund.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ $(document).ready(function() {

let realTokenAmount = Number(data.amount_per_period * Math.pow(10, decimals));
let realApproval;

const approve_buffer = 100000;

if (data.contract_version == 1 || data.num_periods == 1) {
const approve_buffer = 100000;

realApproval = Number(((grant_amount + gitcoin_grant_amount) * data.num_periods * Math.pow(10, decimals)) + approve_buffer);
} else if (data.contract_version == 0) {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/grants/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,5 @@ $(document).ready(function() {
};

setInterval(listen_web3_1_changes, 5000);

listen_web3_1_changes();
});
1 change: 1 addition & 0 deletions app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

window.addEventListener('load', function() {
setInterval(listen_for_web3_changes, 5000);
listen_for_web3_changes();
});

const _truthy = function(val) {
Expand Down
1 change: 1 addition & 0 deletions app/assets/v2/js/pages/bulk_payout.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
window.addEventListener('load', function() {
setInterval(listen_for_web3_changes, 5000);
listen_for_web3_changes();
});

const rateUser = (elem) => {
Expand Down
1 change: 1 addition & 0 deletions app/assets/v2/js/pages/cancel_bounty/ETH.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

window.addEventListener('load', function() {
setInterval(listen_for_web3_changes, 5000);
listen_for_web3_changes();
});

const ethCancelBounty = data => {
Expand Down
1 change: 1 addition & 0 deletions app/assets/v2/js/pages/fulfill_bounty/ETH.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

window.addEventListener('load', function() {
setInterval(listen_for_web3_changes, 5000);
listen_for_web3_changes();
});

const ethFulfillBounty = data => {
Expand Down
1 change: 1 addition & 0 deletions app/assets/v2/js/pages/increase_bounty.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-lonely-if */
window.addEventListener('load', function() {
setInterval(listen_for_web3_changes, 5000);
listen_for_web3_changes();
});

load_tokens();
Expand Down
17 changes: 17 additions & 0 deletions app/assets/v2/js/pages/join_tribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,23 @@ const joinTribeDirect = (elem) => {
};


const followRequest = (handle, elem, cb, cbError) => {
if (!document.contxt.github_handle) {
_alert('Please login first.', 'error');
return;
}

const url = `/tribe/${handle}/join/`;
const sendJoin = fetchData (url, 'POST', {}, {'X-CSRFToken': $("input[name='csrfmiddlewaretoken']").val()});

$.when(sendJoin).then(function(response) {
return cb(handle, elem, response);
}).fail(function(error) {
return cbError(error);
});
};


const tribeLeader = () => {
$('[data-tribeleader]').each(function(index, elem) {

Expand Down
1 change: 1 addition & 0 deletions app/assets/v2/js/pages/process_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

window.addEventListener('load', function() {
setInterval(listen_for_web3_changes, 5000);
listen_for_web3_changes();
});

window.onload = function() {
Expand Down
1 change: 1 addition & 0 deletions app/assets/v2/js/pages/refund_request.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
window.addEventListener('load', function() {
setInterval(listen_for_web3_changes, 5000);
listen_for_web3_changes();
});

$(document).ready(function() {
Expand Down
Loading

0 comments on commit 3d0e575

Please sign in to comment.