aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features
diff options
context:
space:
mode:
authorDenys Konovalov <kontakt@denyskon.de>2024-07-19 14:28:30 -0400
committerGitHub <noreply@github.com>2024-07-19 14:28:30 -0400
commita8d0c879c38e21a8e78db627119bf622d919ee75 (patch)
treef55cbd55c967d11e7e4a4c4c96ce7b6db8345353 /web_src/js/features
parente9aa39bda4581a69f04dd1d46aab7980940e99ce (diff)
downloadgitea-a8d0c879c38e21a8e78db627119bf622d919ee75.tar.gz
gitea-a8d0c879c38e21a8e78db627119bf622d919ee75.zip
add skip secondary authorization option for public oauth2 clients (#31454)
Diffstat (limited to 'web_src/js/features')
-rw-r--r--web_src/js/features/oauth2-settings.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/web_src/js/features/oauth2-settings.ts b/web_src/js/features/oauth2-settings.ts
new file mode 100644
index 0000000000..1e62ca0096
--- /dev/null
+++ b/web_src/js/features/oauth2-settings.ts
@@ -0,0 +1,5 @@
+export function initOAuth2SettingsDisableCheckbox() {
+ for (const e of document.querySelectorAll('.disable-setting')) e.addEventListener('change', ({target}) => {
+ document.querySelector(e.getAttribute('data-target')).classList.toggle('disabled', target.checked);
+ });
+}