Merge pull request #7806 from nextcloud/fix-responsive-log-view

Fix log viewer on small screens
This commit is contained in:
Simon L.
2026-03-27 13:19:40 +01:00
committed by GitHub
2 changed files with 16 additions and 6 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;
@@ -43,7 +53,7 @@
transition: opacity 1s, display 1s allow-discrete;
}
</style>
<script src="log-view.js"></script>
<script src="log-view.js?v1"></script>
</head>
<body data-container-id="{{ id }}">
<div id="floating-box">