fix: update

parent 0f619763
......@@ -6170,6 +6170,9 @@
"graceful-fs": "4.1.11"
}
},
"layui-layer": {
"version": "git+https://github.com/jumpserver/layer.git#c568876741b64556df9916ed678a6106e1e82899"
},
"lazy-cache": {
"version": "0.2.7",
"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';
import {ElementRef, Renderer2} from '@angular/core';
import {term} from '../../globals';
import {Terminal} from '../../globals';
import * as jQuery from 'jquery/dist/jquery.min.js';
@Component({
selector: 'app-element-term',
......@@ -23,9 +22,11 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
ngAfterViewInit() {
// 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.col = 90;
term.row = 90;
term.term = Terminal({
cols: 1024,
rows: 1024,
cols: term.col,
rows: term.row,
useStyle: true,
screenKeys: true,
});
......
......@@ -21,3 +21,7 @@
#term .terminal div span {
min-width: 12px;
}
app-element-term {
position: absolute;
}
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-stop" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-step-backward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<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>
</button>
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-forward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-step-forward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-expand" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-compress" aria-hidden="true"></i>-->
<!--</button>-->
<button type="button" class="btn" (click)="restart()">
<i class="fa fa-repeat" aria-hidden="true"></i>
</button>
<div>
<input id="scrubber" type="range" [(ngModel)]="setPercent" min=0 max=100 (mousedown)="stop()" (mouseup)="rununil()"/>
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-stop" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-step-backward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<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>
</button>
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-forward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-step-forward" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-expand" aria-hidden="true"></i>-->
<!--</button>-->
<!--<button type="button" class="btn">-->
<!--<i class="fa fa-compress" aria-hidden="true"></i>-->
<!--</button>-->
<button type="button" class="btn" (click)="restart()">
<i class="fa fa-repeat" aria-hidden="true"></i>
</button>
{{time | utcDate | date:"HH:mm:ss"}}
<input id="scrubber" type="range" [(ngModel)]="setPercent" min=0 max=100 (mousedown)="stop()" (mouseup)="rununil()"/>
{{time | utcDate | date:"HH:mm:ss"}}
</div>
<app-element-term></app-element-term>
<!--<asciinema-player></asciinema-player>-->
import {Component, OnInit} from '@angular/core';
import {AfterViewInit, Component, OnInit} from '@angular/core';
import {Video} from '../../globals';
import {term} from '../../globals';
......@@ -9,7 +9,7 @@ import * as jQuery from 'jquery/dist/jquery.min.js';
templateUrl: './json.component.html',
styleUrls: ['./json.component.css']
})
export class JsonComponent implements OnInit {
export class JsonComponent implements OnInit, AfterViewInit {
speed = 1;
setPercent = 0;
toggle = false;
......@@ -24,6 +24,9 @@ export class JsonComponent implements OnInit {
}
ngOnInit() {
}
ngAfterViewInit() {
this.restart();
}
......
<app-mp4 *ngIf='Video.type=="mp4"'></app-mp4>
<app-json *ngIf='Video.type=="json"'></app-json>
<app-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