diff --git a/instance/log.ejs b/instance/log.ejs index 1c920d42ce4f9254ac0aec97802213ad9b4be618..1193e80e083669c7d06462878c2d39aff415741f 100644 --- a/instance/log.ejs +++ b/instance/log.ejs @@ -13,16 +13,22 @@ <link rel="stylesheet" href="../style/fontawesome-free-5.15.1-web/css/all.min.css" /> <script src="./log.js"></script> <script></script> + <style> + ::-webkit-scrollbar { width: 13px; } + ::-webkit-scrollbar-track { background: #343a40; } /* Background */ + ::-webkit-scrollbar-thumb { background: #4e5d6c; } /* Scrollbar */ + ::-webkit-scrollbar-thumb:hover { background: #df691a; } /* Scrollbar on hover */ + </style> </head> - <body style='overflow-y: scroll; height: 100%;'> + <body style='overflow-y: scroll; height: 100%; overflow-x: hidden;'> <div style='border-color: #abb6c2; border-style: solid; border-top: none; height: 100%;'> <table class='table table-sm' style='margin: 0px;'> <thead class='thead-light' style='position: sticky; position: -webkit-sticky; top: 0; z-index: 999; -webkit-app-region: drag'> - <tr> - <th style='border: 0px; position: sticky; position: -webkit-sticky; top: 0; z-index: 999;'>Timestamp</th> - <th style='border: 0px; position: sticky; position: -webkit-sticky; top: 0; z-index: 999;'>Label</th> - <th style='border: 0px; position: sticky; position: -webkit-sticky; top: 0; z-index: 999;'>Message</th> + <tr style='-webkit-app-region: drag'> + <th style='border: 0px; position: sticky; position: -webkit-sticky; top: 0; z-index: 999; -webkit-app-region: drag'>Timestamp</th> + <th style='border: 0px; position: sticky; position: -webkit-sticky; top: 0; z-index: 999; -webkit-app-region: drag'>Label</th> + <th style='border: 0px; position: sticky; position: -webkit-sticky; top: 0; z-index: 999; -webkit-app-region: drag'>Message</th> </tr> </thead> <tbody id='body'> diff --git a/instance/log.js b/instance/log.js index 3eb02c9714b41d0465dbf1cf8d6eae802e145572..1663bba4baeaec0df20ff83c845aa57dbd08b004 100644 --- a/instance/log.js +++ b/instance/log.js @@ -32,6 +32,7 @@ file.on('line', line => { const limit = 200; var trs = $('tr'); if (trs.length > limit) trs.slice(2, trs.length - limit).remove(); + window.scrollTo(0, document.body.scrollHeight); }); window.onload = () => {}; diff --git a/style/css/instance.css b/style/css/instance.css index 5dd6e05d4e1dc4704253e6004ec54426e1a6eeb1..92bf04451fc62340d480028e924f70ec970db3cd 100644 --- a/style/css/instance.css +++ b/style/css/instance.css @@ -11,7 +11,7 @@ } ::-webkit-scrollbar-track { - background: content-box; + background: #343a40; } ::-webkit-scrollbar-thumb {