commit
695e3d14b8
|
@ -5,7 +5,7 @@ Allows you to set bounties for Github issues, paid out in Ether.
|
||||||
More information:
|
More information:
|
||||||
http://wiki.status.im/proposals/commiteth/
|
http://wiki.status.im/proposals/commiteth/
|
||||||
|
|
||||||
Live alpha version (uses Ropsten testnet):
|
Live alpha version:
|
||||||
https://commiteth.com
|
https://commiteth.com
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
user = null;
|
user = null;
|
||||||
}
|
}
|
||||||
var commitethVersion = "{{commiteth-version}}";
|
var commitethVersion = "{{commiteth-version}}";
|
||||||
|
var onTestnet = "{{on-testnet?}}";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% style "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.min.css" %}
|
{% style "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.min.css" %}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
(:import [java.util UUID]))
|
(:import [java.util UUID]))
|
||||||
|
|
||||||
(def ^:dynamic url "https://api.github.com/")
|
(def ^:dynamic url "https://api.github.com/")
|
||||||
|
(defonce ^:const on-testnet? (System/getProperty "commiteth.onTestnet"))
|
||||||
(defn server-address [] (:server-address env))
|
(defn server-address [] (:server-address env))
|
||||||
(defn client-id [] (:github-client-id env))
|
(defn client-id [] (:github-client-id env))
|
||||||
(defn client-secret [] (:github-client-secret env))
|
(defn client-secret [] (:github-client-secret env))
|
||||||
|
@ -183,6 +183,12 @@
|
||||||
[owner repo issue-number]
|
[owner repo issue-number]
|
||||||
(md-image "Contract deploying" (str (server-address) "/img/deploying_contract.png")))
|
(md-image "Contract deploying" (str (server-address) "/img/deploying_contract.png")))
|
||||||
|
|
||||||
|
(defn network-text []
|
||||||
|
(str "Network: " (if on-testnet?
|
||||||
|
"Testnet"
|
||||||
|
"Mainnet")
|
||||||
|
"\n"))
|
||||||
|
|
||||||
(defn generate-open-comment
|
(defn generate-open-comment
|
||||||
[owner repo issue-number contract-address balance balance-str]
|
[owner repo issue-number contract-address balance balance-str]
|
||||||
(let [image-url (md-image "QR Code" (get-qr-url owner repo issue-number balance))
|
(let [image-url (md-image "QR Code" (get-qr-url owner repo issue-number balance))
|
||||||
|
@ -191,7 +197,7 @@
|
||||||
(format (str "Current balance: %s\n"
|
(format (str "Current balance: %s\n"
|
||||||
"Contract address: %s\n"
|
"Contract address: %s\n"
|
||||||
"%s\n"
|
"%s\n"
|
||||||
"Network: Testnet\n"
|
(network-text)
|
||||||
"To claim this bounty sign up at %s")
|
"To claim this bounty sign up at %s")
|
||||||
balance-str contract-address image-url site-url)))
|
balance-str contract-address image-url site-url)))
|
||||||
|
|
||||||
|
@ -200,7 +206,7 @@
|
||||||
[contract-address balance-str winner-login]
|
[contract-address balance-str winner-login]
|
||||||
(format (str "Balance: %s\n"
|
(format (str "Balance: %s\n"
|
||||||
"Contract address: %s\n"
|
"Contract address: %s\n"
|
||||||
"Network: Testnet\n"
|
(network-text)
|
||||||
"Status: pending maintainer confirmation\n"
|
"Status: pending maintainer confirmation\n"
|
||||||
"Winner: %s\n")
|
"Winner: %s\n")
|
||||||
balance-str contract-address winner-login))
|
balance-str contract-address winner-login))
|
||||||
|
@ -209,7 +215,7 @@
|
||||||
[contract-address balance-str payee-login]
|
[contract-address balance-str payee-login]
|
||||||
(format (str "Balance: %s\n"
|
(format (str "Balance: %s\n"
|
||||||
"Contract address: %s\n"
|
"Contract address: %s\n"
|
||||||
"Network: Testnet\n"
|
(network-text)
|
||||||
"Paid to: %s\n")
|
"Paid to: %s\n")
|
||||||
balance-str contract-address payee-login))
|
balance-str contract-address payee-login))
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
[clojure.java.io :as io]))
|
[clojure.java.io :as io]))
|
||||||
|
|
||||||
(defonce ^:const version (System/getProperty "commiteth.version"))
|
(defonce ^:const version (System/getProperty "commiteth.version"))
|
||||||
|
(defonce ^:const on-testnet? (System/getProperty "commiteth.onTestnet"))
|
||||||
|
|
||||||
(defn home-page [{user-id :id
|
(defn home-page [{user-id :id
|
||||||
login :login
|
login :login
|
||||||
|
@ -19,7 +20,8 @@
|
||||||
:admin-token admin-token
|
:admin-token admin-token
|
||||||
:authorize-url (github/signup-authorize-url)
|
:authorize-url (github/signup-authorize-url)
|
||||||
:authorize-url-admin (github/admin-authorize-url)
|
:authorize-url-admin (github/admin-authorize-url)
|
||||||
:commiteth-version version}))
|
:commiteth-version version
|
||||||
|
:on-testnet? on-testnet?}))
|
||||||
|
|
||||||
(defroutes home-routes
|
(defroutes home-routes
|
||||||
(GET "/" {{user :identity} :session}
|
(GET "/" {{user :identity} :session}
|
||||||
|
|
|
@ -2,3 +2,7 @@
|
||||||
|
|
||||||
(def debug?
|
(def debug?
|
||||||
^boolean js/goog.DEBUG)
|
^boolean js/goog.DEBUG)
|
||||||
|
|
||||||
|
(defn on-testnet? []
|
||||||
|
(not (or (empty? js/onTestnet)
|
||||||
|
(= "false" js/onTestnet))))
|
||||||
|
|
|
@ -101,7 +101,9 @@
|
||||||
(when-not @user
|
(when-not @user
|
||||||
[:div.ui.text.content
|
[:div.ui.text.content
|
||||||
[:div.ui.divider.hidden]
|
[:div.ui.divider.hidden]
|
||||||
[:h2.ui.header "Commit ETH (Testnet)"]
|
[:h2.ui.header (if (config/on-testnet?)
|
||||||
|
"Commit ETH (Testnet)"
|
||||||
|
"Commit ETH")]
|
||||||
[:h2.ui.subheader "Earn ETH by committing to open source projects"]
|
[:h2.ui.subheader "Earn ETH by committing to open source projects"]
|
||||||
[:div.ui.divider.hidden]])
|
[:div.ui.divider.hidden]])
|
||||||
[tabs]]])))
|
[tabs]]])))
|
||||||
|
|
Loading…
Reference in New Issue