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