Skip to content

Commit a0ba144

Browse files
committed
Don't allow collection closing if not in collection.
Remove unbreaking string in empty collection
1 parent 95c1c64 commit a0ba144

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pelicanplatform/components",
3-
"version": "1.0.18",
3+
"version": "1.0.19",
44
"homepage": "https://pelicanplatform.org",
55
"repository": {
66
"type": "git",

packages/components/src/AuthenticatedClient/AuthenticatedClient.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ function AuthenticatedClient() {
143143
<Badge invisible={!highlightCollections} badgeContent={collections.length} color={'primary'}>
144144
<IconButton
145145
onClick={() => {
146-
setShowCollections((x) => !x)
146+
// Check that the current object url starts in a collection
147+
if(collections.some(c => objectUrl.startsWith(`pelican://${federation?.hostname}${namespace?.prefix}${c.href}`))) {
148+
setShowCollections((x) => !x)
149+
}
147150
}}
148151
disabled={!authorized}
149152
>

packages/components/src/ObjectView/ObjectView.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ function ObjectView({
134134
<Typography>
135135
You can upload files here or navigate to your collections using the menu in the top right.
136136
</Typography>
137-
<br />
138-
<strong>pelican://&lt;federation&gt;/&lt;namespace&gt;/&lt;collection&gt;/</strong>
139137
</>
140138
)}
141139
</Typography>

0 commit comments

Comments
 (0)