fix: Consistency of member/editor language
fix: 'Delete' option on collection menu should show as dangerous
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
@@ -93,7 +93,7 @@ const MemberListItem = ({
|
||||
) : user.email ? (
|
||||
user.email
|
||||
) : (
|
||||
t("Member")
|
||||
t("Editor")
|
||||
)
|
||||
}
|
||||
actions={
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user