подгрузка данных для api из env

This commit is contained in:
2026-08-19 16:28:09 +03:00
parent bddc0967b3
commit c643a183d8
15 changed files with 891 additions and 86 deletions

View File

@@ -11287,11 +11287,16 @@ function renderHockeyPenaltyDashboard(node, component, runtime) {
return [...String(input.value || "")].map((digit) => `<span>${escapeHtml(digit)}</span>`).join("");
}
function explicitEditorUrl() {
const base = String(boot.editorUrl || "/editor");
return `${base}${base.includes("?") ? "&" : "?"}open=1`;
}
async function openEditorPinDialog() {
try {
const status = await authApi("/status");
if (status.authenticated) {
window.location.href = boot.editorUrl;
window.location.href = explicitEditorUrl();
return;
}
@@ -11359,7 +11364,7 @@ function renderHockeyPenaltyDashboard(node, component, runtime) {
});
message.textContent = "Доступ разрешён";
form.classList.add("success");
setTimeout(() => { window.location.href = boot.editorUrl; }, 300);
setTimeout(() => { window.location.href = explicitEditorUrl(); }, 300);
} catch (error) {
message.textContent = error.message;
message.classList.add("error");