File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 22 <a-card :title =" $gettext('Terminal')" >
33 <div class =" console" id =" terminal" ></div >
44 </a-card >
5-
65</template >
76
87<script >
@@ -34,6 +33,7 @@ export default {
3433 window .removeEventListener (' resize' , this .fit )
3534 clearInterval (this .ping )
3635 this .ping = null
36+ this .term .close ()
3737 this .websocket .close ()
3838 },
3939 methods: {
@@ -46,13 +46,16 @@ export default {
4646 convertEol: true ,
4747 fontSize: 14 ,
4848 cursorStyle: ' block' ,
49- scrollback: 30 ,
49+ scrollback: 1000 ,
50+ theme: {
51+ background: ' rgba(3,14,32,0.7)'
52+ },
5053 })
5154 const fitAddon = new FitAddon ()
5255 term .loadAddon (fitAddon)
5356 this .fitAddon = fitAddon
5457 term .open (document .getElementById (' terminal' ))
55- setTimeout (()=> {
58+ setTimeout (() => {
5659 fitAddon .fit ()
5760 }, 60 )
5861 window .addEventListener (' resize' , this .fit )
@@ -71,7 +74,7 @@ export default {
7174 that .sendMessage ({Type: 1 , Data: data})
7275 })
7376 term .onResize (data => {
74- that .sendMessage ({Type: 2 , Data: {Cols: data .cols , Rows: data .rows }})
77+ that .sendMessage ({Type: 2 , Data: {Cols: data .cols , Rows: data .rows }})
7578 })
7679 this .term = term
7780 },
@@ -93,6 +96,6 @@ export default {
9396
9497<style lang="less" scoped>
9598.console {
96- min-height : 800 px ;
99+ min-height : calc ( 100 vh - 300 px ) ;
97100}
98101 </style >
Original file line number Diff line number Diff line change 1- {"version" :" 1.4.0" ,"build_id" :4 ,"total_build" :60 }
1+ {"version" :" 1.4.0" ,"build_id" :5 ,"total_build" :61 }
You can’t perform that action at this time.
0 commit comments