(mode)
| 1943 | } |
| 1944 | |
| 1945 | function updateBindModeSpecificUi(mode) { |
| 1946 | const bindMode = mode || getBindMode(); |
| 1947 | const isVendor = bindMode === "vendor_auto"; |
| 1948 | const isVendorEfun = bindMode === "vendor_efun"; |
| 1949 | const isVendorFlow = isVendor || isVendorEfun; |
| 1950 | const thirdPartyPanel = document.getElementById("third-party-config"); |
| 1951 | const vendorPanel = document.getElementById("vendor-auto-config"); |
| 1952 | const vendorEfunPanel = document.getElementById("vendor-efun-config"); |
| 1953 | const commonFields = document.getElementById("bind-common-fields"); |
| 1954 | const pasteSection = document.getElementById("bind-paste-section"); |
| 1955 | const cardAddressSection = document.getElementById("bind-card-address-section"); |
| 1956 | const generateBtn = document.getElementById("generate-link-btn"); |
| 1957 | const autoOpenWrap = document.getElementById("bind-auto-open-wrap"); |
| 1958 | const linkBox = document.getElementById("link-box"); |
| 1959 | const stopBtn = document.getElementById("vendor-stop-btn"); |
| 1960 | |
| 1961 | if (thirdPartyPanel) thirdPartyPanel.style.display = bindMode === "third_party" ? "" : "none"; |
| 1962 | if (vendorPanel) vendorPanel.style.display = isVendor ? "" : "none"; |
| 1963 | if (vendorEfunPanel) vendorEfunPanel.style.display = isVendorEfun ? "" : "none"; |
| 1964 | if (commonFields) commonFields.style.display = isVendor ? "none" : ""; |
| 1965 | if (pasteSection) pasteSection.style.display = isVendorEfun ? "none" : ""; |
| 1966 | if (cardAddressSection) cardAddressSection.style.display = isVendorEfun ? "none" : ""; |
| 1967 | if (generateBtn) generateBtn.style.display = isVendorFlow ? "none" : ""; |
| 1968 | if (autoOpenWrap) autoOpenWrap.style.display = isVendorFlow ? "none" : "flex"; |
| 1969 | if (stopBtn) stopBtn.style.display = isVendorFlow ? "" : "none"; |
| 1970 | setVendorRetryButtonState(false, false); |
| 1971 | if (linkBox) { |
| 1972 | if (isVendorFlow) { |
| 1973 | linkBox.classList.remove("show"); |
| 1974 | linkBox.style.display = "none"; |
| 1975 | generatedLink = ""; |
| 1976 | const linkText = document.getElementById("link-text"); |
| 1977 | const openStatus = document.getElementById("open-status"); |
| 1978 | if (linkText) linkText.value = ""; |
| 1979 | if (openStatus) openStatus.textContent = ""; |
| 1980 | } else { |
| 1981 | linkBox.style.display = ""; |
| 1982 | } |
| 1983 | } |
| 1984 | if (!isVendorFlow) { |
| 1985 | showVendorProgressPanel(false); |
| 1986 | stopVendorProgressPolling(); |
| 1987 | vendorProgressState.taskId = 0; |
| 1988 | vendorProgressState.lastConfig = null; |
| 1989 | } |
| 1990 | if (isVendorEfun) { |
| 1991 | renderEfunPoolHint(); |
| 1992 | } |
| 1993 | } |
| 1994 | |
| 1995 | function onBindModeChange() { |
| 1996 | const mode = getBindMode(); |
no test coverage detected