Skip to content

Commit

Permalink
Merge pull request #38 from district0x/qa
Browse files Browse the repository at this point in the history
current QA -> Prod
  • Loading branch information
ginesdt committed Jan 30, 2024
2 parents e872758 + 2d4c98c commit a11883a
Show file tree
Hide file tree
Showing 36 changed files with 5,328 additions and 232 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
/.cpcache/
/.shadow-cljs/
/server/
/target/
19 changes: 13 additions & 6 deletions bb.edn
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,25 @@
:task (do
(println "Compiling smart contracts")
(shell "npx truffle compile"))}
pack-ui-dependencies {:doc "Generate a single js file from all npm dependencies"
:task (do
(println "Packing ui dependencies")
(shell "npx webpack"))}
watch-ui {:doc "Watch and compile ui code changes CLJS -> JS in src/ui/**"
:requires ([babashka.cli :as cli])
:task (let [aliases (or *command-line-args* [])
command-args (format "-M:dev:shadow-cljs%s watch ui" (clojure.string.join "" aliases))]
(println "Starting watch-ui. args:" command-args)
(clojure command-args))}
release-ui {:doc "Compile ui CLJS -> JS in src/ui/** for release"
:requires ([babashka.cli :as cli])
:task (let [aliases (or *command-line-args* [])
command-args (format "-M:shadow-cljs%s release ui" (clojure.string.join "" aliases))]
(println "Preparing UI for release. args:" command-args)
(clojure command-args))}
compile-ui {:doc "Compile ui CLJS -> JS in src/ui/** for release"
:requires ([babashka.cli :as cli])
:task (let [aliases (or *command-line-args* [])
command-args (format "-M:shadow-cljs%s release ui" (clojure.string.join "" aliases))]
(println "Preparing UI for release. args:" command-args)
(clojure command-args))}
release-ui {:doc "compile project and pack all dependencies for release"
:requires ([babashka.cli :as cli])
:depends [compile-ui pack-ui-dependencies]}
watch-server {:doc "Watch and compile server code changes CLJS -> JS in src/server/**"
:requires ([babashka.cli :as cli])
:task (let [aliases (or *command-line-args* [])
Expand Down
12 changes: 6 additions & 6 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
is.d0x/district-sendgrid {:mvn/version "23.9.25"}
is.d0x/district-ui-reagent-render {:mvn/version "23.1.26"}
is.d0x/district-ui-router {:mvn/version "23.2.9"}
is.d0x/district-ui-smart-contracts {:mvn/version "23.8.7"}
is.d0x/district-ui-web3 {:mvn/version "23.8.7"}
is.d0x/district-ui-web3-accounts {:mvn/version "23.8.7"}
is.d0x/district-ui-web3-chain {:mvn/version "23.8.7"}
is.d0x/district-ui-web3-tx-id {:mvn/version "23.8.7"}
is.d0x/district-ui-smart-contracts {:mvn/version "23.11.30"}
is.d0x/district-ui-web3 {:mvn/version "23.11.30"}
is.d0x/district-ui-web3-accounts {:mvn/version "23.11.30"}
is.d0x/district-ui-web3-chain {:mvn/version "23.11.30"}
is.d0x/district-ui-web3-tx-id {:mvn/version "23.11.30"}
mount/mount {:mvn/version "0.1.16"}
org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/clojurescript {:mvn/version "1.11.4"}
Expand All @@ -51,7 +51,7 @@
{binaryage/devtools {:mvn/version "1.0.7"}
cider/cider-nrepl {:mvn/version "0.27.2"}
cider/piggieback {:mvn/version "0.4.0"}
day8.re-frame/re-frame-10x {:mvn/version "1.5.0"}
day8.re-frame/re-frame-10x {:mvn/version "1.8.1"}
day8.re-frame/test {:mvn/version "0.1.5"}
day8.re-frame/tracing {:mvn/version "0.6.2"}
jamesmacaulay/cljs-promises {:mvn/version "0.1.0"}
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@apollo/server": "4.3.0",
"@metamask/eth-sig-util": "5.0.2",
"@sentry/node": "4.6.6",
"@thirdweb-dev/react": "4.1.14",
"apollo-fetch": "0.7.0",
"axios": "0.27.2",
"better-sqlite3": "7.6.2",
Expand All @@ -27,12 +28,13 @@
"jquery": "3.6.1",
"jsonwebtoken": "9.0.0",
"jwt-decode": "3.1.2",
"react": "16.14.0",
"react-dom": "16.14.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-infinite": "0.13.0",
"react-infinite-scroller": "1.2.6",
"react-masonry-component": "6.3.0",
"react-select": "5.7.4",
"timeago-react": "3.0.6",
"twitter-api-sdk": "1.2.1",
"web-push": "3.6.4",
"web3": "1.7.3",
Expand All @@ -58,7 +60,9 @@
"normalize.css": "8.0.1",
"sass": "1.63.6",
"shadow-cljs": "2.19.8",
"truffle": "5.8.1"
"truffle": "5.8.1",
"webpack": "5.88.2",
"webpack-cli": "5.1.4"
},
"engines": {
"node": "^18.0.0"
Expand Down
14 changes: 8 additions & 6 deletions resources/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@

<title>Streamtide</title>

<meta name="description" content="Streamtide">
<meta name="author" content="Streamtide">
<meta name="description" content="StreamTide is an open-source patronage tool that operates on Web3 and microgrants. We host grant matching events that match donations made to creators, turning 'a small stream of support into a tidal wave of support'. Our goal is to support creators, promote open-source, and the creative commons, helping to shape the decentralized future of work.">
<meta name="author" content="StreamTide">

<meta property="og:type" content="website">
<meta property="og:title" content="Streamtide">
<!-- <meta property="og:url" content="http://streamtide-web.labcp.co/">-->
<meta property="og:description" content="Streamtide">
<!-- <meta property="og:image" content="https://streamtide-web.labcp.co/img/content/share.jpg">-->
<meta property="og:title" content="StreamTide">
<meta property="og:url" content="https://streamtide.io/">
<meta property="og:description" content="StreamTide is an open-source patronage tool that operates on Web3 and microgrants. We host grant matching events that match donations made to creators, turning 'a small stream of support into a tidal wave of support'. Our goal is to support creators, promote open-source, and the creative commons, helping to shape the decentralized future of work.">
<meta property="og:image" content="https://streamtide.io/img/layout/logo-streamtide.svg">
<meta property=”og:site_name” content=”Streamtide” />

<link rel="apple-touch-icon" sizes="180x180" href="/favicon.svg">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon.svg">
Expand Down Expand Up @@ -50,6 +51,7 @@
</div>
</div>
</div>
<script src="/js/libs.js"></script>
<script src="/js/main.js"></script>
<script>streamtide.ui.core.init();</script>
</body>
Expand Down
24 changes: 23 additions & 1 deletion resources/scss/components/popUpGrant.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#popUpGrant,
#popUpRestoreSettings,
#popUpAddContent,
#popUpSafeLink,
#popUpWarn {
Expand Down Expand Up @@ -82,7 +83,25 @@
display: none;
}
}
.popUpContent, .popUpGrant, .popUpSafeLink, .popUpWarn {
.popUpRestoreSettings {
.content {
padding: 20px 20px 2px;
}
.restore {
margin-bottom: 5px;
}
.discard {
color: black;
background-color: lightgrey;
&:hover {
background-color: $yellow;
}
}
.btBasic {
font-size: 16px;
}
}
.popUpContent, .popUpGrant, .popUpSafeLink, .popUpWarn, .popUpRestoreSettings {
width: calc(100% - 42px);
max-width: 490px;
margin: 0 auto;
Expand Down Expand Up @@ -268,6 +287,9 @@
}
}
}
.btBasic {
font-size: 16px;
}
}
@include media-breakpoint-up(lg) {
.popUpContent, .popUpGrant {
Expand Down
87 changes: 87 additions & 0 deletions resources/scss/layouts/feeds.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
.pageFeeds {
padding-top: 97.21px;
background-color: $bgProfile;
.contentFeeds {
margin-bottom: 20px;
.medias {
.content {
width: calc(100% - 25px);
margin: 0 12.5px 24px;

audio, video {
width: 100%;
}

.contentFoot {
display: flex;
justify-content: space-between;

.userProfile {
a {
margin-top: 14px;
margin-bottom: 30px;
margin-left: 30px;

width: fit-content;

display: flex;
align-items: center;

.user {
width: 36px;
height: 36px;

.photo {
box-shadow: 0px 0px 0px 1px $lilac;
}

&.star {
&::after {
height: 18px;
width: 19px;
bottom: 0px;
right: -9.5px;
}
}
}

h3 {
margin-left: 10px;
}
}
}

.date {
font-size: smaller;
margin-top: 14px;
margin-right: 14px;
}
}
}
}
}
.not-found {
text-align: center;
font-weight: bold;
}
@include media-breakpoint-up(md) {
.contentFeeds {
.medias {
.content {
width: calc(50% - 25px);
margin: 0 12.5px 24px;
}
}
}
}
@include media-breakpoint-up(lg) {
padding-top: 140.29px;
background-color: $bgSite;
.contentFeeds {
background-color: $bgCard;
border-radius: 15px;
padding: 14px 40px;
position: relative;
}
}
}
35 changes: 33 additions & 2 deletions resources/scss/layouts/headerSite.scss
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,31 @@
}
}
.btLogin {
width: 297.39px;
margin: 0 auto 39px;
width: 217.39px;
margin: 0 auto 5px;
}
.connectWallet {
background-color: $lilac;
border: 0;
border-radius: 6px;
height: 52px;
color: $white;
justify-content: center;
&.btLogin {
margin-left: 2px;
}
&:hover {
background-color: $yellow;
}
div {
span {
color: $white
}
span:nth-child(2) {
opacity: 0.6;

}
}
}
.policyTerms {
display: flex;
Expand Down Expand Up @@ -340,11 +363,19 @@
}
}
}
.btLoginContainer {

order: 3;
}
.btLogin {
order: 3;
width: 139.71px;
margin: 0;
}
.connectWalletContainer {
order: 4;
min-width: 182px;
}
}
@include media-breakpoint-up(llg) {
.logoSite {
Expand Down
2 changes: 2 additions & 0 deletions resources/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
@import 'layouts/profileEdit.scss';
@import 'layouts/send-support.scss';
@import 'layouts/about.scss';
@import 'layouts/feeds.scss';

//@import 'pages/**/*.scss';
}
Expand Down Expand Up @@ -79,6 +80,7 @@
@import 'layouts/profileEdit.scss';
@import 'layouts/send-support.scss';
@import 'layouts/about.scss';
@import 'layouts/feeds.scss';

//@import 'pages/**/*.scss';
}
2 changes: 2 additions & 0 deletions shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
:main streamtide.ui.core
:infer-externs true
:output-dir "resources/public/js/"
:js-options {:js-provider :external
:external-index "target/index.js"}
:dev {
:source-map true
:source-map-timestamp true
Expand Down
2 changes: 1 addition & 1 deletion src-cljsjs/cljsjs/jwt_decode.cljs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns cljsjs.jwt-decode
(:require ["jwt-decode" :as jd]))
(:require ["jwt-decode" :default jd]))

