fix: Consistency of member/editor language

fix: 'Delete' option on collection menu should show as dangerous
This commit is contained in:
Tom Moor
2024-01-31 20:55:37 -05:00
parent 0f125886b7
commit 8e3cec01f8
5 changed files with 18 additions and 16 deletions

View File

@@ -161,9 +161,10 @@ export const unstarCollection = createAction({
});
export const deleteCollection = createAction({
name: ({ t }) => t("Delete"),
name: ({ t }) => `${t("Delete")}`,
analyticsName: "Delete collection",
section: CollectionSection,
dangerous: true,
icon: <TrashIcon />,
visible: ({ activeCollectionId, stores }) => {
if (!activeCollectionId) {

View File

@@ -51,17 +51,19 @@ const ConfirmationDialog: React.FC<Props> = ({
return (
<form onSubmit={handleSubmit}>
<Text type="secondary">{children}</Text>
<Flex gap={12} column>
<Text type="secondary">{children}</Text>
<Flex justify="flex-end">
<Button
type="submit"
disabled={isSaving || disabled}
danger={danger}
autoFocus
>
{isSaving && savingText ? savingText : submitText ?? t("Confirm")}
</Button>
<Flex justify="flex-end">
<Button
type="submit"
disabled={isSaving || disabled}
danger={danger}
autoFocus
>
{isSaving && savingText ? savingText : submitText ?? t("Confirm")}
</Button>
</Flex>
</Flex>
</form>
);

View File

@@ -93,7 +93,7 @@ const MemberListItem = ({
) : user.email ? (
user.email
) : (
t("Member")
t("Editor")
)
}
actions={

View File

@@ -56,7 +56,7 @@ function UserMenu({ user }: Props) {
(ev: React.SyntheticEvent) => {
ev.preventDefault();
dialogs.openModal({
title: t("Change role to member"),
title: t("Change role to editor"),
isCentered: true,
content: (
<UserChangeToMemberDialog
@@ -155,7 +155,7 @@ function UserMenu({ user }: Props) {
items={[
{
type: "button",
title: `${t("Change role to member")}`,
title: `${t("Change role to editor")}`,
onClick: handleMember,
visible: can.demote && user.role !== "member",
},

View File

@@ -248,7 +248,6 @@
"Has access through <2>parent</2>": "Has access through <2>parent</2>",
"Suspended": "Suspended",
"Invited": "Invited",
"Member": "Member",
"Leave": "Leave",
"Only lowercase letters, digits and dashes allowed": "Only lowercase letters, digits and dashes allowed",
"Sorry, this link has already been used": "Sorry, this link has already been used",
@@ -443,7 +442,7 @@
"Headings you add to the document will appear here": "Headings you add to the document will appear here",
"Table of contents": "Table of contents",
"Change role to admin": "Change role to admin",
"Change role to member": "Change role to member",
"Change role to editor": "Change role to editor",
"Change role to viewer": "Change role to viewer",
"Change name": "Change name",
"Suspend user": "Suspend user",