Scroll to the bottom when status messages appear

The log viewer was scrolling to the bottom when new logs
appeared, but not when the status updated. This meant that the status update may have been invisible. I now scroll
when the status changes too, which should fix the problem.
This commit is contained in:
Richard Bowman 2024-01-10 20:13:10 +00:00
parent 46444770f3
commit 29177d7214

View file

@ -34,6 +34,15 @@ export default {
watch: {
log: function() {
this.scrollToBottom();
},
taskStatus: function() {
this.scrollToBottom();
}
},
methods: {
scrollToBottom() {
this.$nextTick(function() {
let viewer = this.$refs.logContainer;
viewer.scrollTop = viewer.scrollHeight;