MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / flashButtonFeedback

Function flashButtonFeedback

deployments/desktop/static/desktop.js:1658–1669  ·  view source on GitHub ↗
(button, type = "click")

Source from the content-addressed store, hash-verified

1656 }
1657
1658 function flashButtonFeedback(button, type = "click") {
1659 if (!button || (button.disabled && type === "click")) return;
1660 const previousTimer = state.buttonFeedbackTimers.get(button);
1661 if (previousTimer) window.clearTimeout(previousTimer);
1662 button.classList.remove("feedback-click", "feedback-success", "feedback-error");
1663 button.classList.add(`feedback-${type}`);
1664 const timer = window.setTimeout(() => {
1665 button.classList.remove("feedback-click", "feedback-success", "feedback-error");
1666 state.buttonFeedbackTimers.delete(button);
1667 }, type === "click" ? 520 : 760);
1668 state.buttonFeedbackTimers.set(button, timer);
1669 }
1670
1671 function setActionButtonBusy(button, busy) {
1672 if (!button) return;

Callers 2

bindButtonFeedbackFunction · 0.85
runActionFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected