* wip: add crud for services and integrations * feat: remove services * feat: move integration definitions to homarr/definitions, add temporary test connection solution without actual request * feat: add integration count badge * feat: add translation for integrations * feat: add notifications and translate them * feat: add notice to integration forms about test connection * chore: fix ci check issues * feat: add confirm modals for integration deletion and secret card cancellation, change ordering for list page, add name property to integrations * refactor: move revalidate path action * chore: fix ci check issues * chore: install missing dependencies * chore: fix ci check issues * chore: address pull request feedback
21 lines
584 B
TypeScript
21 lines
584 B
TypeScript
import type { NotificationData } from "@mantine/notifications";
|
|
import { notifications } from "@mantine/notifications";
|
|
|
|
import { IconCheck, IconX } from "@homarr/ui";
|
|
|
|
type CommonNotificationProps = Pick<NotificationData, "title" | "message">;
|
|
|
|
export const showSuccessNotification = (props: CommonNotificationProps) =>
|
|
notifications.show({
|
|
...props,
|
|
color: "teal",
|
|
icon: <IconCheck size={20} />,
|
|
});
|
|
|
|
export const showErrorNotification = (props: CommonNotificationProps) =>
|
|
notifications.show({
|
|
...props,
|
|
color: "red",
|
|
icon: <IconX size={20} />,
|
|
});
|