mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
publish: addressed review, fixed issue with metadata
This commit is contained in:
parent
a29aa2d01a
commit
f46bc4b397
@ -1719,14 +1719,13 @@
|
|||||||
(group-poke [%unbundle old-read])
|
(group-poke [%unbundle old-read])
|
||||||
(group-hook-poke [%remove old-write])
|
(group-hook-poke [%remove old-write])
|
||||||
(group-hook-poke [%remove old-read])
|
(group-hook-poke [%remove old-read])
|
||||||
(perm-group-hook-poke [%dissociate old-write (sy old-write ~)])
|
|
||||||
(perm-group-hook-poke [%dissociate old-read (sy old-read ~)])
|
|
||||||
(perm-hook-poke [%remove old-write])
|
(perm-hook-poke [%remove old-write])
|
||||||
(perm-hook-poke [%remove old-read])
|
(perm-hook-poke [%remove old-read])
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
?~ target.act
|
?~ target.act
|
||||||
:: create new group from subscribers
|
:: create new group from subscribers
|
||||||
|
::
|
||||||
=. writers.u.book (slag 1 writers.u.book)
|
=. writers.u.book (slag 1 writers.u.book)
|
||||||
=. subscribers.u.book writers.u.book
|
=. subscribers.u.book writers.u.book
|
||||||
=/ del=notebook-delta [%edit-book our.bol book.act u.book]
|
=/ del=notebook-delta [%edit-book our.bol book.act u.book]
|
||||||
@ -1741,33 +1740,53 @@
|
|||||||
title.u.book
|
title.u.book
|
||||||
description.u.book
|
description.u.book
|
||||||
==
|
==
|
||||||
|
%- metadata-poke
|
||||||
|
:* %add
|
||||||
|
writers.u.book
|
||||||
|
[%publish /(scot %p our.bol)/[book.act]]
|
||||||
|
title.u.book
|
||||||
|
description.u.book
|
||||||
|
0x0
|
||||||
|
date-created.u.book
|
||||||
|
our.bol
|
||||||
|
==
|
||||||
==
|
==
|
||||||
|
::
|
||||||
?> ?=(^ u.target.act)
|
?> ?=(^ u.target.act)
|
||||||
=. writers.u.book u.target.act
|
=. writers.u.book u.target.act
|
||||||
=. subscribers.u.book u.target.act
|
=. subscribers.u.book u.target.act
|
||||||
=/ group-host=@p (slav %p i.u.target.act)
|
=/ group-host=@p (slav %p i.u.target.act)
|
||||||
|
::
|
||||||
=/ scry-pax :(weld /=group-store/(scot %da now.bol) u.target.act /noun)
|
=/ scry-pax :(weld /=group-store/(scot %da now.bol) u.target.act /noun)
|
||||||
=/ old-group=(set @p) (need .^((unit (set @p)) %gx scry-pax))
|
=/ old-group=(set @p) (need .^((unit (set @p)) %gx scry-pax))
|
||||||
=/ dif-peeps=(set @p) (~(dif in (get-subscribers book.act)) old-group)
|
=/ dif-peeps=(set @p) (~(dif in (get-subscribers book.act)) old-group)
|
||||||
?: ?& inclusive.act
|
::
|
||||||
=(group-host our.bol)
|
=/ del=notebook-delta [%edit-book our.bol book.act u.book]
|
||||||
==
|
:_ state(books (~(put by books) [our.bol book.act] u.book))
|
||||||
:: add all subscribers to group
|
%+ weld
|
||||||
=/ del=notebook-delta [%edit-book our.bol book.act u.book]
|
|
||||||
:_ state(books (~(put by books) [our.bol book.act] u.book))
|
|
||||||
%+ weld destroy-old-groups
|
%+ weld destroy-old-groups
|
||||||
^- (list card)
|
^- (list card)
|
||||||
:~ [%give %fact [/notebook/[book.act]]~ %publish-notebook-delta !>(del)]
|
:~ [%give %fact [/notebook/[book.act]]~ %publish-notebook-delta !>(del)]
|
||||||
[%give %fact [/primary]~ %publish-primary-delta !>(del)]
|
[%give %fact [/primary]~ %publish-primary-delta !>(del)]
|
||||||
(group-poke [%add dif-peeps u.target.act])
|
%- metadata-poke
|
||||||
|
:* %add
|
||||||
|
writers.u.book
|
||||||
|
[%publish /(scot %p our.bol)/[book.act]]
|
||||||
|
title.u.book
|
||||||
|
description.u.book
|
||||||
|
0x0
|
||||||
|
date-created.u.book
|
||||||
|
our.bol
|
||||||
|
==
|
||||||
==
|
==
|
||||||
|
?: ?& inclusive.act
|
||||||
|
=(group-host our.bol)
|
||||||
|
==
|
||||||
|
:: add all subscribers to group
|
||||||
|
::
|
||||||
|
[(group-poke [%add dif-peeps u.target.act])]~
|
||||||
:: kick subscribers who are not already in group
|
:: kick subscribers who are not already in group
|
||||||
=/ del=notebook-delta [%edit-book our.bol book.act u.book]
|
::
|
||||||
:_ state(books (~(put by books) [our.bol book.act] u.book))
|
|
||||||
%+ weld destroy-old-groups
|
|
||||||
^- (list card)
|
|
||||||
:+ [%give %fact [/notebook/[book.act]]~ %publish-notebook-delta !>(del)]
|
|
||||||
[%give %fact [/primary]~ %publish-primary-delta !>(del)]
|
|
||||||
%+ turn ~(tap in dif-peeps)
|
%+ turn ~(tap in dif-peeps)
|
||||||
|= who=@p
|
|= who=@p
|
||||||
^- card
|
^- card
|
||||||
@ -1812,6 +1831,11 @@
|
|||||||
[%give %fact [/publishtile]~ %json !>(jon)]
|
[%give %fact [/publishtile]~ %json !>(jon)]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
++ metadata-poke
|
||||||
|
|= act=metadata-action
|
||||||
|
^- card
|
||||||
|
[%pass / %agent [our.bol %metadata-hook] %poke %metadata-action !>(act)]
|
||||||
|
::
|
||||||
++ emit-metadata
|
++ emit-metadata
|
||||||
|= del=metadata-delta
|
|= del=metadata-delta
|
||||||
^- (list card)
|
^- (list card)
|
||||||
@ -1842,11 +1866,6 @@
|
|||||||
^- (list card)
|
^- (list card)
|
||||||
[(metadata-poke [%add group-path [%publish app-path] metadata])]~
|
[(metadata-poke [%add group-path [%publish app-path] metadata])]~
|
||||||
::
|
::
|
||||||
++ metadata-poke
|
|
||||||
|= act=metadata-action
|
|
||||||
^- card
|
|
||||||
[%pass / %agent [our.bol %metadata-hook] %poke %metadata-action !>(act)]
|
|
||||||
::
|
|
||||||
++ metadata-scry
|
++ metadata-scry
|
||||||
|= [group-path=path app-path=path]
|
|= [group-path=path app-path=path]
|
||||||
^- (unit metadata)
|
^- (unit metadata)
|
||||||
|
@ -105,7 +105,6 @@ export class Settings extends Component {
|
|||||||
const { props, state } = this;
|
const { props, state } = this;
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
isLoading: true,
|
|
||||||
disabled: true,
|
disabled: true,
|
||||||
type: 'Converting'
|
type: 'Converting'
|
||||||
}, (() => {
|
}, (() => {
|
||||||
@ -115,7 +114,7 @@ export class Settings extends Component {
|
|||||||
target: state.targetGroup,
|
target: state.targetGroup,
|
||||||
inclusive: state.inclusive,
|
inclusive: state.inclusive,
|
||||||
}
|
}
|
||||||
}).then(() => this.setState({awaiting: false}));
|
}).then(() => this.setState({disabled: false}));
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user