log lol, logo
This commit is contained in:
		@@ -1213,3 +1213,12 @@ img.avatar {
 | 
				
			|||||||
  border-radius: 25px;
 | 
					  border-radius: 25px;
 | 
				
			||||||
  margin-top: 1px;
 | 
					  margin-top: 1px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* log */
 | 
				
			||||||
 | 
					div.logwrap {
 | 
				
			||||||
 | 
					  height: auto;
 | 
				
			||||||
 | 
					  text-align: left;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					div.logwrap > p {
 | 
				
			||||||
 | 
					  line-height: 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -118,10 +118,10 @@ export default (router, tpl) => {
 | 
				
			|||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  router.get(/^\/admin\/log(\/)?$/, auth, async (req, res) => {
 | 
					  router.get(/^\/admin\/log(\/)?$/, auth, async (req, res) => {
 | 
				
			||||||
    exec("journalctl -xu f0ck", (err, stdout) => {
 | 
					    exec("journalctl -qeu f0ck --no-pager", (err, stdout) => {
 | 
				
			||||||
      res.reply({
 | 
					      res.reply({
 | 
				
			||||||
        body: tpl.render("admin/log", {
 | 
					        body: tpl.render("admin/log", {
 | 
				
			||||||
          log: stdout.split("\n").slice(-500)
 | 
					          log: stdout.split("\n").slice(0, -1)
 | 
				
			||||||
        }, req)
 | 
					        }, req)
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,18 +6,6 @@
 | 
				
			|||||||
  <p>{{ line }}</p>
 | 
					  <p>{{ line }}</p>
 | 
				
			||||||
@endeach
 | 
					@endeach
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
<style>
 | 
					 | 
				
			||||||
  div.logwrap {
 | 
					 | 
				
			||||||
    height: 600px;
 | 
					 | 
				
			||||||
    overflow-y: scroll;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    direction: rtl;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  div.logwrap > p {
 | 
					 | 
				
			||||||
    direction: ltr;
 | 
					 | 
				
			||||||
    line-height: 0;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
  (() => {
 | 
					  (() => {
 | 
				
			||||||
    const d = document.querySelector("div.logwrap");
 | 
					    const d = document.querySelector("div.logwrap");
 | 
				
			||||||
@@ -25,4 +13,4 @@
 | 
				
			|||||||
  })();
 | 
					  })();
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
@endif
 | 
					@endif
 | 
				
			||||||
@include(main/footer)
 | 
					@include(main/footer)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user