mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-31 01:57:21 +01:00
Adds scrolling
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template lang="html">
|
||||
<div>
|
||||
<div class="content">
|
||||
<p>
|
||||
<router-link to="/">Go back</router-link>
|
||||
</p>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.css" integrity="sha256-dMQYvN6BU9M4mHK94P22cZ4dPGTSGOVP41yVXvXatws=" crossorigin="anonymous" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template lang="html">
|
||||
<ul ref="logs">
|
||||
<pre ref="logs">
|
||||
|
||||
</ul>
|
||||
</pre>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -16,19 +16,13 @@ export default {
|
||||
ws.onerror = e => console.error("Connection error: " + e.data);
|
||||
ws.onmessage = e => {
|
||||
const parent = this.$refs.logs;
|
||||
const item = document.createElement("li");
|
||||
item.innerHTML = e.data;
|
||||
const item = document.createTextNode(e.data);
|
||||
parent.appendChild(item);
|
||||
parent.scrollIntoView({block: "end"});
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
ul li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user