wip-feat: mercure alerts

This commit is contained in:
2025-04-27 09:55:55 -05:00
parent 6138c94d7a
commit c32ff2e464
18 changed files with 719 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
import { Controller } from '@hotwired/stimulus';
export default class extends Controller {
connect() {
let timer = setTimeout(() => {
this.element.remove();
},
"3000"
);
this.element.addEventListener('mouseout', () => timer = setTimeout(() => {
this.element.remove();
},
"3000"
));
this.element.addEventListener('mouseover', () => clearTimeout(timer));
}
}