mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
Merge branch 'release/next-userspace' into lf/post-parent
This commit is contained in:
commit
578924049d
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3f7ab316c66e983b839e6e4d72d5c110eef91fe22fd03ee591e05cad59f69ca0
|
||||
size 9858268
|
||||
oid sha256:fd9f630f51cb104cd2042ef231b78e802a8fd31bbd0a90ced75c7ebee792647a
|
||||
size 9940591
|
||||
|
@ -5,7 +5,7 @@
|
||||
/- glob
|
||||
/+ default-agent, verb, dbug
|
||||
|%
|
||||
++ hash 0v5.g86fq.9ngth.ki9h1.q7kut.icm5f
|
||||
++ hash 0v6.8mn05.16g61.46lkc.lgddc.3ifug
|
||||
+$ state-0 [%0 hash=@uv glob=(unit (each glob:glob tid=@ta))]
|
||||
+$ all-states
|
||||
$% state-0
|
||||
|
@ -24,6 +24,6 @@
|
||||
<div id="portal-root"></div>
|
||||
<script src="/~landscape/js/channel.js"></script>
|
||||
<script src="/~landscape/js/session.js"></script>
|
||||
<script src="/~landscape/js/bundle/index.3cc6f7ed5ba96e93c4d9.js"></script>
|
||||
<script src="/~landscape/js/bundle/index.fbd0f73d77fc99808c22.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -65,16 +65,25 @@
|
||||
~
|
||||
=/ role=(unit (unit role-tag))
|
||||
(role-for-ship:grp group.update src.bowl)
|
||||
=/ =metadatum:store
|
||||
(fall (peek-metadatum:met %groups group.update) *metadatum:store)
|
||||
?~ role ~
|
||||
=/ metadatum=(unit metadatum:store)
|
||||
(peek-metadatum:met %groups group.update)
|
||||
?: ?& ?=(~ metadatum)
|
||||
(is-managed:grp group.update)
|
||||
==
|
||||
~
|
||||
?: ?& ?=(^ metadatum)
|
||||
!(is-managed:grp group.update)
|
||||
==
|
||||
~
|
||||
?^ u.role
|
||||
?: ?=(?(%admin %moderator) u.u.role)
|
||||
`vas
|
||||
~
|
||||
?. ?=(%add -.update) ~
|
||||
?: ?& =(src.bowl entity.resource.resource.update)
|
||||
?=(%member-metadata vip.metadatum)
|
||||
?: ?& ?=(^ metadatum)
|
||||
=(src.bowl entity.resource.resource.update)
|
||||
?=(%member-metadata vip.u.metadatum)
|
||||
==
|
||||
`vas
|
||||
~
|
||||
|
@ -1,5 +1,6 @@
|
||||
/- spider,
|
||||
met=metadata-store
|
||||
met=metadata-store,
|
||||
graph=graph-store
|
||||
/+ strandio, resource, graph-view
|
||||
::
|
||||
=* strand strand:spider
|
||||
@ -36,4 +37,11 @@
|
||||
group.action
|
||||
groups+group.action
|
||||
metadatum(feed.config [~ ~])
|
||||
?: ?=([~ ^] feed.config.metadatum)
|
||||
;< ~ bind:m
|
||||
%+ poke-our %graph-store
|
||||
:- %graph-update-1
|
||||
!> ^- update:graph
|
||||
[now.bowl [%archive-graph resource.u.u.feed.config.metadatum]]
|
||||
(pure:m !>(~))
|
||||
(pure:m !>(~))
|
||||
|
@ -11,6 +11,9 @@ import { FormSubmit } from "~/views/components/FormSubmit";
|
||||
import { StatelessAsyncToggle } from "~/views/components/StatelessAsyncToggle";
|
||||
import useMetadataState from "~/logic/state/metadata";
|
||||
|
||||
import useMetadataState from '~/logic/state/metadata';
|
||||
|
||||
|
||||
interface FormSchema {
|
||||
permissions: PermVariation;
|
||||
}
|
||||
@ -21,18 +24,22 @@ export function GroupFeedSettings(props: {
|
||||
api: GlobalApi;
|
||||
}) {
|
||||
const { association, group, api } = props;
|
||||
const isEnabled = !!association?.metadata?.config?.group;
|
||||
const resource = resourceFromPath(association.group);
|
||||
const feedResource = association?.metadata.config?.group?.resource;
|
||||
const feedAssoc = useMetadataState(s => s.associations.graph[feedResource]);
|
||||
const toggleFeed = async () => {
|
||||
const isEnabled = !!feedResource;
|
||||
|
||||
const associations = useMetadataState(state => state.associations);
|
||||
const feedMetadata = associations?.graph[feedResource];
|
||||
|
||||
const vip = feedAssoc?.metadata?.vip || " ";
|
||||
const toggleFeed = async (actions: any) => {
|
||||
if (isEnabled) {
|
||||
await api.graph.disableGroupFeed(resource);
|
||||
} else {
|
||||
await api.graph.enableGroupFeed(resource);
|
||||
await api.graph.enableGroupFeed(resource, vip.trim());
|
||||
}
|
||||
};
|
||||
const vip = feedAssoc?.metadata?.vip || " ";
|
||||
const initialValues: FormSchema = {
|
||||
permissions: vip
|
||||
};
|
||||
@ -62,7 +69,7 @@ export function GroupFeedSettings(props: {
|
||||
</Label>
|
||||
</Col>
|
||||
</BaseLabel>
|
||||
{isEnabled && (
|
||||
{isEnabled && false && (
|
||||
<>
|
||||
<GroupFeedPermsInput id="permissions" />
|
||||
<FormSubmit start>Update Permissions</FormSubmit>
|
||||
|
@ -15,7 +15,7 @@ export function GroupFeedHeader(props) {
|
||||
historyLocation === `${baseUrl}/feed`;
|
||||
|
||||
const locationUrl =
|
||||
history.location.pathname.replace(`${baseUrl}`, '').replace(/^\/[a-z|\/]*/, '');
|
||||
history.location.pathname.replace(`${baseUrl}`, '');
|
||||
let nodeIndex = locationUrl.split('/').slice(1).map((ind) => {
|
||||
return bigInt(ind);
|
||||
});
|
||||
@ -54,11 +54,12 @@ export function GroupFeedHeader(props) {
|
||||
borderBottom={1}
|
||||
borderColor="lightGray">
|
||||
<Box display='block'>
|
||||
{ ( baseUrl !== historyLocation &&
|
||||
`${baseUrl}/feed` !== historyLocation
|
||||
) ? (
|
||||
{ ( baseUrl !== historyLocation ) ? (
|
||||
<Text pl="1" pr="1" cursor="pointer" onClick={() => {
|
||||
history.goBack();
|
||||
let loc = locationUrl.split('/');
|
||||
loc.pop();
|
||||
loc = loc.join('/');
|
||||
history.push(`${baseUrl}${loc}`);
|
||||
}}>{'<- Back'}</Text>
|
||||
) : null
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user