mirror of
https://ghfast.top/https://github.com/discourse/docker_manager.git
synced 2026-05-24 00:14:00 +08:00
23 lines
602 B
Text
23 lines
602 B
Text
import Component from "@glimmer/component";
|
|
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
|
|
import didUpdate from "@ember/render-modifiers/modifiers/did-update";
|
|
import { bind } from "discourse/lib/decorators";
|
|
|
|
export default class Console extends Component {
|
|
@bind
|
|
scrollToBottom(element) {
|
|
if (this.args.followOutput) {
|
|
element.scrollTop = element.scrollHeight;
|
|
}
|
|
}
|
|
|
|
<template>
|
|
<div
|
|
class="console-logs"
|
|
{{didInsert this.scrollToBottom}}
|
|
{{didUpdate this.scrollToBottom @output}}
|
|
>
|
|
{{~@output~}}
|
|
</div>
|
|
</template>
|
|
}
|