Fix all bugs I found in the code

This commit is contained in:
Excellencedev committed 2025-12-20 05:46:33 +01:00
1 parent a5163fa5f2
commit 9c5b278622
9 files changed
+127 -106

No files matched your search

+4 -22
View File
@@ -1,24 +1,6 @@
// initRepoSettingsActionsPermissions is currently a no-op placeholder.
// The permission mode radio buttons work via standard HTML form submission
// without requiring JavaScript for toggling visibility.
export function initRepoSettingsActionsPermissions(): void {
const radios = document.querySelectorAll<HTMLInputElement>(
'input[name="token_permission_mode"]',
);
if (!radios.length) return;
function toggleCustom(): void {
const customPerms = document.querySelector<HTMLElement>('#custom-permissions');
if (!customPerms) return;
const selected = document.querySelector<HTMLInputElement>(
'input[name="token_permission_mode"]:checked',
);
customPerms.style.display =
selected?.value === 'custom' ? 'block' : 'none';
}
for (const radio of radios) {
radio.addEventListener('change', toggleCustom);
}
toggleCustom();
// No-op - form submission handles permission updates
}