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",
},