mirror of
https://github.com/urbit/shrub.git
synced 2024-11-27 18:34:48 +03:00
launch: add %remove launch-action
This commit is contained in:
parent
0d3e409f7c
commit
5516d2ebdb
@ -66,7 +66,7 @@
|
||||
::
|
||||
++ on-init
|
||||
^- (quip card _this)
|
||||
=/ launcha [%launch-action !>([%chat-view /configs '/~chat/js/tile.js'])]
|
||||
=/ launcha [%launch-action !>([%add %chat-view /configs '/~chat/js/tile.js'])]
|
||||
:_ this
|
||||
:~ [%pass /updates %agent [our.bol %chat-store] %watch /updates]
|
||||
[%pass / %arvo %e %connect [~ /'~chat'] %chat-view]
|
||||
|
@ -27,7 +27,7 @@
|
||||
++ on-init
|
||||
^- (quip card:agent:gall _this)
|
||||
=/ launcha
|
||||
[%launch-action !>([%clock /clocktile '/~clock/js/tile.js'])]
|
||||
[%launch-action !>([%add %clock /clocktile '/~clock/js/tile.js'])]
|
||||
:_ this
|
||||
:~ [%pass / %arvo %e %connect [~ /'~clock'] %clock]
|
||||
[%pass /clock %agent [our.bowl %launch] %poke launcha]
|
||||
|
@ -60,7 +60,6 @@
|
||||
:_ this
|
||||
:~ [%pass /updates %agent [our.bowl %contact-store] %watch /updates]
|
||||
[%pass / %arvo %e %connect [~ /'~groups'] %contact-view]
|
||||
(launch-poke:cc [%contact-view /primary '/~groups/js/tile.js'])
|
||||
(contact-poke:cc [%create /~/default])
|
||||
(group-poke:cc [%bundle /~/default])
|
||||
(contact-poke:cc [%add /~/default our.bowl *contact])
|
||||
@ -69,6 +68,7 @@
|
||||
::
|
||||
++ on-save on-save:def
|
||||
++ on-load on-load:def
|
||||
:: (launch-poke:cc [%remove %contact-view /primary '/~groups/js/tile.js'])
|
||||
++ on-poke
|
||||
|= [=mark =vase]
|
||||
^- (quip card _this)
|
||||
|
@ -86,18 +86,29 @@
|
||||
::
|
||||
%launch-action
|
||||
=/ act !<(action:launch vas)
|
||||
=/ beforedata (~(get by data) name.act)
|
||||
=/ newdata
|
||||
?~ beforedata
|
||||
(~(put by data) name.act [*json url.act])
|
||||
(~(put by data) name.act [jon.u.beforedata url.act])
|
||||
=/ new-tile `tile:launch`[`@tas`name.act `path`subscribe.act]
|
||||
:- [%pass subscribe.act %agent [our.bol name.act] %watch subscribe.act]~
|
||||
%= this
|
||||
tiles (~(put in tiles) new-tile)
|
||||
data newdata
|
||||
path-to-tile (~(put by path-to-tile) subscribe.act name.act)
|
||||
==
|
||||
?- -.act
|
||||
%add
|
||||
=/ beforedata (~(get by data) name.act)
|
||||
=/ newdata
|
||||
?~ beforedata
|
||||
(~(put by data) name.act [*json url.act])
|
||||
(~(put by data) name.act [jon.u.beforedata url.act])
|
||||
=/ new-tile `tile:launch`[`@tas`name.act `path`subscribe.act]
|
||||
:- [%pass subscribe.act %agent [our.bol name.act] %watch subscribe.act]~
|
||||
%= this
|
||||
tiles (~(put in tiles) new-tile)
|
||||
data newdata
|
||||
path-to-tile (~(put by path-to-tile) subscribe.act name.act)
|
||||
==
|
||||
::
|
||||
%remove
|
||||
:- [%pass subscribe.act %agent [our.bol name.act] %leave ~]~
|
||||
%= this
|
||||
tiles (~(del in tiles) [name.act subscribe.act])
|
||||
data (~(del by data) name.act)
|
||||
path-to-tile (~(del by path-to-tile) subscribe.act)
|
||||
==
|
||||
==
|
||||
::
|
||||
%handle-http-request
|
||||
=+ !<([eyre-id=@ta =inbound-request:eyre] vas)
|
||||
|
@ -45,7 +45,7 @@
|
||||
[%pass /discussions %agent [our.bowl %link-store] %watch /discussions]
|
||||
[%pass /seen %agent [our.bowl %link-store] %watch /seen]
|
||||
::
|
||||
=+ [dap.bowl /tile '/~link/js/tile.js']
|
||||
=+ [%add dap.bowl /tile '/~link/js/tile.js']
|
||||
[%pass /launch %agent [our.bowl %launch] %poke %launch-action !>(-)]
|
||||
::
|
||||
=+ [%invite-action !>([%create /link])]
|
||||
|
@ -86,7 +86,7 @@
|
||||
::
|
||||
++ on-init
|
||||
^- (quip card _this)
|
||||
=/ lac [%publish /publishtile '/~publish/tile.js']
|
||||
=/ lac [%add %publish /publishtile '/~publish/tile.js']
|
||||
=/ rav [%sing %t [%da now.bol] /app/publish/notebooks]
|
||||
:_ this
|
||||
:~ [%pass /bind %arvo %e %connect [~ /'~publish'] %publish]
|
||||
|
@ -33,7 +33,7 @@
|
||||
:_ this
|
||||
:~ [%pass /bind/weather %arvo %e %connect [~ /'~weather'] %weather]
|
||||
:* %pass /launch/weather %agent [our.bol %launch] %poke
|
||||
%launch-action !>([%weather /weathertile '/~weather/js/tile.js'])
|
||||
%launch-action !>([%add %weather /weathertile '/~weather/js/tile.js'])
|
||||
==
|
||||
==
|
||||
++ on-save !>(state)
|
||||
|
@ -3,5 +3,9 @@
|
||||
::
|
||||
+$ tile-data (map @tas [jon=json url=@t])
|
||||
::
|
||||
+$ action [name=@tas subscribe=path url=@t]
|
||||
+$ action
|
||||
$%
|
||||
[%add name=@tas subscribe=path url=@t]
|
||||
[%remove name=@tas subscribe=path]
|
||||
==
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user