feat(ui/fluxtask): offer simplified copy message

pull/5767/head
Pavel Zavora 2021-06-12 23:46:17 +02:00
parent 2b1c12d857
commit b4f5cb7b50
1 changed files with 8 additions and 4 deletions

View File

@ -833,20 +833,24 @@ export const validateSuccess = (): Notification => ({
})
export const notifyCopyToClipboardSuccess = (
text: string,
text: string | null,
title: string = ''
): Notification => ({
...defaultSuccessNotification,
icon: 'dash-h',
message: `${title}'${text}' has been copied to clipboard.`,
message: `${title}${
text === null ? '' : "'" + text + "'"
} has been copied to clipboard.`,
})
export const notifyCopyToClipboardFailed = (
text: string,
text: string | null,
title: string = ''
): Notification => ({
...defaultErrorNotification,
message: `${title}'${text}' was not copied to clipboard.`,
message: `${title}${
text === null ? '' : "'" + text + "'"
} was not copied to clipboard.`,
})
export const notifyFluxNameAlreadyTaken = (fluxName: string): Notification => ({