Merge branch 'develop'
This commit is contained in:
commit
9c8143f444
|
@ -128,16 +128,14 @@ INSERT INTO issues (repo_id, issue_id, issue_number, title)
|
|||
-- :name update-commit-sha :<! :1
|
||||
-- :doc updates issue with commit_sha
|
||||
UPDATE issues
|
||||
SET commit_sha = :commit_sha,
|
||||
updated = timezone('utc'::text, now())
|
||||
SET commit_sha = :commit_sha
|
||||
WHERE issue_id = :issue_id
|
||||
RETURNING repo_id, issue_id, issue_number, title, commit_sha, contract_address;
|
||||
|
||||
-- :name update-transaction-hash :! :n
|
||||
-- :doc updates transaction-hash for a given issue
|
||||
UPDATE issues
|
||||
SET transaction_hash = :transaction_hash,
|
||||
updated = timezone('utc'::text, now())
|
||||
SET transaction_hash = :transaction_hash
|
||||
WHERE issue_id = :issue_id;
|
||||
|
||||
|
||||
|
@ -312,6 +310,24 @@ AND u.id = p.user_id
|
|||
AND i.payout_receipt IS NULL
|
||||
AND i.payout_hash IS NOT NULL;
|
||||
|
||||
|
||||
-- :name get-bounty-winner :? :*
|
||||
-- :doc return user_id, login and name for a user that has won and
|
||||
-- been paid given bounty issue
|
||||
SELECT
|
||||
u.address AS payout_address,
|
||||
u.login AS payee_login,
|
||||
u.id AS payee_user_id,
|
||||
u.name AS payee_name
|
||||
FROM issues i, users u, pull_requests p
|
||||
WHERE
|
||||
i.issue_id = :issue_id
|
||||
AND p.issue_id = i.issue_id
|
||||
AND p.repo_id = i.repo_id
|
||||
AND u.id = p.user_id
|
||||
AND i.payout_receipt IS NOT NULL;
|
||||
|
||||
|
||||
-- :name update-confirm-hash :! :n
|
||||
-- :doc updates issue with confirmation hash
|
||||
UPDATE issues
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="shortcut icon" href="/img/favicon.ico" />
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
|
|
|
@ -1,165 +0,0 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
|
||||
<title>Thanks for signing up — Status Open Bounty</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="icon" type="image/png" href="dest/img/new-site/logo-32.png?v=002" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="dest/img/new-site/logo-16.png?v=002" sizes="16x16" />
|
||||
|
||||
<link rel="apple-touch-icon" href="dest/img/new-site/apple-touch-icon-1024.png?v=002">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="dest/img/new-site/apple-touch-icon-76.png?v=002">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="dest/img/new-site/apple-touch-icon-120.png?v=002">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="dest/img/new-site/apple-touch-icon-152.png?v=002">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="dest/img/new-site/apple-touch-icon-180.png?v=002">
|
||||
<link rel="mask-icon" href="dest/img/new-site/logo-mask.svg" color="4360DF">
|
||||
|
||||
<link rel="shortcut icon" href="/img/favicon.ico" />
|
||||
|
||||
<link rel="stylesheet" href="dest/css/main.css?v=002">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-wrap container-wrap--not-fancy">
|
||||
<div class="container container--page">
|
||||
<div class="header header-welcome">
|
||||
<div class="header__inner">
|
||||
<div class="header-section header-section--left">
|
||||
<a class="logo" href="/">
|
||||
<div class="logo__icon-wrap">
|
||||
<div class="logo__icon"></div>
|
||||
</div>
|
||||
<div class="logo__text">
|
||||
<span class="logo__title">Status</span>
|
||||
<span class="logo__subtitle">Open Bounty</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="header-section header-section--right">
|
||||
<div class="nav">
|
||||
<a class="nav__item nav__item-features" href="#">Features</a>
|
||||
<a class="nav__item nav__item--external" target="_blank" href="https://status.im/">Status Home</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="welcome-block">
|
||||
<div class="welcome-block__top">
|
||||
<div class="welcome-block__image"></div>
|
||||
<h2>Hello and welcome to Status Open Bounty!</h2>
|
||||
<p>Thank you for joining our community of committed developers.
|
||||
Get started now and start getting paid for contributing
|
||||
to open source projects!</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="welcome-actions">
|
||||
<div class="welcome-action">
|
||||
<img class="welcome-icon" src="dest/img/new-site/icon-gh-24@2x.png" />
|
||||
<h2>Join the conversation on Riot</h2>
|
||||
<p>Stay up to date on the latest news, bounties and special programs that only take place within the Status Open Bounty Riot Room</p>
|
||||
<a href="https://chat.status.im/#/register" class="welcome-button">Join Now</a>
|
||||
</div>
|
||||
<div class="welcome-action">
|
||||
<img class="welcome-icon" src="dest/img/new-site/icon-gh-24@2x.png" />
|
||||
<h2>Star us on Github</h2>
|
||||
<p>Help us raise awareness and attract more talented contributors just like you. Star us on Github and help spread the word.</p>
|
||||
<a href="https://github.com/status-im/commiteth" class="welcome-button">Open Github</a>
|
||||
</div>
|
||||
</div>
|
||||
<a href="/" class="welcome-home-link">Back to Homepage</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer footer--not-fancy">
|
||||
<div class="footer-inner">
|
||||
<div class="footer-logo-wrap">
|
||||
<div class="footer-logo-wrap__inner">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="footer-address">Status Research & Development GmbH<br/>Baarerstrasse 10<br/>Zug, Switzerland</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-table">
|
||||
<div class="footer-table__column">
|
||||
<h4 class="footer-header">Social links</h4>
|
||||
<ul class="footer-list">
|
||||
<li class="footer-link footer-link--fb"><a href="https://www.facebook.com/ethstatus" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">Facebook</span></a></li>
|
||||
<li class="footer-link footer-link--tw"><a href="https://twitter.com/ethstatus" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">Twitter</span></a></li>
|
||||
<li class="footer-link footer-link--rt"><a href="https://chat.status.im/#/register" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">Riot</span></a></li>
|
||||
<li class="footer-link footer-link--gh"><a href="https://github.com/status-im" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">Github</span></a></li>
|
||||
<li class="footer-link footer-link--rd"><a href="https://www.reddit.com/r/statusim/" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">Reddit</span></a></li>
|
||||
<li class="footer-link footer-link--yt"><a href="https://www.youtube.com/channel/UCFzdJTUdzqyX4e9dOW7UpPQ/" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">YouTube</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-table__column">
|
||||
<h4 class="footer-header">More</h4>
|
||||
<ul class="footer-list">
|
||||
<li class="footer-link"><a href="https://wiki.status.im" target="_blank">Status Wiki</a></li>
|
||||
<li class="footer-link"><a href="https://blog.status.im/?gi=73d6676925e9" target="_blank">Status Blog</a></li>
|
||||
<li class="footer-link"><a href="https://status.im/jobs.html" target="_blank">Jobs</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-table__column">
|
||||
<h4 class="footer-header">Language</h4>
|
||||
<ul class="footer-list">
|
||||
<li class="footer-link">
|
||||
<select class="language-switcher" name="lang">
|
||||
<option value="en">English</option>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="dest/js/main.js?v=0002"></script>
|
||||
|
||||
<!-- Google Analytics -->
|
||||
<script>
|
||||
(function(i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r;
|
||||
i[r] = i[r] || function() {
|
||||
(i[r].q = i[r].q || []).push(arguments)
|
||||
}, i[r].l = 1 * new Date();
|
||||
a = s.createElement(o),
|
||||
m = s.getElementsByTagName(o)[0];
|
||||
a.async = 1;
|
||||
a.src = g;
|
||||
m.parentNode.insertBefore(a, m)
|
||||
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
|
||||
|
||||
try {
|
||||
ga('create', 'UA-79146816-1', 'auto');
|
||||
ga('send', 'pageview');
|
||||
} catch (e) {}
|
||||
</script>
|
||||
<!-- /Google Analytics -->
|
||||
|
||||
<!-- Facebook Pixel Code -->
|
||||
<script>
|
||||
!function(f,b,e,v,n,t,s)
|
||||
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
||||
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
||||
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
||||
n.queue=[];t=b.createElement(e);t.async=!0;
|
||||
t.src=v;s=b.getElementsByTagName(e)[0];
|
||||
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
||||
'https://connect.facebook.net/en_US/fbevents.js');
|
||||
fbq('init', '293089407869419');
|
||||
fbq('track', 'PageView');
|
||||
</script>
|
||||
<noscript><img height="1" width="1" style="display:none"
|
||||
src="https://www.facebook.com/tr?id=293089407869419&ev=PageView&noscript=1"
|
||||
/></noscript>
|
||||
<!-- End Facebook Pixel Code -->
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -71,6 +71,10 @@
|
|||
(jdbc/with-db-connection [con-db *db*]
|
||||
(db/get-bounty con-db {:owner owner :repo repo :issue_number issue-number})))
|
||||
|
||||
(defn get-bounty-winner
|
||||
[issue-id]
|
||||
(jdbc/with-db-connection [con-db *db*]
|
||||
(db/get-bounty-winner con-db {:issue_id issue-id})))
|
||||
|
||||
(defn open-bounty-contracts
|
||||
[]
|
||||
|
|
|
@ -126,9 +126,10 @@
|
|||
(let [owner-bounties (bounties-db/owner-bounties (:id user))]
|
||||
(into {}
|
||||
(for [ob owner-bounties
|
||||
:let [b (update ob :value_usd usd-decimal->str)]]
|
||||
:let [b (update ob :value_usd usd-decimal->str)
|
||||
winner (first (bounties-db/get-bounty-winner (:issue_id b)))]]
|
||||
[(:issue_id b)
|
||||
(conj b
|
||||
(conj (conj b {:winner winner})
|
||||
(let [claims (map
|
||||
#(update % :value_usd usd-decimal->str)
|
||||
(bounties-db/bounty-claims (:issue_id b)))]
|
||||
|
|
|
@ -54,7 +54,8 @@
|
|||
(defn activity-list [activity-items]
|
||||
[:div.ui.container.activity-container
|
||||
(if (empty? activity-items)
|
||||
[:div.ui.text "No data"]
|
||||
[:div.view-no-data-container
|
||||
[:p "No recent activity yet"]]
|
||||
(into [:div.ui.items]
|
||||
(for [item activity-items]
|
||||
^{:key item} [activity-item item])))] )
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
[:div.ui.container.open-bounties-container
|
||||
[:div.open-bounties-header "Bounties"]
|
||||
(if (empty? open-bounties)
|
||||
[:div.ui.text "No data"]
|
||||
[:div.view-no-data-container
|
||||
[:p "No recent activity yet"]]
|
||||
(into [:div.ui.items]
|
||||
(for [bounty open-bounties]
|
||||
[bounty-item bounty])))])
|
||||
|
|
|
@ -138,7 +138,8 @@
|
|||
(let [top-hunters (rf/subscribe [:top-hunters])]
|
||||
(fn []
|
||||
(if (empty? @top-hunters)
|
||||
[:div.ui.text "No data"]
|
||||
[:div.view-no-data-container
|
||||
[:p "No recent activity yet"]]
|
||||
(into [:div.ui.items]
|
||||
(map-indexed (fn [idx hunter]
|
||||
[:div.item
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
issue-title :issue_title} claim
|
||||
merged? (= 1 (:pr_state claim))
|
||||
paid? (not-empty (:payout_hash claim))
|
||||
winner (:winner bounty)
|
||||
winner-login (:payee_login winner)
|
||||
bot-confirm-unmined? (empty? (:confirm_hash bounty))
|
||||
confirming? (:confirming? bounty)
|
||||
updated (:updated bounty)]
|
||||
|
@ -30,7 +32,7 @@
|
|||
[:div.description "Submitted a claim for " [:a {:href (pr-url claim)}
|
||||
issue-title]]
|
||||
[:div.description (if paid?
|
||||
"(paid)"
|
||||
(str "(paid to " winner-login ")")
|
||||
(str "(" (if merged? "merged" "open") ")"))]
|
||||
[:div.time (moment-timestamp updated)]
|
||||
[:button.ui.button
|
||||
|
|
|
@ -304,6 +304,23 @@
|
|||
}
|
||||
}
|
||||
|
||||
.view-no-data-container {
|
||||
padding: 64px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: auto;
|
||||
|
||||
p {
|
||||
text-align: center;
|
||||
font-family: "PostGrotesk-Book";
|
||||
color: #8d99a4;
|
||||
font-size: 15 px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.view-loading-label {
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue