подгрузка данных для api из env
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user