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 (!textToCopy) return;
if (navigator.clipboard && window.isSecureContext) { if (navigator.clipboard && window.isSecureContext) {
console.log('fallback');
navigator.clipboard navigator.clipboard
.writeText(textToCopy) .writeText(textToCopy)
.then(() => { .then(() => {
const notyf = new Notyf({ const notyf = new Notyf({
duration: 1000, duration: 4000,
ripple: false, ripple: false,
dismissible: true, dismissible: true,
types: [ types: [
@ -53,7 +51,9 @@ function handleCiteButton(): void {
y: 'top', 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) => { .catch((err) => {
console.error('Failed to copy text: ', err); console.error('Failed to copy text: ', err);