mirror of
https://github.com/status-im/pluto.git
synced 2025-02-23 07:58:20 +00:00
Added missing assets
This commit is contained in:
parent
4c26a5516b
commit
1935f0eaa5
19
docs/assets/extensions/demo/extension.edn
Normal file
19
docs/assets/extensions/demo/extension.edn
Normal 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?"]))]}
|
52
docs/assets/extensions/piplette/extension.edn
Normal file
52
docs/assets/extensions/piplette/extension.edn
Normal 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]}])]}
|
1743
docs/assets/pluto.js
1743
docs/assets/pluto.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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/
|
||||
|
Loading…
x
Reference in New Issue
Block a user