From 0b1bdf39c3710a85af4bf1fa42b04f3154e7bc65 Mon Sep 17 00:00:00 2001 From: Nonimart Date: Fri, 20 Jun 2025 15:19:32 +0200 Subject: [PATCH] STYLE Finetuning notyf toast style for cite button --- resources/js/singles.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/js/singles.ts b/resources/js/singles.ts index e5250c2..ab7a338 100644 --- a/resources/js/singles.ts +++ b/resources/js/singles.ts @@ -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 !
Vous pouvez maintenant la coller dans votre document.' + ); }) .catch((err) => { console.error('Failed to copy text: ', err);