mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-19 06:28:52 +03:00
Merge branch 'next/groups'
This commit is contained in:
commit
ce75499ae5
@ -7,7 +7,6 @@
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no,maximum-scale=1"/>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-touch-fullscreen" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
||||
<link rel="manifest"
|
||||
href='data:application/manifest+json,{
|
||||
"name": "Groups",
|
||||
@ -16,6 +15,9 @@
|
||||
"display": "standalone",
|
||||
"background_color": "%23FFFFFF",
|
||||
"theme_color": "%23000000"}' />
|
||||
<meta name="theme-color" content="#FFFFFF" media="(prefers-color-scheme: light)">
|
||||
<meta name="theme-color" content="#1A1A1A" media="(prefers-color-scheme: dark)">
|
||||
<meta name="theme-color" content="#FFFFFF">
|
||||
<script src="/apps/landscape/desk.js"></script>
|
||||
<script src="/session.js"></script>
|
||||
</head>
|
||||
|
@ -143,6 +143,8 @@ function PendingGroup(props: PendingGroupProps) {
|
||||
<Box>
|
||||
{!joining ? (
|
||||
<Text color="blue">Invited</Text>
|
||||
) : joining === 'no-perms' || joining == 'strange' ? (
|
||||
<Text color="red">Join Failed</Text>
|
||||
) : joining !== "done" ? (
|
||||
<Text gray>Joining...</Text>
|
||||
) : (
|
||||
|
@ -150,8 +150,9 @@ function JoinError(props: {
|
||||
desc: JoinDesc;
|
||||
request: JoinRequest;
|
||||
modal: boolean;
|
||||
dismiss: () => void;
|
||||
}) {
|
||||
const { desc, request, modal } = props;
|
||||
const { dismiss, desc, request, modal } = props;
|
||||
const { preview } = usePreview(desc.group);
|
||||
const group = preview?.metadata?.title ?? desc.group;
|
||||
const title = `Joining ${group} failed`;
|
||||
@ -160,12 +161,27 @@ function JoinError(props: {
|
||||
? 'You do not have the correct permissions'
|
||||
: 'An unexpected error occurred';
|
||||
|
||||
const onRetry = () => {
|
||||
useGroupState.getState().abortJoin(desc.group);
|
||||
const [,,ship,name] = group.split('/');
|
||||
airlock.poke(
|
||||
join(ship, name, desc.kind, false, false)
|
||||
);
|
||||
};
|
||||
|
||||
const onAbort = () => {
|
||||
useGroupState.getState().abortJoin(desc.group);
|
||||
dismiss();
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<JoinSkeleton modal={modal} title={title} desc={desc}>
|
||||
<Col p='4' gapY='4'>
|
||||
<Text fontWeight='medium'>{explanation}</Text>
|
||||
<Row>
|
||||
<Button>Dismiss</Button>
|
||||
<Row gapX="2">
|
||||
<Button onClick={onRetry} primary>Retry</Button>
|
||||
<Button onClick={onAbort} destructive>Abort</Button>
|
||||
</Row>
|
||||
</Col>
|
||||
</JoinSkeleton>
|
||||
@ -233,7 +249,7 @@ export function Join(props: JoinProps) {
|
||||
finished={finishedPath}
|
||||
/>
|
||||
) : isErrored ? (
|
||||
<JoinError modal={modal} desc={desc} request={openedRequest} />
|
||||
<JoinError dismiss={dismiss} modal={modal} desc={desc} request={openedRequest} />
|
||||
) : (
|
||||
<JoinInitial modal={modal} dismiss={dismiss} desc={desc} invite={invite} />
|
||||
);
|
||||
|
@ -300,7 +300,9 @@
|
||||
%start start
|
||||
%added added
|
||||
%metadata metadata
|
||||
?(%no-perms %strange %abort) error
|
||||
==
|
||||
++ error jn-core
|
||||
++ start jn-core
|
||||
++ added (emit del-us:pass)
|
||||
++ metadata (emit:added remove-pull-groups:pass)
|
||||
|
@ -22,6 +22,7 @@
|
||||
[%4 observers=(map serial observer:sur)]
|
||||
[%5 observers=(map serial observer:sur) warm-cache=_|]
|
||||
[%6 state-0]
|
||||
[%7 state-0]
|
||||
==
|
||||
::
|
||||
+$ serial @uv
|
||||
@ -35,7 +36,7 @@
|
||||
--
|
||||
::
|
||||
%- agent:dbug
|
||||
=| [%6 state-0]
|
||||
=| [%7 state-0]
|
||||
=* state -
|
||||
::
|
||||
^- agent:gall
|
||||
@ -117,8 +118,10 @@
|
||||
=| cards=(list card)
|
||||
|-
|
||||
?- -.old-state
|
||||
%6
|
||||
%7
|
||||
[cards this(state old-state)]
|
||||
%6
|
||||
$(-.old-state %7, cards :_(cards (act %warm-cache-all ~)))
|
||||
::
|
||||
%5
|
||||
=. cards
|
||||
|
@ -1,10 +1,10 @@
|
||||
:~ title+'Groups'
|
||||
info+'A suite of applications to communicate on Urbit'
|
||||
color+0xee.5432
|
||||
glob-http+['https://bootstrap.urbit.org/glob-0v2.2tc97.h3e0k.7b26d.a0ma8.em5ce.glob' 0v2.2tc97.h3e0k.7b26d.a0ma8.em5ce]
|
||||
glob-http+['https://bootstrap.urbit.org/glob-0v7.gib8r.r1bb5.a1e66.894c5.8ibm0.glob' 0v7.gib8r.r1bb5.a1e66.894c5.8ibm0]
|
||||
|
||||
base+'landscape'
|
||||
version+[1 0 6]
|
||||
version+[1 0 7]
|
||||
website+'https://tlon.io'
|
||||
license+'MIT'
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user