mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-15 10:35:45 +00:00
fmt: Cleanup terminal code (#381)
* fmt: Clean up OutputTerminal code * fmt: Clean up OutputTerminal code
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { ActionStatusDisplay } from './ActionStatusDisplay.js'
|
||||
import { OutputTerminal } from './OutputTerminal.js'
|
||||
|
||||
// This ExecutionDialog is NOT a custom HTML element, but rather just picks up
|
||||
// the <dialog /> element out of index.html and just re-uses that - as only
|
||||
@@ -23,6 +24,7 @@ export class ExecutionDialog {
|
||||
this.domExecutionBasics = document.getElementById('execution-dialog-basics')
|
||||
this.domExecutionDetails = document.getElementById('execution-dialog-details')
|
||||
|
||||
window.terminal = new OutputTerminal()
|
||||
window.terminal.open(this.domOutput)
|
||||
}
|
||||
|
||||
@@ -38,7 +40,7 @@ export class ExecutionDialog {
|
||||
this.dlg.classList.add('big')
|
||||
}
|
||||
|
||||
window.terminal.fit.fit()
|
||||
window.terminal.fit()
|
||||
}
|
||||
|
||||
reset () {
|
||||
@@ -64,7 +66,7 @@ export class ExecutionDialog {
|
||||
this.domExecutionDetails.hidden = true
|
||||
|
||||
window.terminal.reset()
|
||||
window.terminal.fit.fit()
|
||||
window.terminal.fit()
|
||||
}
|
||||
|
||||
show (actionButton) {
|
||||
@@ -113,7 +115,7 @@ export class ExecutionDialog {
|
||||
executionTick () {
|
||||
this.executionSeconds++
|
||||
|
||||
this.updateDuration(this.executionSeconds + ' seconds ago', '')
|
||||
this.updateDuration(this.executionSeconds + ' seconds', '')
|
||||
}
|
||||
|
||||
hideEverythingApartFromOutput () {
|
||||
@@ -198,7 +200,7 @@ export class ExecutionDialog {
|
||||
|
||||
window.terminal.reset()
|
||||
window.terminal.write(res.logEntry.output, () => {
|
||||
window.terminal.fit.fit()
|
||||
window.terminal.fit()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user