подгрузка данных для 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

@@ -129,6 +129,11 @@ def install_ui_builder(
@app.get(editor_url, include_in_schema=False)
async def ui_builder_editor(request: Request):
# Runtime is the default landing mode, even if an old bookmark points
# directly at /editor. The visual editor is opened only explicitly
# from the runtime toolbar and carries ?open=1 after PIN auth.
if request.query_params.get("open") != "1":
return RedirectResponse(runtime_url, status_code=302)
if not auth.is_request_authenticated(request):
return RedirectResponse(runtime_url, status_code=302)
return render_page("editor")

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");

View File

@@ -156,7 +156,7 @@
<header class="runtime-topbar">
<div>
<div class="eyebrow">RUNTIME INTERFACE</div>
<div class="runtime-title-line"><strong id="runtimeTitle">Интерфейс</strong><small class="runtime-build-badge">BUILD 2026.08.19.21</small></div>
<div class="runtime-title-line"><strong id="runtimeTitle">Интерфейс</strong><small class="runtime-build-badge">BUILD 2026.08.19.24</small></div>
</div>
<div id="runtimeTabs" class="runtime-tabs"></div>
<div class="runtime-actions">