feat: Mac-like scrollbars - thin, no track, shown while scrolling or at the edge and fading out, none when there is nothing to scroll; a lone terminal's bar sits by the frame, right of the plus

This commit is contained in:
redtea committed 2026-10-15 16:32:51 +03:00
1 parent baee90b564
commit 25ffa60d09
10 files changed
+78 -5

No files matched your search

@@ -6,6 +6,7 @@
<title>Машины - LPRA</title>
<link rel="stylesheet" href="{{asset "app.css"}}">
<script src="{{asset "pin.js"}}"></script>
<script src="{{asset "scroll.js"}}" defer></script>
</head>
<body>
<header class="topbar">
+1
View File
@@ -6,6 +6,7 @@
<title>Изменить машину - LPRA</title>
<link rel="stylesheet" href="{{asset "app.css"}}">
<script src="{{asset "pin.js"}}"></script>
<script src="{{asset "scroll.js"}}" defer></script>
</head>
<body>
<header class="topbar">
+1
View File
@@ -6,6 +6,7 @@
<title>Файлы · {{.Agent.Name}} - LPRA</title>
<link rel="stylesheet" href="{{asset "app.css"}}">
<script src="{{asset "pin.js"}}"></script>
<script src="{{asset "scroll.js"}}" defer></script>
<link rel="stylesheet" href="{{asset "codemirror/codemirror.css"}}">
<style>
.fm-bar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
@@ -6,6 +6,7 @@
<title>Порты · {{.Agent.Name}} - LPRA</title>
<link rel="stylesheet" href="{{asset "app.css"}}">
<script src="{{asset "pin.js"}}"></script>
<script src="{{asset "scroll.js"}}" defer></script>
<style>
/* One line: fixed narrow fields, the label takes what is left. */
.frow { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; }
@@ -6,6 +6,7 @@
<title>Настройки - LPRA</title>
<link rel="stylesheet" href="{{asset "app.css"}}">
<script src="{{asset "pin.js"}}"></script>
<script src="{{asset "scroll.js"}}" defer></script>
<style>
/* An install command, with a button to copy it at its right. */
/* Users: role, machines, password sign-in. */
@@ -6,6 +6,7 @@
<title>Статус · {{.Agent.Name}} - LPRA</title>
<link rel="stylesheet" href="{{asset "app.css"}}">
<script src="{{asset "pin.js"}}"></script>
<script src="{{asset "scroll.js"}}" defer></script>
<style>
.meters { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:20px; margin-bottom:20px; }
.meters .card { margin:0; }
+5 -3
View File
@@ -6,6 +6,7 @@
<title>Терминал · {{.Agent.Name}} - LPRA</title>
<link rel="stylesheet" href="{{asset "app.css"}}">
<script src="{{asset "pin.js"}}"></script>
<script src="{{asset "scroll.js"}}" defer></script>
<link rel="stylesheet" href="{{asset "xterm.css"}}">
<style>
#status.st-ok { color:#37c871; }
@@ -78,9 +79,6 @@
background:transparent; border:1px solid var(--border); opacity:.28; transition:opacity .25s ease, background .25s ease, top .25s ease; }
/* One tab split in panes: below the panes' title bars, clear of their close buttons. */
body.split1 .float-add { top:42px; }
/* Windows draws a wide scrollbar in the terminal: the "+" keeps clear of it. */
body.win .float-add { right:38px; top:16px; }
body.win.split1 .float-add { top:48px; }
.float-add:hover, .float-add:focus-visible { opacity:1; background:var(--panel); }
body.multi .float-add { opacity:0; pointer-events:none; }
.tabview { position:absolute; inset:8px; opacity:0; visibility:hidden; transform:translateY(4px) scale(.995);
@@ -97,6 +95,10 @@
.tabview.split .pane.active .pane-head { color:var(--text); }
.pane-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pane-body { flex:1; min-height:0; padding:4px 0 0 4px; }
/* A lone terminal's scrollbar sits in the margin by the frame, right of
the corner "+", not over the text. */
body:not(.touch) .tabview:not(.split) .pane { overflow:visible; }
body:not(.touch) .tabview:not(.split) .xterm .xterm-viewport { right:-8px; }
.pane.dragging { opacity:.45; }
.gutter { position:absolute; z-index:3; }
.gutter.c { cursor:col-resize; } .gutter.r { cursor:row-resize; }