(session, messages = null, options = {})
| 3885 | // Remove all color classes first |
| 3886 | btn.classList.remove('text-amber-600', 'text-status-success', 'text-muted-foreground'); |
| 3887 | |
| 3888 | if (shareInfo?.shareId) { |
| 3889 | const isExpired = shareInfo.expiresAt && Date.now() > shareInfo.expiresAt; |
| 3890 | if (isExpired) { |
| 3891 | btn.classList.add('text-amber-600'); |
| 3892 | if (btnText) btnText.textContent = 'Expired'; |
| 3893 | } else { |
| 3894 | btn.classList.add('text-status-success'); |
| 3895 | if (btnText) btnText.textContent = 'Shared'; |
| 3896 | } |
| 3897 | } else { |
| 3898 | btn.classList.add('text-muted-foreground'); |
| 3899 | if (btnText) btnText.textContent = 'Share'; |
| 3900 | } |
no test coverage detected