Commit 00019e7f authored by liuzheng712's avatar liuzheng712

feat: update

parent 96aa7be3
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
"../node_modules/xterm/dist/xterm.css", "../node_modules/xterm/dist/xterm.css",
"../node_modules/layui-layer/dist/theme/default/layer.css", "../node_modules/layui-layer/dist/theme/default/layer.css",
"../node_modules/animate.css/animate.min.css", "../node_modules/animate.css/animate.min.css",
"../node_modules/xterm/src/xterm.css",
"assets/inspinia/style.scss", "assets/inspinia/style.scss",
"styles.css" "styles.css"
], ],
...@@ -35,7 +36,6 @@ ...@@ -35,7 +36,6 @@
"../node_modules/tether/dist/js/tether.min.js", "../node_modules/tether/dist/js/tether.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js", "../node_modules/bootstrap/dist/js/bootstrap.min.js",
"../node_modules/term.js/src/term.js", "../node_modules/term.js/src/term.js",
"../node_modules/tty.js/static/tty.js",
"../node_modules/layui-layer/dist/layer.js", "../node_modules/layui-layer/dist/layer.js",
"../node_modules/socket.io-client/dist/socket.io.js", "../node_modules/socket.io-client/dist/socket.io.js",
"./assets/js/mstsc.js", "./assets/js/mstsc.js",
......
'use strict';
export const sep = '/';
export const version = '22.22.2';
export let Video: {
id: string,
src: string,
type: string,
} = {
id: 'sss',
src: 'sss',
type: 'json',
};
<div id="term"></div> <div id="term"></div>
<!--<asciinema-player></asciinema-player>-->
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {Video} from '../../globals';
declare let jQuery: any; declare let jQuery: any;
declare let Terminal: any; declare let Terminal: any;
...@@ -9,6 +10,7 @@ declare let Terminal: any; ...@@ -9,6 +10,7 @@ declare let Terminal: any;
styleUrls: ['./json.component.css'] styleUrls: ['./json.component.css']
}) })
export class JsonComponent implements OnInit { export class JsonComponent implements OnInit {
Video = Video;
constructor() { constructor() {
} }
......
<button type="button" class="btn"> <app-mp4 *ngIf='Video.type=="mp4"'></app-mp4>
<i class="fa fa-stop" aria-hidden="true"></i> <app-json *ngIf='Video.type=="json"'></app-json>
</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)="play()">
<i class="fa" aria-hidden="true" [ngClass]="{'fa-play':!playing,'fa-pause': playing}"></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>
<app-mp4 *ngIf='video.type=="mp4"'></app-mp4>
<app-json *ngIf='video.type=="json"'></app-json>
...@@ -2,6 +2,7 @@ import {Component, OnInit} from '@angular/core'; ...@@ -2,6 +2,7 @@ import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Params} from '@angular/router'; import {ActivatedRoute, Params} from '@angular/router';
import {Logger} from 'angular2-logger/core'; import {Logger} from 'angular2-logger/core';
import {HttpService} from '../app.service'; import {HttpService} from '../app.service';
import {Video} from '../globals';
@Component({ @Component({
selector: 'app-replay-page', selector: 'app-replay-page',
...@@ -9,13 +10,12 @@ import {HttpService} from '../app.service'; ...@@ -9,13 +10,12 @@ import {HttpService} from '../app.service';
styleUrls: ['./replay-page.component.css'] styleUrls: ['./replay-page.component.css']
}) })
export class ReplayPageComponent implements OnInit { export class ReplayPageComponent implements OnInit {
playing: boolean; Video = Video;
video: any;
constructor(private activatedRoute: ActivatedRoute, constructor(private activatedRoute: ActivatedRoute,
private _http: HttpService, private _http: HttpService,
private _logger: Logger) { private _logger: Logger) {
this.video = {'type': 'none'}; // this.video = {'type': 'none'};
} }
ngOnInit() { ngOnInit() {
...@@ -27,7 +27,7 @@ export class ReplayPageComponent implements OnInit { ...@@ -27,7 +27,7 @@ export class ReplayPageComponent implements OnInit {
.map(res => res.json()) .map(res => res.json())
.subscribe( .subscribe(
data => { data => {
this.video = data; this.Video = data;
}, },
err => { err => {
this._logger.error(err); this._logger.error(err);
...@@ -35,9 +35,4 @@ export class ReplayPageComponent implements OnInit { ...@@ -35,9 +35,4 @@ export class ReplayPageComponent implements OnInit {
); );
} }
play() {
this.playing = !this.playing;
}
} }
...@@ -30,9 +30,18 @@ app-root { ...@@ -30,9 +30,18 @@ app-root {
padding-bottom: 16px !important; padding-bottom: 16px !important;
font-family: 'Monaco', iosevka !important; font-family: 'Monaco', iosevka !important;
} }
.terminal{
white-space: nowrap; .terminal {
font-family: 'Monaco', iosevka;
font-size: 11px;
white-space: nowrap;
display: inline-block;
}
.terminal div {
user-select: text;
} }
.terminal, .terminal .xterm-viewport { .terminal, .terminal .xterm-viewport {
background-color: inherit; background-color: inherit;
} }
......
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