diff --git a/pkg/arvo/app/btc-wallet/index.html b/pkg/arvo/app/btc-wallet/index.html index 49ffd4843d..cbcf88f553 100644 --- a/pkg/arvo/app/btc-wallet/index.html +++ b/pkg/arvo/app/btc-wallet/index.html @@ -26,6 +26,6 @@
- + diff --git a/pkg/arvo/app/glob.hoon b/pkg/arvo/app/glob.hoon index 789e870c04..05c359f707 100644 --- a/pkg/arvo/app/glob.hoon +++ b/pkg/arvo/app/glob.hoon @@ -5,8 +5,8 @@ /- glob, *resource /+ default-agent, verb, dbug |% -++ landscape-hash 0vrbiqe.v6al2.0b4jc.u9vp7.k1e0i -++ btc-wallet-hash 0v7.v4dng.o33qi.kc497.5jc02.ke5es +++ landscape-hash 0v4.56ejl.qq4js.h1i0m.t3e94.bg6qr +++ btc-wallet-hash 0v2.ifoe4.fbv35.aigir.66su4.fbspu +$ state-0 [%0 hash=@uv glob=(unit (each glob:glob tid=@ta))] +$ state-1 [%1 =globs:glob] +$ all-states diff --git a/pkg/arvo/app/landscape/index.html b/pkg/arvo/app/landscape/index.html index 3f6453ba36..1bc480592c 100644 --- a/pkg/arvo/app/landscape/index.html +++ b/pkg/arvo/app/landscape/index.html @@ -24,6 +24,6 @@
- + diff --git a/pkg/arvo/app/lens.hoon b/pkg/arvo/app/lens.hoon index ed9c93328f..74734f42ee 100644 --- a/pkg/arvo/app/lens.hoon +++ b/pkg/arvo/app/lens.hoon @@ -25,8 +25,6 @@ ^- (list @tas) :~ %group-store %metadata-store - %contact-store - %contact-hook %invite-store %graph-store == diff --git a/pkg/btc-wallet/README.md b/pkg/btc-wallet/README.md index bc1e3f3b6f..afbb32799e 100644 --- a/pkg/btc-wallet/README.md +++ b/pkg/btc-wallet/README.md @@ -5,4 +5,4 @@ dojo: it should return with the following hash: -`0v7.v4dng.o33qi.kc497.5jc02.ke5es` +`0v2.ifoe4.fbv35.aigir.66su4.fbspu` diff --git a/pkg/interface/src/logic/reducers/group-update.ts b/pkg/interface/src/logic/reducers/group-update.ts index a008b64c62..798ec3d2d4 100644 --- a/pkg/interface/src/logic/reducers/group-update.ts +++ b/pkg/interface/src/logic/reducers/group-update.ts @@ -103,6 +103,9 @@ const addMembers = (json: GroupUpdate, state: GroupState): GroupState => { if ('addMembers' in json) { const { resource, ships } = json.addMembers; const resourcePath = resourceAsPath(resource); + if(!(resourcePath in state.groups)) { + return; + } for (const member of ships) { state.groups[resourcePath].members.add(member); if ( diff --git a/pkg/interface/src/views/apps/chat/components/ChatEditor.tsx b/pkg/interface/src/views/apps/chat/components/ChatEditor.tsx index 7f3e4a4c1a..1149735ae1 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatEditor.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatEditor.tsx @@ -177,9 +177,6 @@ const ChatEditor = React.forwardRef(({ inCodeMo }, [inCodeMode, placeholder]); function messageChange(editor, data, value) { - if(value.endsWith('/')) { - editor.showHint(['test', 'foo']); - } if (message !== '' && value == '') { setMessage(value); } diff --git a/pkg/interface/src/views/apps/chat/components/ChatWindow.tsx b/pkg/interface/src/views/apps/chat/components/ChatWindow.tsx index 8a5180eb71..5b10257ef7 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatWindow.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatWindow.tsx @@ -138,7 +138,8 @@ class ChatWindow extends Component< } if(this.unreadSet && this.dismissedInitialUnread() && - this.virtualList!.startOffset() < 5) { + this.virtualList!.startOffset() < 5 && + document.hasFocus()) { this.props.dismissUnread(); } } diff --git a/pkg/interface/src/views/apps/permalinks/app.tsx b/pkg/interface/src/views/apps/permalinks/app.tsx index 8e8d22f04a..30763b6545 100644 --- a/pkg/interface/src/views/apps/permalinks/app.tsx +++ b/pkg/interface/src/views/apps/permalinks/app.tsx @@ -77,7 +77,7 @@ function GroupRoutes(props: { group: string; url: string }) { return null; } if(!graphKeys.has(`${ship.slice(1)}/${name}`)) { - if(graphKeys.size > 0) { + if(graphKeys.size > 1) { // TODO: Better loading logic see https://github.com/urbit/landscape/issues/1063 return { - e.stopPropagation(); - history.push(`/perma${permalink.slice(16)}`); - }; - const [nodeGroupHost, nodeGroupName] = association?.group.split('/').slice(-2) ?? ['Unknown', 'Unknown']; const [nodeChannelHost, nodeChannelName] = association?.resource .split('/') @@ -141,15 +135,16 @@ function GraphPermalink( return ( { - navigate(e); + e.stopPropagation(); }} > {loading && association && !errored && Placeholder((association.metadata.config as GraphConfig).graph)} @@ -167,7 +162,6 @@ function GraphPermalink( showTransclusion={showTransclusion} icon={getModuleIcon((association.metadata.config as GraphConfig).graph as GraphModule)} title={association.metadata.title} - permalink={permalink} /> )} {association && isInSameResource && transcluded === 2 && !loading && ( @@ -176,7 +170,6 @@ function GraphPermalink( showTransclusion={showTransclusion} icon={getModuleIcon((association.metadata.config as GraphConfig).graph as GraphModule)} title={association.metadata.title} - permalink={permalink} /> )} {isInSameResource && transcluded !== 2 && !loading && } @@ -185,7 +178,6 @@ function GraphPermalink( icon="Groups" showDetails={false} title={graph.slice(5)} - permalink={permalink} /> )} @@ -195,7 +187,6 @@ function GraphPermalink( function PermalinkDetails(props: { title: string; icon: any; - permalink: string; showTransclusion?: boolean; showDetails?: boolean; known?: boolean; diff --git a/pkg/interface/src/views/components/CommentItem.tsx b/pkg/interface/src/views/components/CommentItem.tsx index 1b3488a853..6b3fd0042b 100644 --- a/pkg/interface/src/views/components/CommentItem.tsx +++ b/pkg/interface/src/views/components/CommentItem.tsx @@ -110,50 +110,52 @@ return false; group={group} isRelativeTime > - - - - {copyDisplay} - - {(window.ship == post?.author && !disabled) ? ( - - Update - - ) : null} - {(window.ship == post?.author || ourRole == 'admin') && - !disabled ? ( - - Delete + {!post.pending && + + + + {copyDisplay} - ) : null} - - } - > - - - + {(window.ship == post?.author && !disabled) ? ( + + Update + + ) : null} + {(window.ship == post?.author || ourRole == 'admin') && + !disabled ? ( + + Delete + + ) : null} + + } + > + + + + } -): ReactElement { - const { resource, ...rest } = props; +type GroupLinkProps = { + resource: string; + detailed?: boolean; +} & PropFunc + +export function GroupLink({ + resource, + borderColor, + ...rest +}: GroupLinkProps): ReactElement { const name = resource.slice(6); const joined = useMetadataState( useCallback(s => resource in s.associations.groups, [resource]) ); - const history = useHistory(); const { modal, showModal } = useModal({ modal: - }); + }); const { preview } = usePreview(resource); return ( - { - e.stopPropagation(); - }} - backgroundColor='white' - borderColor={props.borderColor} - > + <> {modal} ) => { + e.stopPropagation(); + + if (e.metaKey || e.ctrlKey) { + return; + } + + e.preventDefault(); + showModal(); + }} flexShrink={1} alignItems="center" + width="100%" + maxWidth="500px" py={2} pr={2} - onClick={ - joined ? () => history.push(`/~landscape/ship/${name}`) : showModal - } + cursor='pointer' + backgroundColor='white' + borderColor={borderColor} opacity={preview ? '1' : '0.6'} > - + {preview ? preview.metadata.title : name} @@ -70,6 +77,6 @@ export function GroupLink( - + ); } diff --git a/pkg/interface/src/views/components/StatusBar.tsx b/pkg/interface/src/views/components/StatusBar.tsx index 03bb009a61..ad72ff0c66 100644 --- a/pkg/interface/src/views/components/StatusBar.tsx +++ b/pkg/interface/src/views/components/StatusBar.tsx @@ -8,7 +8,7 @@ import { Text } from '@tlon/indigo-react'; import React, { useRef } from 'react'; -import { useHistory } from 'react-router-dom'; +import { Link, useHistory } from 'react-router-dom'; import { Sigil } from '~/logic/lib/sigil'; import { uxToHex } from '~/logic/lib/util'; import useContactState from '~/logic/state/contact'; @@ -75,11 +75,12 @@ const StatusBar = (props) => { >