Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stable -> master #5517

Merged
merged 32 commits into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5507fcd
fix filters and additions
octavioamu Nov 14, 2019
9078c55
fix project btn
octavioamu Nov 14, 2019
f7f6a0c
add projects to bounty details
octavioamu Nov 14, 2019
445667d
bounty duplication agh
octavioamu Nov 14, 2019
a4b0537
fix spacing
octavioamu Nov 14, 2019
b43f906
bug: fixed wonky button
thelostone-mc Nov 14, 2019
aa2c138
Merge pull request #5496 from thelostone-mc/bug
thelostone-mc Nov 14, 2019
70a3215
fix
thelostone-mc Nov 14, 2019
3e2fb18
bug: add teammates during grant creation
thelostone-mc Nov 15, 2019
9f3c101
bug: remove dulpicate filter
thelostone-mc Nov 15, 2019
583840f
a few fixes for results, orbi analytics, and quests
owocki Nov 15, 2019
8d48b4c
fix twitter unfurl images
owocki Nov 15, 2019
2f51829
non metamask support https://github.com/gitcoinco/web/issues/5466
owocki Nov 15, 2019
bf0cc99
fix for missing msgs
owocki Nov 15, 2019
fab3ca9
newsletter 2019-11-15
connoroday Nov 14, 2019
82c361e
add info about dai upgrade
danlipert Nov 15, 2019
7364d93
fix emojis
danlipert Nov 15, 2019
b229264
a few small quest fixes
owocki Nov 15, 2019
95c4cf4
Merge branch 'stable' of github.com:gitcoinco/web into stable
owocki Nov 15, 2019
607f01c
fix for profile grants tab"
owocki Nov 15, 2019
6805ecc
make fix
owocki Nov 15, 2019
2bfa545
fixes busted email subscribe link
owocki Nov 15, 2019
79595c6
found a bug
owocki Nov 15, 2019
e725748
one last fix
owocki Nov 15, 2019
d712c68
leaderboard + psql cleanup
owocki Nov 15, 2019
457b840
Merge pull request #5499 from thelostone-mc/explorer
thelostone-mc Nov 15, 2019
5dfa40f
Merge pull request #5498 from thelostone-mc/bug
thelostone-mc Nov 15, 2019
35c6a0f
new quest backgrounds
owocki Nov 15, 2019
7d92dbc
Merge branch 'stable' of github.com:gitcoinco/web into stable
owocki Nov 15, 2019
84a8be0
added missing migration file
thelostone-mc Nov 15, 2019
757b310
add SAI to stable coins (#5506)
danlipert Nov 18, 2019
2bb30a7
updates banner
owocki Nov 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@
IPFS_API_ROOT = env('IPFS_API_ROOT', default='/api/v0')
IPFS_API_SCHEME = env('IPFS_API_SCHEME', default='https')

STABLE_COINS = ['DAI', 'USDT', 'TUSD']
STABLE_COINS = ['DAI', 'SAI', 'USDT', 'TUSD']

# Silk Profiling and Performance Monitoring
ENABLE_SILK = env.bool('ENABLE_SILK', default=False)
Expand Down
3 changes: 3 additions & 0 deletions app/app/templates/shared/messages.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
document.messages = []
{% for message in messages %}
if (document.messages.indexOf('{{ message }}') == -1) {
setTimeout(function(){
_alert({message: gettext('{{ message }}')}, '{{ message.tags }}');
}, 1000);
document.messages.push('{{ message }}');
}
{% endfor %}
Expand Down
3 changes: 2 additions & 1 deletion app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
path('hackathon/<str:hackathon>/', dashboard.views.hackathon, name='hackathon'),
path('hackathon/onboard/<str:hackathon>/', dashboard.views.hackathon_onboard, name='hackathon_onboard'),
path('hackathon/projects/<str:hackathon>/', dashboard.views.hackathon_projects, name='hackathon_projects'),
path('hackathon/projects/<str:hackathon>', dashboard.views.hackathon_projects, name='hackathon_projects2'),
path('modal/new_project/<int:bounty_id>/', dashboard.views.hackathon_get_project, name='hackathon_get_project'),
path(
'modal/new_project/<int:bounty_id>/<int:project_id>/',
Expand Down Expand Up @@ -325,8 +326,8 @@
# images
re_path(r'^funding/embed/?', dashboard.embed.embed, name='embed'),
re_path(r'^funding/avatar/?', avatar.views.handle_avatar, name='avatar'),
re_path(r'^dynamic/avatar/(.*)', avatar.views.handle_avatar, name='org_avatar2'),
re_path(r'^dynamic/avatar/(.*)/(.*)?', avatar.views.handle_avatar, name='org_avatar'),
re_path(r'^dynamic/avatar/(.*)', avatar.views.handle_avatar, name='org_avatar2'),
re_path(r'^dynamic/viz/graph/(.*)?$', dataviz.d3_views.viz_graph, name='viz_graph'),
re_path(r'^dynamic/viz/sscatterplot/(.*)?$', dataviz.d3_views.viz_scatterplot_stripped, name='viz_sscatterplot'),
path('dynamic/js/tokens_dynamic.js', retail.views.tokens, name='tokens'),
Expand Down
10 changes: 0 additions & 10 deletions app/assets/v2/css/bounty.css
Original file line number Diff line number Diff line change
Expand Up @@ -410,16 +410,6 @@ a.btn {
margin-left: 5px;
}

#btn-white .github-comment {
color: #FFFFFF;
position: absolute;
font-size: 0.625rem;
text-align: center;
width: 1.25rem;
top: 0.4375rem;
right: 0.5rem;
}

.activity {
margin-bottom: 10px;
}
Expand Down
6 changes: 1 addition & 5 deletions app/assets/v2/css/leaderboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,14 @@ tbody, a {
}

.item-count-bounties {
display: none;
display: block;
}

.hidemobile {
visibility: hidden;
}

@media (min-width: 700px) {
.item-count-bounties {
display: block
}

.podium {
justify-content: space-between;
}
Expand Down
20 changes: 19 additions & 1 deletion app/assets/v2/css/quests.css
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ body.quest_battle .bottom_notification {
}

#timer {
bottom: 47px;
bottom: 93px;
font-size: 30px;
color: #888;
}
Expand Down Expand Up @@ -888,6 +888,24 @@ body.back20.quest_battle {
background-size: 120%;
}

div.back21,
body.back21.quest_battle {
background: url('/static/v2/images/quests/backs/back21.png') repeat;
background-size: 120%;
}

div.back22,
body.back22.quest_battle {
background: url('/static/v2/images/quests/backs/back22.png') repeat;
background-size: 120%;
}

div.back23,
body.back23.quest_battle {
background: url('/static/v2/images/quests/backs/back23.png') repeat;
background-size: 120%;
}

div.red,
body.red.quest_battle {
background-image: linear-gradient(90deg, #ff6161, #ff0000);
Expand Down
1 change: 0 additions & 1 deletion app/assets/v2/images/comment.svg

This file was deleted.

Binary file added app/assets/v2/images/quests/backs/back21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/v2/images/quests/backs/back22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/v2/images/quests/backs/back23.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/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ $(document).ready(function() {
});
}

var top_nav_salt = 5;
var top_nav_salt = 6;
var remove_top_row = function() {
$('#top_nav_notification').parents('.row').remove();
localStorage['top_nav_notification_remove_' + top_nav_salt] = true;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/grants/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const init = () => {
formData.append('contract_version', $('#contract_version').val());
formData.append('transaction_hash', $('#transaction_hash').val());
formData.append('network', $('#network').val());
formData.append('team_members', $('#input-team_members').val());
formData.append('team_members[]', $('#input-team_members').val());
saveGrant(formData, false);

document.issueURL = linkURL;
Expand Down
4 changes: 1 addition & 3 deletions app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -1247,9 +1247,7 @@ var do_actions = function(result) {
text: (result['repo_type'] === 'private' ? '<i class="fas fa-lock mr-2"></i> ' +
gettext('Private Repo') : '<i class="fab fa-github mr-2"></i>' + gettext('View On Github')),
parent: 'github_actions',
title: gettext('View issue details and comments on Github'),
comments: result['github_comments'],
color: 'comments'
title: gettext('View issue details and comments on Github')
};

actions.push(_entry);
Expand Down
31 changes: 18 additions & 13 deletions app/assets/v2/js/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -969,20 +969,25 @@ var listen_for_web3_changes = async function() {
}
}

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();
if (is_metamask_approved && is_metamask_unlocked) {
var start_time = ((new Date()).getTime() / 1000);

await ethereum.enable();
var now_time = ((new Date()).getTime() / 1000);
var did_request_and_user_respond = (now_time - start_time) > 1.0;

if (did_request_and_user_respond) {
document.location.reload();
if (window.ethereum && !document.has_checked_for_ethereum_enable) {
if (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();
if (is_metamask_approved && is_metamask_unlocked) {
var start_time = ((new Date()).getTime() / 1000);

await ethereum.enable();
var now_time = ((new Date()).getTime() / 1000);
var did_request_and_user_respond = (now_time - start_time) > 1.0;

if (did_request_and_user_respond) {
document.location.reload();
}
}
} else {
is_metamask_approved = true;
is_metamask_unlocked = true;
}
}
};
Expand Down
60 changes: 41 additions & 19 deletions app/dashboard/templates/bounty/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ <h4 id="title" class="font-title p-0 text-left"></h4>
<div class="col-12">
<div id="right_actions">
<div class="dropdown show float-right pt-2">
<a class="font-caption font-weight-semibold dropdown-toggle" href="#" role="button"
<a class="font-caption font-weight-semibold dropdown-toggle" href="#" role="button"
id="bounty-options" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Bounty Options
</a>
</a>
<div id="bounty-options-link" class="dropdown-menu font-caption" aria-labelledby="bounty-options">
</div>
</div>

<div id="bounty_actions" class="d-inline-block"></div>
<div id="github_actions" class="d-inline-block"></div>
<a class="modal-link button button--secondary font-caption" href="" data-toggle="modal" data-target=".share-modal">
Expand Down Expand Up @@ -193,6 +193,44 @@ <h6>{% trans "Work Paid" %}</h6>
<h5 class="bounty-heading">{% trans "All Activity" %}</h5>
<div id="activities" class="font-body"></div>
</div>
{% if prize_projects %}
<div class="col-12">
<h5 class="bounty-heading">{% trans "Projects" %}</h5>
<div class="row">
{% for project in prize_projects %}
<div class="col-12 col-md-4">

<div class="card m-3 p-1">
{% for profile in project.profiles.all %}
{% if profile_id == profile.id %}
<button onclick="projectModal({{project.bounty.id}},{{project.id}});" class="position-absolute btn btn-gc-green btn-sm m-2">edit</button>
{% endif %}
{% endfor %}
{% if project.logo %}
<img class="card-project-logo mx-auto mt-2 mw-100 rounded border" height="65" width="65" src="{{MEDIA_URL}}{{project.logo}}" alt="Hackathon logo" />
{% else %}
<img class="card-project-logo mx-auto mt-2 mw-100 rounded border" height="65" width="65" src="{{ project.bounty.avatar_url }}" alt="{{project.bounty.org_name}}" />
{% endif %}

<div class="text-center mt-2">
<a href="{{project.work_url}}" target="_blank" class="font-weight-bold card-subtitle">{{project.name}}</a>
<div class="mb-2">
<b class="text-muted font-smaller-2">Team Members</b>
<div class="mt-1">
{% for profile in project.profiles.all %}
<a href="{% url 'profile' profile %}" class="">
<img src="{{profile.avatar_url}}" alt="{{profile}}" title="@{{profile}}" width="30" height="30" class="rounded-circle">
</a>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
<div class="col-12">
<h5 class="bounty-heading">{% trans "Funder" %}</h5>
<div class="row box">
Expand Down Expand Up @@ -224,22 +262,6 @@ <h5 class="bounty-heading">{% trans "Funder" %}</h5>
<a class="button button--primary accept [[if !enabled]]disabled[[/if]]" role="button" href="[[:href]]" target="[[:target]]">
<span class="font-caption">[[:text]] ( [[:pending_acceptance]] )</span>
</a>
[[else color == 'comments']]
<a class="button button--secondary mr-2 font-caption" role="button" target="_blank" href="[[:href]]" target="[[:target]]">
[[if comments]]
<span class="font-caption d-inline-flex">
[[:text]]
<span class="comment">
<img src={% static "v2/images/comment.svg" alt="Comment" %}>
<span class="github-comment">
[[:comments]]
</span>
</span>
</span>
[[else]]
<span class="font-caption">[[:text]]</span>
[[/if]]
</a>
[[else]]
<a class="button [[if primary]]button--primary[[else]]button--secondary[[/if]] mr-2 font-caption [[if !enabled]]disabled[[/if]] [[:buttonclass]]" role="button" href="[[:href]]" target="[[:target]]" [[if modal]] data-toggle="modal" data-target=".share-modal" [[/if]]>
<span class="font-caption">[[:text]]</span>
Expand Down
57 changes: 37 additions & 20 deletions app/dashboard/templates/dashboard/hackathon/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,41 +99,53 @@
{% endif %}
<h1>{{hackathon.name}} Projects</h1>
{{ hackathon.start_date|date:"M j, Y" }} - {{ hackathon.end_date|date:"M j, Y" }}
<div><a href="{% url 'hackathon' hackathon.slug %}" class="btn btn-gc-green mt-3">Hackathon Prizes</a></div>
</div>
</div>

<div class="container-fluid p-5">
{% if hackathon.end_date|timeuntil >= "1 min" and not projects%}
<p class="p-3 mt-3 alert-warning">This hackathon event is running until {{hackathon.end_date}}, please check again later.</p>
{% endif %}
<div class="row py-3">
<div class="col-12 col-md-4">
<form action="{% url 'hackathon_projects' hackathon.slug %}" method="get">
<div class="input-group">
<input type="text" class="form-control form-control" name="q" id="project-search" placeholder="{% trans "Search Projects" %}">
<div class="input-group-append">
<a href="{% url 'hackathon_projects' hackathon.slug %}" class="btn btn-dark clear-search {% if not query %}hidden{% endif %}"><i class="fas fa-times"></i></a>
<button type="submit" class="btn btn-gc-blue">{% trans "Search" %}</button>
</div>

<form action="{% url 'hackathon_projects' hackathon.slug %}" method="get" id="filter-form" class="row py-3">
<div class="col-12 col-md-3">
<div class="input-group">
<input type="text" class="form-control" name="q" id="project-search" placeholder="{% trans 'Search Projects' %}" value="{{query|join:' '}}">
<div class="input-group-append">
<a href="{% url 'hackathon_projects' hackathon.slug %}" class="btn btn-dark clear-search {% if not query %}hidden{% endif %}"><i class="fas fa-times"></i></a>
<button type="submit" class="btn btn-gc-blue">{% trans "Search" %}</button>
</div>
{% if query %}
Results for: {% for q in query %}{{ q }} {% endfor %}
{% endif %}
</form>
</div>
{% if query %}
<small>Results for: {% for q in query %}{{ q }} {% endfor %}</small>
{% endif %}
</div>
<div class="col-12 col-md-4 text-md-center">
<div class="col-12 col-md-3">
<div class="form-group row">
<label for="inputPassword" class="col-sm-6 col-form-label">Filter by sponsor:</label>
<div class="col-sm-6">
<select name="sponsor" id="sponsor" class="form-control">
<option value="">All</option>
{% for sponsor_item in sponsors_list %}
<option value="{{sponsor_item.org_name}}" {% if sponsor_item.org_name == sponsor %}selected {%endif%}>{{sponsor_item.org_name}}</option>
{% endfor%}
</select>
</div>
</div>
</div>
<div class="col-12 col-md-3 text-md-center">
<a href="{% url 'hackathon_projects' hackathon.slug %}" class="{% ifequal filters '' %}underline{% endifequal %}">See all</a> |
<a href="{% url 'hackathon_projects' hackathon.slug %}?filters=winners" class="{% ifequal filters 'winners' %}underline{% endifequal %}">See winners</a>
</div>
<div class="col-12 col-md-4 text-md-right">
<div class="col-12 col-md-3 text-md-right">
Order by:
<a href="{% url 'hackathon_projects' hackathon.slug %}?order_by=-created_on" class="{% ifequal order_by '-created_on' %}underline{% endifequal %}">Newest</a> |
<a href="{% url 'hackathon_projects' hackathon.slug %}?order_by=created_on" class="{% ifequal order_by 'created_on' %}underline{% endifequal %}">Oldest</a>
</div>
</div>
</form>
<div class="row py-5">
<div class="col-12">

<div class="project-grid">
{% for project in projects %}
<div class="card card-project">
Expand Down Expand Up @@ -195,7 +207,7 @@ <h4>No projects submitted yet</h4>
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center mt-5">
{% if projects.has_previous %}
<li class="page-item"><a class="page-link page-link-gc" href="?page={{ projects.previous_page_number }}&order_by={{order_by}}&filters={{filters}}">Previous</a></li>
<li class="page-item"><a class="page-link page-link-gc" href="?page={{ projects.previous_page_number }}&order_by={{order_by}}&filters={{filters}}&q={{query|join:'+'}}&sponsor={{sponsor}}">Previous</a></li>
{% else %}
<li class="page-item disabled"><span class="page-link page-link-gc">Previous</span></li>
{% endif %}
Expand All @@ -205,11 +217,11 @@ <h4>No projects submitted yet</h4>
<span class="page-link page-link-gc">{{ i }}<span class="sr-only">(current)</span></span>
</li>
{% else %}
<li class="page-item"><a class="page-link page-link-gc" href="?page={{ i }}&order_by={{order_by}}&filters={{filters}}">{{ i }}</a></li>
<li class="page-item"><a class="page-link page-link-gc" href="?page={{ i }}&order_by={{order_by}}&filters={{filters}}&q={{query|join:'+'}}&sponsor={{sponsor}}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% if projects.has_next %}
<li class="page-item"><a class="page-link page-link-gc" href="?page={{ projects.next_page_number }}&order_by={{order_by}}&filters={{filters}}">Next</a></li>
<li class="page-item"><a class="page-link page-link-gc" href="?page={{ projects.next_page_number }}&order_by={{order_by}}&filters={{filters}}&q={{query|join:'+'}}&sponsor={{sponsor}}">Next</a></li>
{% else %}
<li class="page-item disabled"><span class="page-link page-link-gc">Next</span></li>
{% endif %}
Expand All @@ -227,6 +239,11 @@ <h4>No projects submitted yet</h4>
{% include 'shared/current_profile.html' %}
<script src="{% static "v2/js/user-search.js" %}"></script>
<script src="{% static "v2/js/hackathon-projects.js" %}"></script>
<script>
$('#sponsor').change(function(){
$("#filter-form").submit();
})
</script>


</body>
11 changes: 7 additions & 4 deletions app/dashboard/templates/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@
</span>
</div>
{% include 'shared/hackathon_sponsors.html' %}
{% if hackathon.end_date|timesince <= "1 min" %}
<div class="col text-right">
<div class="col text-right">
{% if hackathon.show_results %}
<a href="{% url 'hackathon_projects' hackathon.slug %}" class="btn btn-outline-green rounded-pill font-bigger-1 font-weight-bold px-3 py-2 mr-3">Projects</a>
{% endif %}
{% if hackathon.end_date|timesince <= "1 min" %}
<a href="{% url 'hackathon_onboard' hackathon.slug %}" class="btn btn-outline-green rounded-pill font-bigger-1 font-weight-bold px-3 py-2 mr-3"><i class="far fa-lightbulb"></i> Hackathon Guide</a>
</div>
{% endif %}
{% endif %}
</div>
</div>
{% else %}
{% include 'dashboard/ftux.html' %}
Expand Down
Loading