Show error when navigator.clipboard is not available.

There can be multiple reasons for this, e.g. it is not supported by the
browser or the browser does not provide this feature because there is no
secure context (HTTP).

Closes #231.
This commit is contained in:
Orne Brocaar 2024-03-19 14:12:03 +00:00
parent 5a865c924c
commit 8cde912fdf
3 changed files with 18 additions and 0 deletions

View File

@ -96,6 +96,12 @@ function AesKeyInput(props: IProps) {
duration: 3, duration: 3,
}); });
}); });
} else {
notification.error({
message: "Error",
description: "Clipboard functionality is not available.",
duration: 3,
});
} }
}; };

View File

@ -99,6 +99,12 @@ function DevAddrInput(props: IProps) {
duration: 3, duration: 3,
}); });
}); });
} else {
notification.error({
message: "Error",
description: "Clipboard functionality is not available.",
duration: 3,
});
} }
}; };

View File

@ -96,6 +96,12 @@ function EuiInput(props: IProps) {
duration: 3, duration: 3,
}); });
}); });
} else {
notification.error({
message: "Error",
description: "Clipboard functionality is not available.",
duration: 3,
});
} }
}; };