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

Kudos enhancements #2559

Merged
merged 10 commits into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
1 change: 1 addition & 0 deletions app/assets/v2/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ input[type=text].loading {

.alert .message .content{
display: inline;
word-break: break-all;
}

.alert .message::before {
Expand Down
5 changes: 0 additions & 5 deletions app/assets/v2/js/pages/process_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,17 +263,12 @@ window.onload = function() {
}
};

// KO 2018/10/28
// hack to workaround error with kudos inline send
// revert this when kudos live 4 realz

if ($('.kudos-search').select2('data')[0]) {
attach_and_send_kudos($('.kudos-search').select2('data')[0], send_tip_and_payout_callback);
} else {
send_tip_and_payout_callback();
}


};
// Get bountyId from the database

Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/templates/profiles/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
</div>
</div>
{% if not hidden %}
<div class="container-fluid bg-light py-5" style="display: none !important">
<div class="container-fluid bg-light py-5">
<div class="container" >
{% if user.is_authenticated and request.path == '/profile/' %}
<div class="btn-group" role="group" aria-label="Basic example">
Expand Down
4 changes: 2 additions & 2 deletions app/dashboard/templates/shared/add_kudos.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}
{% load i18n static %}
<div class="kudos-module" style="">
<div class="kudos-module">
<div class="msg-alert" style="display: none;">
<i class="fas fa-exclamation-triangle font-bigger-1 mr-3"></i>
<div class="pr-5">{% trans "A bounty payment, tip, and Kudos will send as separate transactions. You will need to confirm payment of each item separately after clicking accept." %}</div>
</div>

<div class="my-2">
<label for="kudos-search"><span style="color:red">NEW!</span> (Optional) Add Kudos</label>
<label for="kudos-search"><span style="color:red">NEW!</span> (Optional) Add Kudos</label>
<a href="{% url 'kudos_about' %}" target="_blank" style="float:right">What is kudos?</a>
<select name="kudos-search" class="kudos-search custom-select gc-border-blue" id="kudos-search">
<option></option>
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/templates/shared/nav_auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<i class="far fa-paper-plane"></i>
{% trans "Send Tip" %}
</a>
<a class="dropdown-item" href="{% url "kudos_marketplace" %}" style="display: none !important;">
<a class="dropdown-item" href="{% url "kudos_marketplace" %}">
<i class="fas fa-magic"></i>
{% trans "Send Kudos" %}
</a>
Expand Down
8 changes: 4 additions & 4 deletions app/kudos/kudos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
- memory management
- common
- programming
image: c++_scientist.svg
image: cpp_scientist.svg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will need to re-mint?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - I was planning on minting following the merge.

- name: pythonista
description: Pythonistas are loyal users of the Python programming language.
priceFinney: 2
Expand Down Expand Up @@ -1777,19 +1777,19 @@
description: Cheers to you, one of the first Kauri contributors!
priceFinney: 3
numClonesAllowed: 100
tags:
tags:
- web3
- kauri
- ethereum
- documentation
- knowledge
image: kauri_1.svg
to_address: 0xF8aE578d5d4e570De6c31F26D42eF369C320aE0b
- name: Web3 Advocate
- name: Web3 Advocate
description: Out with the old and in with the new! Kudos to knowledge sharers, crossing the void from web2 to web3.
priceFinney: 3
numClonesAllowed: 100
tags:
tags:
- web3
- kauri
- ethereum
Expand Down
8 changes: 6 additions & 2 deletions app/kudos/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from django.shortcuts import get_object_or_404, redirect
from django.template.response import TemplateResponse
from django.utils import timezone
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
from django.views.decorators.csrf import csrf_exempt
from eth_utils import is_address, to_checksum_address, to_normalized_address
Expand Down Expand Up @@ -485,8 +486,11 @@ def receive(request, key, txid, network):
messages.error(
request, f'This kudos is for {kudos_transfer.username} but you are logged in as {request.user.username}. Please logout and log back in as {kudos_transfer.username}.')
elif not_mined_yet and not request.GET.get('receive_txid'):
messages.info(
request, f'This tx {kudos_transfer.txid}, is still mining. Please wait a moment before submitting the receive form.')
message = mark_safe(
f'The <a href="https://etherscan.io/tx/{txid}">transaction</a> is still mining. '
'Please wait a moment before submitting the receive form.'
)
messages.info(request, message)
elif request.GET.get('receive_txid') and not kudos_transfer.receive_txid:
params = request.GET

Expand Down
6 changes: 3 additions & 3 deletions app/retail/templates/shared/top_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

{% endcomment %}
{% load i18n static matches %}
<div class="top-nav g-font-muli {{class}}" style="display: none !important">
<div class="top-nav g-font-muli {{class}}">
<a class="link d-md-block d-none" href="{% url 'mission' %}">Grow Open Source</a>
<a class="{% if request.path == '/' %}selected{% endif %}" href="/">
<img src="{% static "v2/images/top-bar/gitcoin-logo.svg" %}" height="22" alt="" class="d-md-block d-none" style="margin-bottom: 5px;">
Expand All @@ -30,8 +30,8 @@
<img src="{% static "v2/images/top-bar/kudos-logo.svg" %}" height="22" alt="" class="d-md-block d-none">
<img src="{% static "v2/images/top-bar/kudos-symbol.svg" %}" height="22" alt="" class="d-md-none">
</a>
<!-- <a class="{% if request.path|matches:'^\/((grants.*))$' %}selected{% endif %}" href="/grants">
<a class="{% if request.path|matches:'^\/((grants.*))$' %}selected{% endif %}" href="/grants">
<img src="{% static "v2/images/top-bar/grants-logo.svg" %}" height="22" alt="" class="d-md-block d-none">
<img src="{% static "v2/images/top-bar/grants-symbol.svg" %}" height="22" alt="" class="d-md-none">
</a> -->
</a>
</div>
2 changes: 1 addition & 1 deletion scripts/fresh_start.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ truffle migrate --reset
cd - || exit 1

if [ -n "$ACCOUNT" ] && [ -n "$PRIVATE_KEY" ]; then
docker-compose exec web bash -c "cd app && python manage.py mint_all_kudos ${NETWORK} /code/app/kudos/kudos.yaml --account ${ACCOUNT} --private_key ${PRIVATE_KEY} --live"
docker-compose exec web bash -c "cd app && python manage.py mint_all_kudos ${NETWORK} /code/app/kudos/kudos.yaml --account ${ACCOUNT} --private_key ${PRIVATE_KEY} --live"
else
docker-compose exec web bash -c "cd app && python manage.py mint_all_kudos ${NETWORK} /code/app/kudos/kudos.yaml --live"
fi