(js/goog.exportSymbol "jwt_decode" jd)
4 changes: 4 additions & 0 deletions src-cljsjs/cljsjs/timeago_react.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(ns cljsjs.timeago-react
(:require ["timeago-react" :default tr]))

(js/goog.exportSymbol "timeago_react" tr)
4 changes: 3 additions & 1 deletion src/streamtide/shared/smart_contracts_prod.cljs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
(ns streamtide.shared.smart-contracts-prod)
(def smart-contracts
{:migrations {:name "Migrations" :address "0x5f5391A0ec248BBC7906242Ec9D10394158Fd70b"} :streamtide {:name "MVPCLR" :address "0x89Cf0c5f93189642911412D2d49E4b872689F44e"} :streamtide-fwd {:name "MutableForwarder" :address "0x6Db2844F211580ae950Ed10635AA12409Ee816De" :forwards-to :streamtide}})
{:migrations {:name "Migrations" :address "0x5f5391A0ec248BBC7906242Ec9D10394158Fd70b"}
:streamtide {:name "MVPCLR" :address "0x89Cf0c5f93189642911412D2d49E4b872689F44e"}
:streamtide-fwd {:name "MutableForwarder" :address "0x6Db2844F211580ae950Ed10635AA12409Ee816De" :forwards-to :streamtide}})
15 changes: 11 additions & 4 deletions src/streamtide/ui/admin/black_listing/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[district.ui.web3-accounts.queries :as account-queries]
[district.ui.web3-tx.events :as tx-events]
[re-frame.core :as re-frame]
[streamtide.ui.components.error-notification :as error-notification]
[streamtide.ui.events :refer [wallet-chain-interceptors]]
[streamtide.ui.utils :refer [build-tx-opts]]))

Expand All @@ -25,7 +26,13 @@
:related-href {:name :route.admin/black-listing}}
:on-tx-success-n [[::logging/info (str tx-name " tx success") ::blacklist]
[::notification-events/show (str "Address " address " successfully " (if blacklisted? "blacklisted" "whitelisted"))]]
:on-tx-error [::logging/error (str tx-name " tx error")
{:user {:id active-account}
:address address}
::blacklist]}]})))
:on-tx-error-n [[::logging/error (str tx-name " tx error")
{:user {:id active-account}
:address address}
::blacklist]
[::error-notification/show-error "Transaction failed"]]
:on-tx-hash-error-n [[::logging/error (str tx-name " tx error")
{:user {:id active-account}
:address address}
::blacklist]
[::error-notification/show-error "Transaction failed"]]}]})))
5 changes: 3 additions & 2 deletions src/streamtide/ui/admin/black_listing/page.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@
loading? (subscribe [::bl-subs/blacklisting? address])
blacklist-tx-pending? (subscribe [::tx-id-subs/tx-pending? {:streamtide/blacklist tx-id}])
blacklist-tx-success? (subscribe [::tx-id-subs/tx-success? {:streamtide/blacklist tx-id}])
waiting-wallet? (subscribe [::st-subs/waiting-wallet? {:streamtide/blacklist tx-id}])
blacklist-button (fn [{:keys [:text :pending :completed :class]} blacklisted?]
[pending-button {:pending? @blacklist-tx-pending?
[pending-button {:pending? (or @blacklist-tx-pending? @waiting-wallet?)
:pending-text pending
:disabled (or @blacklist-tx-pending? @blacklist-tx-success?)
:disabled (or @blacklist-tx-pending? @blacklist-tx-success? @waiting-wallet?)
:class (str "btBasic btBasic-light " class)
:on-click (fn [e]
(.stopPropagation e)
Expand Down

0 comments on commit a11883a

Please sign in to comment.