Fix log viewer on small screens

Previously it showed a lot of white space at the bottom, and the floating box
didn't stick. Both is now fixed.

AI-assistant: Copilot v1.0.7 (Claude Sonnet 4.6)

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl
2026-03-23 13:37:43 +01:00
parent 7c8cabdb2d
commit 387b39099f
2 changed files with 15 additions and 5 deletions

View File

@@ -96,7 +96,7 @@ class LogViewer {
}
scrollToBottom() {
window.scrollTo(0, document.body.scrollHeight);
this.logElem.scrollTop = this.logElem.scrollHeight;
}
initAutoloadingControls() {

View File

@@ -3,15 +3,25 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="style.css">
<style>
body {
html, body {
height: 100%;
overflow: hidden;
padding: 0;
margin: 0;
}
pre {
height: 100%;
overflow: auto;
margin: 0;
padding: 1rem;
box-sizing: border-box;
}
#floating-box {
position: sticky;
position: fixed;
top: 1rem;
float: right;
right: 1rem;
width: 20rem;
max-width: calc(100vw - 2rem);
z-index: 10;
display: flex;
justify-content: end;
align-items: center;