1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-31 01:57:21 +01:00

Adds scrolling

This commit is contained in:
Amir Raminfar
2018-10-30 12:41:55 -07:00
parent dbf24db594
commit 9313c67f5e
3 changed files with 7 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
<template lang="html">
<div>
<div class="content">
<p>
<router-link to="/">Go back</router-link>
</p>

View File

@@ -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>

View File

@@ -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>