STYLE Finetuning notyf toast style for cite button
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nonimart 2025-06-20 15:19:32 +02:00
parent 48379f8c5a
commit 0b1bdf39c3

View File

@ -30,13 +30,11 @@ function handleCiteButton(): void {
if (!textToCopy) return;
if (navigator.clipboard && window.isSecureContext) {
console.log('fallback');
navigator.clipboard
.writeText(textToCopy)
.then(() => {
const notyf = new Notyf({
duration: 1000,
duration: 4000,
ripple: false,
dismissible: true,
types: [
@ -53,7 +51,9 @@ function handleCiteButton(): void {
y: 'top',
},
});
notyf.success('Citation copiée !');
notyf.success(
'Citation copiée dans le presse-papiers ! <br> Vous pouvez maintenant la coller dans votre document.'
);
})
.catch((err) => {
console.error('Failed to copy text: ', err);