diff --git a/docs/releases/console-3.1.16.md b/docs/releases/console-3.1.16.md new file mode 100644 index 0000000..b1b48a0 --- /dev/null +++ b/docs/releases/console-3.1.16.md @@ -0,0 +1,9 @@ +# Console 3.1.16 + +Release date: 2026-10-06. + +- Extend the shared platform dialog with a details variant: installation logs use a 1000px maximum width, constrained by the existing viewport padding. +- Right-align the log text as requested, preserving monospace formatting, line breaks, escaping and left-to-right command/path direction. +- Focus the Close action without scrolling the dialog to its bottom on opening. + +Style ownership remains in the existing Console platform dialog and diagnostic block; no new modal implementation or breakpoint. Browser checks at 360, 768, 1024 and 1440 pixels cover width, right alignment, initial scroll position, viewport insets and Escape closure. diff --git a/stage-releases.json b/stage-releases.json index 7810f6b..079adc0 100644 --- a/stage-releases.json +++ b/stage-releases.json @@ -14,7 +14,7 @@ "version": "1.0.0" }, "stage_ui": { - "version": "3.1.15" + "version": "3.1.16" }, "stage_avahi": { "version": "1.0.0" diff --git a/stage_ui/console_core/backend/app.py b/stage_ui/console_core/backend/app.py index b05625a..e1c1aaf 100644 --- a/stage_ui/console_core/backend/app.py +++ b/stage_ui/console_core/backend/app.py @@ -54,7 +54,7 @@ APP_DIR = "/opt/iomatex-console" PUBLIC_DIR = os.path.join(APP_DIR, "public") PROVIDERS_DIR = os.path.join(APP_DIR, "providers.d") CONFIG_PATH = "/etc/iomatex/console.json" -UI_VERSION = "V 3.1.15" +UI_VERSION = "V 3.1.16" STORAGE_HEALTH_COMMAND = "/usr/local/sbin/iomatex-storage-health" ZONEINFO_ROOT = "/usr/share/zoneinfo" diff --git a/stage_ui/console_core/backend/test_installation_log_layout_browser.cjs b/stage_ui/console_core/backend/test_installation_log_layout_browser.cjs new file mode 100644 index 0000000..3577816 --- /dev/null +++ b/stage_ui/console_core/backend/test_installation_log_layout_browser.cjs @@ -0,0 +1,2 @@ +const {chromium}=require('playwright'); +(async()=>{const b=await chromium.launch();const c=await b.newContext();const base='http://192.168.0.109';await c.request.post(base+'/api/auth/login',{data:{username:'iomatex',password:process.env.EDGE_PASSWORD}});const p=await c.newPage();if(process.env.LOCAL_JS)for(const name of ['console.js','console.css'])await p.route('**/'+name+'*',r=>r.fulfill({path:'/repo/stage_ui/console_core/frontend/'+name}));await p.goto(base,{waitUntil:'networkidle'});for(const width of [360,768,1024,1440]){await p.setViewportSize({width,height:900});await p.evaluate(()=>{void window.__stageInstallLog('stage_ui','')});const dialog=p.locator('.platformDialog--details');await dialog.waitFor();const result=await dialog.evaluate(e=>{const r=e.getBoundingClientRect();return {x:r.x,y:r.y,width:r.width,bottom:r.bottom,scroll:e.scrollTop,align:getComputedStyle(e.querySelector('pre')).textAlign}});if(result.align!=='right'||result.scroll!==0||result.x<19||result.y<19||result.bottom>881||result.width>width-39)throw Error(JSON.stringify(result));if(width===1440&&result.width<990)throw Error('Dialog not widened');await p.keyboard.press('Escape');await dialog.waitFor({state:'detached'});console.log(width,result);}await c.request.post(base+'/api/auth/logout',{data:{}});await b.close()})().catch(e=>{console.error(e);process.exit(1)}); diff --git a/stage_ui/console_core/frontend/console.css b/stage_ui/console_core/frontend/console.css index 9242b00..9202803 100644 --- a/stage_ui/console_core/frontend/console.css +++ b/stage_ui/console_core/frontend/console.css @@ -1590,6 +1590,13 @@ html[dir="rtl"] .timezoneOption{text-align:right} text-align:center; padding:28px; } +.platformDialog--details{ + width:min(1000px,100%); +} +.platformDialog--details .diagBlock{ + text-align:right; + direction:ltr; +} .platformDialogIcon{ display:grid; place-items:center; diff --git a/stage_ui/console_core/frontend/console.js b/stage_ui/console_core/frontend/console.js index 46e260c..67debd8 100644 --- a/stage_ui/console_core/frontend/console.js +++ b/stage_ui/console_core/frontend/console.js @@ -49,7 +49,7 @@ { mode: "test_by", label: "test.it-screen.by", host: "rest.test.it-screen.by" }, { mode: "custom", label: "Custom", host: "" } ]; - const UI_VERSION = "V 3.1.15"; + const UI_VERSION = "V 3.1.16"; const ITSCREEN_LOG_INITIAL_LINES = 50; const ITSCREEN_LOG_BUFFER_LIMIT = 300; const ITSCREEN_LOG_BATCH_MS = 250; @@ -1211,7 +1211,7 @@ const backdrop = document.createElement("div"); backdrop.className = "modalBackdrop"; backdrop.innerHTML = ` -
${esc(message)}
@@ -1249,7 +1249,7 @@ backdrop.querySelector("[data-dialog-primary]").addEventListener("click", () => finish(true)); document.addEventListener("keydown", onKeydown); document.body.appendChild(backdrop); - backdrop.querySelector("[data-dialog-primary]").focus(); + backdrop.querySelector("[data-dialog-primary]").focus({ preventScroll: true }); }); } diff --git a/stage_ui/console_core/frontend/index.html b/stage_ui/console_core/frontend/index.html index 4020621..82eea6c 100644 --- a/stage_ui/console_core/frontend/index.html +++ b/stage_ui/console_core/frontend/index.html @@ -23,7 +23,7 @@ } catch (error) {} })(); - +