mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
081a126c01
@ -10,6 +10,7 @@ export const labels = defineMessages({
|
||||
leave: { id: 'label.leave', defaultMessage: 'Leave' },
|
||||
users: { id: 'label.users', defaultMessage: 'Users' },
|
||||
createUser: { id: 'label.create-user', defaultMessage: 'Create user' },
|
||||
deleteUser: { id: 'label.delete-users', defaultMessage: 'Delete user' },
|
||||
username: { id: 'label.username', defaultMessage: 'Username' },
|
||||
password: { id: 'label.password', defaultMessage: 'Password' },
|
||||
role: { id: 'label.role', defaultMessage: 'Role' },
|
||||
|
@ -19,7 +19,7 @@ export default function TeamDeleteForm({ teamId, teamName, onSave, onClose }) {
|
||||
return (
|
||||
<Form onSubmit={handleSubmit} error={error}>
|
||||
<p>
|
||||
<FormattedMessage {...messages.confirmDelete} values={{ name: <b>{teamName}</b> }} />
|
||||
<FormattedMessage {...messages.confirmDelete} values={{ target: <b>{teamName}</b> }} />
|
||||
</p>
|
||||
<FormButtons flex>
|
||||
<SubmitButton variant="danger" disabled={isLoading}>
|
||||
|
@ -52,7 +52,7 @@ export default function UsersTable({ data = [], onDelete }) {
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.delete)}</Text>
|
||||
</Button>
|
||||
<Modal>
|
||||
<Modal title={formatMessage(labels.deleteUser)}>
|
||||
{close => (
|
||||
<UserDeleteForm
|
||||
userId={row.id}
|
||||
|
@ -13,7 +13,7 @@ import useMessages from 'hooks/useMessages';
|
||||
const CONFIRM_VALUE = 'DELETE';
|
||||
|
||||
export default function WebsiteDeleteForm({ websiteId, onSave, onClose }) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { formatMessage, labels, messages, FormattedMessage } = useMessages();
|
||||
const { del, useMutation } = useApi();
|
||||
const { mutate, error } = useMutation(data => del(`/websites/${websiteId}`, data));
|
||||
|
||||
@ -28,7 +28,12 @@ export default function WebsiteDeleteForm({ websiteId, onSave, onClose }) {
|
||||
|
||||
return (
|
||||
<Form onSubmit={handleSubmit} error={error}>
|
||||
<p>{formatMessage(messages.deleteWebsite, { confirmation: CONFIRM_VALUE })}</p>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
{...messages.deleteWebsite}
|
||||
values={{ confirmation: <b>{CONFIRM_VALUE}</b> }}
|
||||
/>
|
||||
</p>
|
||||
<FormRow label={formatMessage(labels.confirm)}>
|
||||
<FormInput name="confirmation" rules={{ validate: value => value === CONFIRM_VALUE }}>
|
||||
<TextField autoComplete="off" />
|
||||
|
@ -113,7 +113,7 @@
|
||||
"message.confirm-delete": "Are you sure you want to delete {target}?",
|
||||
"message.confirm-leave": "Are you sure you want to leave {target}?",
|
||||
"message.confirm-reset": "Are you sure you want to reset {target}'s statistics?",
|
||||
"message.delete-website": "Delete website",
|
||||
"message.delete-website": "To delete this website, type {confirmation} in the box below to confirm.",
|
||||
"message.delete-website-warning": "All associated data will be deleted as well.",
|
||||
"message.error": "Something went wrong.",
|
||||
"message.event-log": "{event} on {url}",
|
||||
|
@ -758,7 +758,15 @@
|
||||
"message.delete-website": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Delete website"
|
||||
"value": "To delete this website, type "
|
||||
},
|
||||
{
|
||||
"type": 1,
|
||||
"value": "confirmation"
|
||||
},
|
||||
{
|
||||
"type": 0,
|
||||
"value": " in the box below to confirm."
|
||||
}
|
||||
],
|
||||
"message.delete-website-warning": [
|
||||
|
Loading…
Reference in New Issue
Block a user