mirror of
https://github.com/outline/outline.git
synced 2026-11-25 15:15:15 +03:00
fix: Share panel state for drafts in shared parent (#11320)
This commit is contained in:
1 parent
7e3f71d67e
commit
08fb38148e
3 files changed
+27
-26
No files matched your search
@@ -119,7 +119,27 @@ export const AccessControlList = observer(
|
||||
maxHeight: maxHeight ? maxHeight - publicAccessHeight : undefined,
|
||||
}}
|
||||
>
|
||||
{collection && canCollection.readDocument ? (
|
||||
{document.isDraft ? (
|
||||
<>
|
||||
<ListItem
|
||||
image={<Avatar model={document.createdBy} />}
|
||||
title={document.createdBy?.name}
|
||||
actions={
|
||||
<AccessTooltip content={t("Created the document")}>
|
||||
{t("Can edit")}
|
||||
</AccessTooltip>
|
||||
}
|
||||
/>
|
||||
{showLoading ? (
|
||||
<Placeholder />
|
||||
) : (
|
||||
<DocumentMemberList
|
||||
document={document}
|
||||
invitedInSession={invitedInSession}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
) : collection && canCollection.readDocument ? (
|
||||
<>
|
||||
{collection.permission ? (
|
||||
<ListItem
|
||||
@@ -162,26 +182,6 @@ export const AccessControlList = observer(
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
) : document.isDraft ? (
|
||||
<>
|
||||
<ListItem
|
||||
image={<Avatar model={document.createdBy} />}
|
||||
title={document.createdBy?.name}
|
||||
actions={
|
||||
<AccessTooltip content={t("Created the document")}>
|
||||
{t("Can edit")}
|
||||
</AccessTooltip>
|
||||
}
|
||||
/>
|
||||
{showLoading ? (
|
||||
<Placeholder />
|
||||
) : (
|
||||
<DocumentMemberList
|
||||
document={document}
|
||||
invitedInSession={invitedInSession}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{showLoading ? (
|
||||
|
||||
@@ -144,9 +144,10 @@ function PublicAccess(
|
||||
toast.success(t("Public link copied to clipboard"));
|
||||
}, [t]);
|
||||
|
||||
const shareUrl = sharedParent?.url
|
||||
? `${sharedParent.url}${document.url}`
|
||||
: (share?.url ?? "");
|
||||
const shareUrl =
|
||||
sharedParent?.url && !document.isDraft
|
||||
? `${sharedParent.url}${document.url}`
|
||||
: (share?.url ?? "");
|
||||
|
||||
const copyButton = (
|
||||
<Tooltip content={t("Copy public link")} placement="top">
|
||||
@@ -290,7 +291,7 @@ function PublicAccess(
|
||||
</>
|
||||
)}
|
||||
|
||||
{sharedParent?.published ? (
|
||||
{sharedParent?.published && !document.isDraft ? (
|
||||
<ShareLinkInput type="text" disabled defaultValue={shareUrl}>
|
||||
{copyButton}
|
||||
</ShareLinkInput>
|
||||
|
||||
@@ -436,10 +436,10 @@
|
||||
"Editor": "Editor",
|
||||
"Suggestions for invitation": "Suggestions for invitation",
|
||||
"No matches": "No matches",
|
||||
"Created the document": "Created the document",
|
||||
"Can view": "Can view",
|
||||
"Everyone in the collection": "Everyone in the collection",
|
||||
"You have full access": "You have full access",
|
||||
"Created the document": "Created the document",
|
||||
"Other people": "Other people",
|
||||
"Other workspace members may have access": "Other workspace members may have access",
|
||||
"This document may be shared with more workspace members through a parent document or collection you do not have access to": "This document may be shared with more workspace members through a parent document or collection you do not have access to",
|
||||
|
||||
Reference in new issue
Block a user