fix: update

parent 0f619763
...@@ -6170,6 +6170,9 @@ ...@@ -6170,6 +6170,9 @@
"graceful-fs": "4.1.11" "graceful-fs": "4.1.11"
} }
}, },
"layui-layer": {
"version": "git+https://github.com/jumpserver/layer.git#c568876741b64556df9916ed678a6106e1e82899"
},
"lazy-cache": { "lazy-cache": {
"version": "0.2.7", "version": "0.2.7",
"resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz",
......
...@@ -2,7 +2,6 @@ import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core'; ...@@ -2,7 +2,6 @@ import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import {ElementRef, Renderer2} from '@angular/core'; import {ElementRef, Renderer2} from '@angular/core';
import {term} from '../../globals'; import {term} from '../../globals';
import {Terminal} from '../../globals'; import {Terminal} from '../../globals';
import * as jQuery from 'jquery/dist/jquery.min.js';
@Component({ @Component({
selector: 'app-element-term', selector: 'app-element-term',
...@@ -23,9 +22,11 @@ export class ElementTermComponent implements OnInit, AfterViewInit { ...@@ -23,9 +22,11 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
ngAfterViewInit() { ngAfterViewInit() {
// term.col = Math.floor(jQuery(this.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3; // term.col = Math.floor(jQuery(this.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3;
// term.row = Math.floor(jQuery(this.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5; // term.row = Math.floor(jQuery(this.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5;
term.col = 90;
term.row = 90;
term.term = Terminal({ term.term = Terminal({
cols: 1024, cols: term.col,
rows: 1024, rows: term.row,
useStyle: true, useStyle: true,
screenKeys: true, screenKeys: true,
}); });
......
...@@ -21,3 +21,7 @@ ...@@ -21,3 +21,7 @@
#term .terminal div span { #term .terminal div span {
min-width: 12px; min-width: 12px;
} }
app-element-term {
position: absolute;
}
<!--<button type="button" class="btn">--> <div>
<!--<i class="fa fa-stop" aria-hidden="true"></i>-->
<!--</button>--> <!--<button type="button" class="btn">-->
<!--<button type="button" class="btn">--> <!--<i class="fa fa-stop" aria-hidden="true"></i>-->
<!--<i class="fa fa-step-backward" aria-hidden="true"></i>--> <!--</button>-->
<!--</button>--> <!--<button type="button" class="btn">-->
<!--<button type="button" class="btn">--> <!--<i class="fa fa-step-backward" aria-hidden="true"></i>-->
<!--<i class="fa fa-backward" aria-hidden="true"></i>--> <!--</button>-->
<!--</button>--> <!--<button type="button" class="btn">-->
<button type="button" class="btn" (click)="pause()"> <!--<i class="fa fa-backward" aria-hidden="true"></i>-->
<!--</button>-->
<button type="button" class="btn" (click)="pause()">
<i class="fa" aria-hidden="true" [ngClass]="{'fa-play':!toggle,'fa-pause': toggle}"></i> <i class="fa" aria-hidden="true" [ngClass]="{'fa-play':!toggle,'fa-pause': toggle}"></i>
</button> </button>
<!--<button type="button" class="btn">--> <!--<button type="button" class="btn">-->
<!--<i class="fa fa-forward" aria-hidden="true"></i>--> <!--<i class="fa fa-forward" aria-hidden="true"></i>-->
<!--</button>--> <!--</button>-->
<!--<button type="button" class="btn">--> <!--<button type="button" class="btn">-->
<!--<i class="fa fa-step-forward" aria-hidden="true"></i>--> <!--<i class="fa fa-step-forward" aria-hidden="true"></i>-->
<!--</button>--> <!--</button>-->
<!--<button type="button" class="btn">--> <!--<button type="button" class="btn">-->
<!--<i class="fa fa-expand" aria-hidden="true"></i>--> <!--<i class="fa fa-expand" aria-hidden="true"></i>-->
<!--</button>--> <!--</button>-->
<!--<button type="button" class="btn">--> <!--<button type="button" class="btn">-->
<!--<i class="fa fa-compress" aria-hidden="true"></i>--> <!--<i class="fa fa-compress" aria-hidden="true"></i>-->
<!--</button>--> <!--</button>-->
<button type="button" class="btn" (click)="restart()"> <button type="button" class="btn" (click)="restart()">
<i class="fa fa-repeat" aria-hidden="true"></i> <i class="fa fa-repeat" aria-hidden="true"></i>
</button> </button>
<input id="scrubber" type="range" [(ngModel)]="setPercent" min=0 max=100 (mousedown)="stop()" (mouseup)="rununil()"/> <input id="scrubber" type="range" [(ngModel)]="setPercent" min=0 max=100 (mousedown)="stop()" (mouseup)="rununil()"/>
{{time | utcDate | date:"HH:mm:ss"}} {{time | utcDate | date:"HH:mm:ss"}}
</div>
<app-element-term></app-element-term> <app-element-term></app-element-term>
<!--<asciinema-player></asciinema-player>--> <!--<asciinema-player></asciinema-player>-->
import {Component, OnInit} from '@angular/core'; import {AfterViewInit, Component, OnInit} from '@angular/core';
import {Video} from '../../globals'; import {Video} from '../../globals';
import {term} from '../../globals'; import {term} from '../../globals';
...@@ -9,7 +9,7 @@ import * as jQuery from 'jquery/dist/jquery.min.js'; ...@@ -9,7 +9,7 @@ import * as jQuery from 'jquery/dist/jquery.min.js';
templateUrl: './json.component.html', templateUrl: './json.component.html',
styleUrls: ['./json.component.css'] styleUrls: ['./json.component.css']
}) })
export class JsonComponent implements OnInit { export class JsonComponent implements OnInit, AfterViewInit {
speed = 1; speed = 1;
setPercent = 0; setPercent = 0;
toggle = false; toggle = false;
...@@ -24,6 +24,9 @@ export class JsonComponent implements OnInit { ...@@ -24,6 +24,9 @@ export class JsonComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
}
ngAfterViewInit() {
this.restart(); this.restart();
} }
......
<app-mp4 *ngIf='Video.type=="mp4"'></app-mp4> <app-json></app-json>
<app-json *ngIf='Video.type=="json"'></app-json>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment