Added missing assets

This commit is contained in:
Julien Eluard 2018-05-29 17:07:29 +02:00
parent 4c26a5516b
commit 1935f0eaa5
No known key found for this signature in database
GPG Key ID: 6FD7DB5437FCBEF6
5 changed files with 1814 additions and 1745 deletions

View File

@ -0,0 +1,19 @@
{:extension/meta
{:name "Simple Demo"
:description "A simple demo of extension"
:documentation "Nothing. Just see a text with dynamic random color."}
:hooks/main
{:name ""
:description ""
:view #status/view [:main]}
:views/main
[view {}
[text {} "Hello"]
(let [cond? #status/query [:random-boolean]]
(if cond?
[text {:style {:color "green"}}
"World?"]
[text {:style {:color "red"}}
"World?"]))]}

View File

@ -0,0 +1,52 @@
{:extension/meta
{:name "Piplette"
:description "A light client for Peepeth using extensions"
:documentation "..."}
:extension/lifecycle
{:on-activated #event [:fetch-all-posts]}
:events/fetch-all-posts
[:status/ethereum.logs {:address "0xfa28ec7198028438514b49a3cf353bca5541ce1d"
:topics ["PeepEth()"]
:inputs [{:name :hash :type :string}] ;; Allows to decode transaction data
:on-log #status/event [:fetch-ipfs]}] ;; A map of decoded data will be injected
:events/fetch-ipfs
(let [{:keys [hash]} properties]
[:status/ipfs.get {:hash hash
:on-success #status/event [:status/db.append {:path [:all-posts]}]}])
:queries/all-posts
[:status/db.get {:path [:all-posts]
:limit 20}]
:views/post
;; TODO get account details
;; handle threads
(let [{:keys [content untrustedAddress untrustedTimestamp parentID]} properties]
[view {}
[view {}
[text {}
untrustedAddress]
[text {}
untrustedTimestamp]]
[text {}
content]])
:styles/screen
{:background-color #?(:android :green
:ios :red
:web :white)}
:i18n/title
{:en "Peepeth !!"}
:hooks/main
[screen {:style #status/style [:screen]}
[toolbar {}
[text {}
#i18n [:title]]]
(let [posts #status/query [:all-posts]]
[list {:data posts
:template #status/view [:post]}])]}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
mkdir -p docs/assets
clj -R:repl build.clj compile once
cp resources/public/assets/*.js docs/assets
cp -R resources/public/assets/* docs/assets
cp resources/public/index.html docs/