Merge branch 'develop'

This commit is contained in:
Teemu Patja 2017-11-01 08:58:55 +02:00
commit ee6f6c6ed7
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
32 changed files with 77 additions and 48 deletions

2
.gitignore vendored
View File

@ -18,3 +18,5 @@ profiles.clj
*.ipr
*.log
resources/contracts
node_modules
.DS_Store

Binary file not shown.

View File

@ -208,7 +208,14 @@ a {
background-color: #57a7ed; }
.header {
background-color: #57a7ed; }
background: linear-gradient(90deg, #57A7ED 50%, #54A3E8 50%); }
.header-pattern {
background-image: url(../img/new-site/SOB_tile4@2x.png);
background-size: 20px;
background-position: left top;
background-repeat: repeat;
padding-bottom: 134px; }
@media (min-width: 1230px) {
.header {
@ -217,8 +224,7 @@ a {
border-radius: 10px;
box-shadow: 0 10px 18px 0 rgba(122, 135, 142, 0.33);
z-index: 900;
max-width: 1200px;
padding-bottom: 134px; } }
max-width: 1200px; } }
.header__inner {
display: -ms-flexbox;

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

View File

@ -91,8 +91,10 @@ WHERE i.repo_id = r.repo_id;
-- :name get-issues-count :? :1
SELECT COUNT(*)
FROM issues i, repositories r
WHERE i.repo_id = :repo_id;
FROM issues i
WHERE i.repo_id = :repo_id
AND i.confirm_hash is null
AND i.is_open = true;
-- :name update-repo-generic :! :n
/* :require [clojure.string :as string]

View File

@ -57,6 +57,7 @@
<div class="container-wrap">
<div class="container">
<div class="header">
<div class="header-pattern">
<div class="header__inner">
<div class="header-section header-section--left">
<a class="logo" href="/">
@ -109,6 +110,7 @@
</div>
</div>
</div>
<div class="slides">
@ -117,7 +119,7 @@
<div class="slide__inner">
<div class="sections">
<h2 class="section--title">Connecting Developers & Organizations from everywhere</h2>
<h2 class="section--title">Connecting developers & organizations from everywhere</h2>
<div class="section">
@ -125,7 +127,7 @@
<h1>For developers</h1>
<h2>Work on projects that truly interest you</h2>
<div class="text">
<p>Choose the <strong>bounties that excite you</strong>, match your skill set or fit your schedule. Work from anywhere, no strings attached.</p>
<p>Choose the bounties that excite you, match your skill set or fit your schedule. Work from anywhere, no strings attached.</p>
</div>
<h2>Get the community to fund your ideas</h2>
<div class="text">
@ -136,12 +138,11 @@
<h1>For organizations</h1>
<h2>Avoid time-consuming hiring</h2>
<div class="text">
<p>Find talent <strong>based on code quality</strong>, not on the subjective interview process and candidate feedback.</p>
<p>Find talent based on code quality, not on the subjective interview process and candidate feedback.</p>
</div>
<h2>Find specialized talent worldwide</h2>
<div class="text">
<p>To solve new challenges, you often need hard-to-find skillsets. If you cant easily find local talent, <strong>Status Open Bounty makes it easy to</strong> leverage the best talent
in the world.</p>
<p>To solve new challenges, you often need hard-to-find skillsets. If you cant easily find local talent, Status Open Bounty makes it easy to leverage the best talent in the world.</p>
</div>
</div>
</div>
@ -154,14 +155,14 @@
<h1>For developers</h1>
<h2>Earn rewards in the cryptocurrency of your choice</h2>
<div class="text">
<p>Dont want $USD? With Status Open Bounty, once your work is done, you can <strong>quickly receive</strong> bounties and funding <strong>in the currency of your choice, including</strong> ETH and ERC20 tokens—without exchange rate fees, 3rd party payment fees or bank setup headaches.</p>
<p>Dont want $USD? With Status Open Bounty, once your work is done, you can quickly receive bounties and funding in the currency of your choice, including ETH and ERC20 tokens—without exchange rate fees, 3rd party payment fees or bank setup headaches.</p>
</div>
</div>
<div class="section__text section--org">
<h1>For organizations</h1>
<h2>Pay developers in any cryptocurrency you want</h2>
<div class="text">
<p>Dont want to pay in $USD? <strong>Status Open Bounty supports ETH and most ERC20 Tokens</strong>, so you can pay developers in the currency that makes sense for your organization.</p>
<p>Dont want to pay in $USD? Status Open Bounty supports ETH and most ERC20 Tokens, so you can pay developers in the currency that makes sense for your organization.</p>
</div>
</div>
</div>
@ -171,7 +172,7 @@
<img src="assets/github-logo.svg" class="logo-github">
<h2 class="github-heading" >Open Source Collaboration Tool</h2>
<div class="text">
<p>Status Open Bounty is a bounty- based collaboration tool that plugs right into GitHub.</p>
<p>Status Open Bounty is a bounty-based collaboration tool that plugs right into GitHub.</p>
</div>
</div>
</div>
@ -276,4 +277,3 @@
</body>
</html>

View File

@ -12,6 +12,10 @@
(def ^:const label-name "bounty")
;; TODO: Change max-limit, also defined in two places
;; TODO: Change max limit to 1000 after testing
(def max-issues-limit 2)
(defn has-bounty-label?
[issue]
(let [labels (:labels issue)]
@ -47,29 +51,25 @@
(issues/update-transaction-hash issue-id transaction-hash))))
(log/debug "Issue already exists in DB, ignoring"))))
;; TODO: Change max-limit, also defined in two places
(defn maybe-add-bounty-for-issue [repo repo-id issue]
(let [res (issues/get-issues-count repo-id)
{count :count} res
max-limit 2
limit-reached? (> count max-limit)
_ (log/debug "*** get-issues-count" repo-id res count limit-reached?)]
limit-reached? (> count max-issues-limit)
_ (log/debug "*** get-issues-count" repo-id " " res " " count " " limit-reached?)]
(if limit-reached?
(log/debug "Total issues for repo limit reached " repo count)
(log/debug "Total issues for repo limit reached " repo " " count)
(add-bounty-for-issue repo repo-id issue))))
;; We have a max-limit to ensure people can't add more issues and
;; drain bot account until we have economic design in place
;; TODO(oskarth): Update max-limit to 100
(defn add-bounties-for-existing-issues [full-name]
(let [{repo-id :repo_id
owner :owner
repo :repo} (repos/get-repo full-name)
issues (github/get-issues owner repo)
bounty-issues (filter has-bounty-label? issues)
limit 2
max-bounties (take limit bounty-issues)]
max-bounties (take max-issues-limit bounty-issues)]
(log/debug (str "adding bounties for" (count bounty-issues)
" existing issues (total " (count bounty-issues) ")"))
(doall

View File

@ -80,7 +80,8 @@
(cond (not can-create?)
{:status 400
:body "We are doing a gradual roll-out - please email support@status.im to add repo manually"}
:body "Please join our Riot - chat.status.im/#/register and request
access in our #openbounty room to have your account whitelisted"}
(empty? (:address db-user))
{:status 400

View File

@ -261,11 +261,11 @@
js/adminToken])))
(reset! active-user nil)))
(defn load-data []
(defn load-data [initial-load?]
(doall (map rf/dispatch
[[:load-open-bounties]
[:load-activity-feed]
[:load-top-hunters]]))
[[:load-open-bounties initial-load?]
[:load-activity-feed initial-load?]
[:load-top-hunters initial-load?]]))
(load-user))
(defonce timer-id (r/atom nil))
@ -273,7 +273,7 @@
(defn on-js-load []
(when-not (nil? @timer-id)
(js/clearInterval @timer-id))
(reset! timer-id (js/setInterval load-data 60000))
(reset! timer-id (js/setInterval #(load-data false) 60000))
(mount-components))
(defn init! []
@ -283,5 +283,5 @@
(enable-re-frisk!))
(load-interceptors!)
(hook-browser-navigation!)
(load-data)
(load-data true)
(on-js-load))

View File

@ -145,8 +145,10 @@
(reg-event-fx
:load-activity-feed
(fn [{:keys [db]} [_]]
{:db (assoc db :activity-feed-loading? true)
(fn [{:keys [db]} [_ initial-load?]]
{:db (if initial-load?
(assoc db :activity-feed-loading? true)
db)
:http {:method GET
:url "/api/activity-feed"
:on-success #(dispatch [:set-activity-feed %])}}))
@ -161,8 +163,10 @@
(reg-event-fx
:load-open-bounties
(fn [{:keys [db]} [_]]
{:db (assoc db :open-bounties-loading? true)
(fn [{:keys [db]} [_ initial-load?]]
{:db (if initial-load?
(assoc db :open-bounties-loading? true)
db)
:http {:method GET
:url "/api/open-bounties"
:on-success #(dispatch [:set-open-bounties %])}}))

View File

@ -70,7 +70,7 @@
(when (nil? web3)
[:div.ui.warning.message
[:i.warning.icon]
"To sign off claims, please view CommitETH in Status, Mist or Metamask"])
"To sign off claims, please view Status Open Bounty in Status, Mist or Metamask"])
[:h3 "New claims"]
[claim-list unpaid-bounties]
[:h3 "Old claims"]

Binary file not shown.

Binary file not shown.

View File

@ -208,7 +208,14 @@ a {
background-color: #57a7ed; }
.header {
background-color: #57a7ed; }
background: linear-gradient(90deg, #57A7ED 50%, #54A3E8 50%); }
.header-pattern {
background-image: url(../img/new-site/SOB_tile4@2x.png);
background-size: 20px;
background-position: left top;
background-repeat: repeat;
padding-bottom: 134px; }
@media (min-width: 1230px) {
.header {
@ -217,8 +224,7 @@ a {
border-radius: 10px;
box-shadow: 0 10px 18px 0 rgba(122, 135, 142, 0.33);
z-index: 900;
max-width: 1200px;
padding-bottom: 134px; } }
max-width: 1200px; } }
.header__inner {
display: -ms-flexbox;

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

View File

@ -57,6 +57,7 @@
<div class="container-wrap">
<div class="container">
<div class="header">
<div class="header-pattern">
<div class="header__inner">
<div class="header-section header-section--left">
<a class="logo" href="/">
@ -109,6 +110,7 @@
</div>
</div>
</div>
<div class="slides">
@ -117,7 +119,7 @@
<div class="slide__inner">
<div class="sections">
<h2 class="section--title">Connecting Developers & Organizations from everywhere</h2>
<h2 class="section--title">Connecting developers & organizations from everywhere</h2>
<div class="section">
@ -125,7 +127,7 @@
<h1>For developers</h1>
<h2>Work on projects that truly interest you</h2>
<div class="text">
<p>Choose the <strong>bounties that excite you</strong>, match your skill set or fit your schedule. Work from anywhere, no strings attached.</p>
<p>Choose the bounties that excite you, match your skill set or fit your schedule. Work from anywhere, no strings attached.</p>
</div>
<h2>Get the community to fund your ideas</h2>
<div class="text">
@ -136,12 +138,11 @@
<h1>For organizations</h1>
<h2>Avoid time-consuming hiring</h2>
<div class="text">
<p>Find talent <strong>based on code quality</strong>, not on the subjective interview process and candidate feedback.</p>
<p>Find talent based on code quality, not on the subjective interview process and candidate feedback.</p>
</div>
<h2>Find specialized talent worldwide</h2>
<div class="text">
<p>To solve new challenges, you often need hard-to-find skillsets. If you cant easily find local talent, <strong>Status Open Bounty makes it easy to</strong> leverage the best talent
in the world.</p>
<p>To solve new challenges, you often need hard-to-find skillsets. If you cant easily find local talent, Status Open Bounty makes it easy to leverage the best talent in the world.</p>
</div>
</div>
</div>
@ -154,14 +155,14 @@
<h1>For developers</h1>
<h2>Earn rewards in the cryptocurrency of your choice</h2>
<div class="text">
<p>Dont want $USD? With Status Open Bounty, once your work is done, you can <strong>quickly receive</strong> bounties and funding <strong>in the currency of your choice, including</strong> ETH and ERC20 tokens—without exchange rate fees, 3rd party payment fees or bank setup headaches.</p>
<p>Dont want $USD? With Status Open Bounty, once your work is done, you can quickly receive bounties and funding in the currency of your choice, including ETH and ERC20 tokens—without exchange rate fees, 3rd party payment fees or bank setup headaches.</p>
</div>
</div>
<div class="section__text section--org">
<h1>For organizations</h1>
<h2>Pay developers in any cryptocurrency you want</h2>
<div class="text">
<p>Dont want to pay in $USD? <strong>Status Open Bounty supports ETH and most ERC20 Tokens</strong>, so you can pay developers in the currency that makes sense for your organization.</p>
<p>Dont want to pay in $USD? Status Open Bounty supports ETH and most ERC20 Tokens, so you can pay developers in the currency that makes sense for your organization.</p>
</div>
</div>
</div>
@ -171,7 +172,7 @@
<img src="assets/github-logo.svg" class="logo-github">
<h2 class="github-heading" >Open Source Collaboration Tool</h2>
<div class="text">
<p>Status Open Bounty is a bounty- based collaboration tool that plugs right into GitHub.</p>
<p>Status Open Bounty is a bounty-based collaboration tool that plugs right into GitHub.</p>
</div>
</div>
</div>
@ -276,4 +277,3 @@
</body>
</html>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

View File

@ -1,5 +1,13 @@
.header {
background-color: #57a7ed;
background: linear-gradient(90deg, #57A7ED 50%, #54A3E8 50%);
}
.header-pattern {
background-image: url(../img/new-site/SOB_tile4@2x.png);
background-size: 20px;
background-position: left top;
background-repeat: repeat;
padding-bottom: 134px;
}
@media (min-width: 1230px) {
@ -10,7 +18,7 @@
box-shadow: 0 10px 18px 0 rgba(122, 135, 142, 0.33);
z-index: 900;
max-width: 1200px;
padding-bottom: 134px;
}
}