(mode = currentConferenceAccessMode(), hasConferenceAuth = false)
| 4853 | } |
| 4854 | |
| 4855 | function syncConferenceAccessUi(mode = currentConferenceAccessMode(), hasConferenceAuth = false) { |
| 4856 | const normalized = ["public", "credential", "manual"].includes(mode) ? mode : "public"; |
| 4857 | const panel = document.querySelector(".source-auth-panel"); |
| 4858 | if (panel) panel.dataset.mode = normalized; |
| 4859 | |
| 4860 | document.querySelectorAll(".source-auth-fields input").forEach((input) => { |
| 4861 | input.disabled = normalized !== "credential"; |
| 4862 | }); |
| 4863 | |
| 4864 | if (normalized === "manual" && $("settingEnableCustomRss")) { |
| 4865 | $("settingEnableCustomRss").checked = true; |
| 4866 | } |
| 4867 | |
| 4868 | if ($("conferenceAuthStatus")) { |
| 4869 | $("conferenceAuthStatus").textContent = normalized === "credential" |
| 4870 | ? hasConferenceAuth ? ui().settings.authConfigured : ui().settings.authWaiting |
| 4871 | : normalized === "manual" ? ui().settings.manualFirst : ui().settings.publicFirstStatus; |
| 4872 | } |
| 4873 | } |
| 4874 | |
| 4875 | function updateSourceAuthStatus(sourcePrefs, env) { |
| 4876 | const semanticKey = envInfo(env, "SEMANTIC_SCHOLAR_API_KEY"); |
no test coverage detected