Implement all requested changes

This commit is contained in:
Excellencedev
2026-01-06 15:49:34 +01:00
parent d26294839e
commit 9610d7f27a
9 changed files with 239 additions and 5 deletions
+21 -2
View File
@@ -28,11 +28,11 @@ export function initActionsPermissionsTable(): void {
for (const input of inputs) {
input.disabled = tableDisabled;
}
permTable.style.opacity = tableDisabled ? '0.5' : '1';
permTable.style.display = tableDisabled ? 'none' : '';
}
if (tableSection) {
tableSection.style.opacity = tableDisabled ? '0.5' : '1';
tableSection.style.display = tableDisabled ? 'none' : '';
}
}
@@ -43,4 +43,23 @@ export function initActionsPermissionsTable(): void {
followOrgCheckbox?.addEventListener('change', updateTableState);
updateTableState();
// Cross-Repo Access Table Toggle
const crossRepoRadios = document.querySelectorAll<HTMLInputElement>('.js-cross-repo-mode');
const allowedReposSection = document.querySelector<HTMLElement>('#allowed-repos-section');
if (crossRepoRadios.length && allowedReposSection) {
function updateCrossRepoState(): void {
const selectedMode = document.querySelector<HTMLInputElement>('input[name="cross_repo_mode"]:checked');
const isSelected = selectedMode?.value === 'selected';
if (allowedReposSection) {
allowedReposSection.style.display = isSelected ? '' : 'none';
}
}
for (const radio of crossRepoRadios) {
radio.addEventListener('change', updateCrossRepoState);
}
updateCrossRepoState();
}
}