log lol, logo

This commit is contained in:
Flummi 2021-12-23 11:05:36 +01:00
parent bad5a5f7f0
commit 99598d9bb3
3 changed files with 12 additions and 15 deletions

View File

@ -1213,3 +1213,12 @@ img.avatar {
border-radius: 25px;
margin-top: 1px;
}
/* log */
div.logwrap {
height: auto;
text-align: left;
}
div.logwrap > p {
line-height: 0;
}

View File

@ -118,10 +118,10 @@ export default (router, tpl) => {
});
router.get(/^\/admin\/log(\/)?$/, auth, async (req, res) => {
exec("journalctl -xu f0ck", (err, stdout) => {
exec("journalctl -qeu f0ck --no-pager", (err, stdout) => {
res.reply({
body: tpl.render("admin/log", {
log: stdout.split("\n").slice(-500)
log: stdout.split("\n").slice(0, -1)
}, req)
});
});

View File

@ -6,18 +6,6 @@
<p>{{ line }}</p>
@endeach
</div>
<style>
div.logwrap {
height: 600px;
overflow-y: scroll;
text-align: left;
direction: rtl;
}
div.logwrap > p {
direction: ltr;
line-height: 0;
}
</style>
<script>
(() => {
const d = document.querySelector("div.logwrap");