mirror of
https://github.com/outline/outline.git
synced 2026-12-04 10:24:43 +03:00
fix: Popover states collection members have access to drafts
This commit is contained in:
1 parent
812270deed
commit
d38cc5db68
3 files changed
+6
-11
No files matched your search
@@ -131,7 +131,7 @@ function DocumentMembersList({ document, children }: Props) {
|
||||
permission,
|
||||
});
|
||||
toast.success(
|
||||
t(`{{ userName }} permissions were updated`, {
|
||||
t(`Permissions for {{ userName }} updated`, {
|
||||
userName: user.name,
|
||||
})
|
||||
);
|
||||
@@ -176,7 +176,7 @@ function DocumentMembersList({ document, children }: Props) {
|
||||
value={query}
|
||||
onChangeInput={handleQuery}
|
||||
onSelectOption={handleSelect}
|
||||
listLabel={t("Team members")}
|
||||
listLabel={t("Workspace members")}
|
||||
placeholder={`${t("Find by name")}…`}
|
||||
autoFocus
|
||||
/>
|
||||
|
||||
@@ -39,15 +39,9 @@ function SharePopover({
|
||||
}: Props) {
|
||||
const team = useCurrentTeam();
|
||||
const { t } = useTranslation();
|
||||
const [expandedOptions, setExpandedOptions] = React.useState(false);
|
||||
const buttonRef = React.useRef<HTMLButtonElement>(null);
|
||||
const collection = document.collection;
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!visible && expandedOptions) {
|
||||
setExpandedOptions(false);
|
||||
}
|
||||
}, [visible]); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
useKeyDown("Escape", onRequestClose);
|
||||
|
||||
React.useEffect(() => {
|
||||
@@ -75,7 +69,7 @@ function SharePopover({
|
||||
border={false}
|
||||
small
|
||||
/>
|
||||
) : collection ? (
|
||||
) : collection && !document.isDraft ? (
|
||||
<Item
|
||||
image={<CollectionIcon collection={collection} />}
|
||||
title={t("Collection members")}
|
||||
|
||||
@@ -243,9 +243,9 @@
|
||||
"No results for {{query}}": "No results for {{query}}",
|
||||
"{{ userName }} was removed from the document": "{{ userName }} was removed from the document",
|
||||
"Could not remove user": "Could not remove user",
|
||||
"{{ userName }} permissions were updated": "{{ userName }} permissions were updated",
|
||||
"Permissions for {{ userName }} updated": "Permissions for {{ userName }} updated",
|
||||
"Could not update user": "Could not update user",
|
||||
"Team members": "Team members",
|
||||
"Workspace members": "Workspace members",
|
||||
"Find by name": "Find by name",
|
||||
"Share link copied": "Share link copied",
|
||||
"Only lowercase letters, digits and dashes allowed": "Only lowercase letters, digits and dashes allowed",
|
||||
@@ -500,6 +500,7 @@
|
||||
"Never signed in": "Never signed in",
|
||||
"Invited": "Invited",
|
||||
"{{ userName }} was removed from the collection": "{{ userName }} was removed from the collection",
|
||||
"{{ userName }} permissions were updated": "{{ userName }} permissions were updated",
|
||||
"The {{ groupName }} group was removed from the collection": "The {{ groupName }} group was removed from the collection",
|
||||
"Could not remove group": "Could not remove group",
|
||||
"{{ groupName }} permissions were updated": "{{ groupName }} permissions were updated",
|
||||
|
||||
Reference in new issue
Block a user