mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 19:47:54 +01:00
c8ea41b049
Fixes 79 typescript errors. Discovered at least two bugs in `notifications.ts`, and I'm pretty sure this feature was at least partially broken and may still be, I don't really know how to test it. After this, only like ~10 typescript errors remain in the codebase but those are harder to solve. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
8 lines
330 B
TypeScript
8 lines
330 B
TypeScript
export function initOAuth2SettingsDisableCheckbox() {
|
|
for (const el of document.querySelectorAll('.disable-setting')) {
|
|
el.addEventListener('change', (e: Event & {target: HTMLInputElement}) => {
|
|
document.querySelector(e.target.getAttribute('data-target')).classList.toggle('disabled', e.target.checked);
|
|
});
|
|
}
|
|
}
|