WebClient shares: improve feedback after link copy

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2023-12-26 09:23:43 +01:00
parent a9341d7c0f
commit a65e7782de
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -462,8 +462,12 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
clipboard.on('success', function (e) {
e.trigger.querySelectorAll('span').forEach(spanEl => {
if (spanEl.getAttribute('data-i18n')){
e.trigger.classList.remove("btn-light-primary");
e.trigger.classList.add("btn-success");
setI18NData($(spanEl),"general.copied");
setTimeout(function(){
e.trigger.classList.remove("btn-success");
e.trigger.classList.add("btn-light-primary");
setI18NData($(spanEl),"general.copy_link");
}, 3000)
}