feat: publish

parent 49145074
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
"../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",
"assets/inspinia/style.scss", "assets/inspinia/style.scss",
"../node_modules/xterm/dist/xterm.css",
"sass/style.scss", "sass/style.scss",
"styles.css" "styles.css"
], ],
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
"../node_modules/jquery-sparkline/jquery.sparkline.js", "../node_modules/jquery-sparkline/jquery.sparkline.js",
"../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/xterm/dist/xterm.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",
......
...@@ -104,11 +104,11 @@ def asset_groups_assets(): ...@@ -104,11 +104,11 @@ def asset_groups_assets():
"comment": "Default asset group", "comment": "Default asset group",
"assets_granted": [ "assets_granted": [
{ {
"id": 2, "id": 1,
"hostname": "192.168.1.6", "hostname": "192.168.1.6",
"ip": "192.168.2.6", "ip": "192.168.2.6",
"port": 22, "port": 22,
"system": "linux", "plantform": "Linux",
"system_users_granted": [ "system_users_granted": [
{ {
"id": 1, "id": 1,
...@@ -117,6 +117,14 @@ def asset_groups_assets(): ...@@ -117,6 +117,14 @@ def asset_groups_assets():
"protocol": "ssh", "protocol": "ssh",
"auth_method": "P", "auth_method": "P",
"auto_push": True "auto_push": True
},
{
"id": 2,
"name": "liuzheng",
"username": "liuzheng",
"protocol": "ssh",
"auth_method": "P",
"auto_push": True
} }
] ]
}, },
...@@ -125,7 +133,7 @@ def asset_groups_assets(): ...@@ -125,7 +133,7 @@ def asset_groups_assets():
"hostname": "windows server", "hostname": "windows server",
"ip": "123.57.183.135", "ip": "123.57.183.135",
"port": 3389, "port": 3389,
"system": "windows", "plantform": "Windows",
"assets_granted": [ "assets_granted": [
{ {
"id": 1, "id": 1,
......
...@@ -5116,6 +5116,11 @@ ...@@ -5116,6 +5116,11 @@
"integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=",
"dev": true "dev": true
}, },
"inconsolata": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/inconsolata/-/inconsolata-0.0.2.tgz",
"integrity": "sha1-uqFDP0PUKqHtsmvZ7odzjpKSUOs="
},
"indent-string": { "indent-string": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
...@@ -10572,6 +10577,11 @@ ...@@ -10572,6 +10577,11 @@
} }
} }
}, },
"npm-font-open-sans": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/npm-font-open-sans/-/npm-font-open-sans-1.1.0.tgz",
"integrity": "sha512-t1y5ShWm6a8FSLwBdINT47XYMcuKY2rkTBsTdz/76YB2MtX0YD89RUkY2eSS2/XOmlZfBe1HFBAwD+b9+/UfmQ=="
},
"npm-run-path": { "npm-run-path": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
"filetree-css": "^1.0.0", "filetree-css": "^1.0.0",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"handlebars": "^4.0.11", "handlebars": "^4.0.11",
"inconsolata": "0.0.2",
"jquery": "^3.1.0", "jquery": "^3.1.0",
"jquery-slimscroll": "^1.3.8", "jquery-slimscroll": "^1.3.8",
"jquery-sparkline": "^2.4.0", "jquery-sparkline": "^2.4.0",
...@@ -44,6 +45,7 @@ ...@@ -44,6 +45,7 @@
"ngx-bootstrap": "^1.6.6", "ngx-bootstrap": "^1.6.6",
"node": "^9.3.0", "node": "^9.3.0",
"npm": "^5.6.0", "npm": "^5.6.0",
"npm-font-open-sans": "^1.1.0",
"peity": "^3.2.1", "peity": "^3.2.1",
"popper.js": "^1.12.9", "popper.js": "^1.12.9",
"roboto-fontface": "^0.8.0", "roboto-fontface": "^0.8.0",
......
...@@ -34,7 +34,7 @@ label { ...@@ -34,7 +34,7 @@ label {
overflow: hidden; overflow: hidden;
} }
.filetree > li input:checked ~ ul { .filetree > li input:checked ~ ul , .filetree > li ul.insearch{
height: auto; height: auto;
} }
...@@ -51,7 +51,7 @@ label { ...@@ -51,7 +51,7 @@ label {
.search { .search {
border-left-width: 0; border-left-width: 0;
border-bottom: gold 2px inset; border-bottom: #19aa8d 2px inset;
} }
.left-search { .left-search {
...@@ -68,6 +68,10 @@ label { ...@@ -68,6 +68,10 @@ label {
font-size: 9pt; font-size: 9pt;
border-top-width: 1px; border-top-width: 1px;
left: 0; left: 0;
padding: 1px 20px 30px 20px; padding: 1px 20px 0 20px;
position: absolute; position: absolute;
} }
.fa.fa-undefined:before {
content: "\f26c";
}
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
<li *ngFor="let hostGroup of HostGroups | SearchFilter: q; let i = index "> <li *ngFor="let hostGroup of HostGroups | SearchFilter: q; let i = index ">
<input type="checkbox" id="hostgroup-{{i}}"> <input type="checkbox" id="hostgroup-{{i}}">
<label for="hostgroup-{{i}}">{{hostGroup.name}}</label> <label for="hostgroup-{{i}}">{{hostGroup.name}}</label>
<ul> <ul [ngClass]="{'insearch': q }">
<li *ngFor="let host of hostGroup.assets_granted | SearchFilter: q" (click)="Connect(host)"> <li *ngFor="let host of hostGroup.assets_granted | SearchFilter: q" (click)="Connect(host)">
<i class="fa" [ngClass]="'fa-'+host.system" id="fa-{{i}}"></i> <i class="fa" [ngClass]="'fa-'+(host.plantform||'undefined').toLowerCase()" id="fa-{{i}}"></i>
{{host.hostname}} {{host.hostname}}
</li> </li>
</ul> </ul>
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
Version: <strong>{{version}}</strong> Version <strong>{{version}}</strong>
</div> </div>
...@@ -92,12 +92,32 @@ export class CleftbarComponent implements OnInit { ...@@ -92,12 +92,32 @@ export class CleftbarComponent implements OnInit {
.map(res => res.json()) .map(res => res.json())
.subscribe(response => { .subscribe(response => {
this.HostGroups = response; this.HostGroups = response;
this.autologin();
}); });
} }
autologin() {
const id = this._appService.getQueryString('id');
if (id) {
for (let g of this.HostGroups) {
if (g['assets_granted']) {
for (let u of g['assets_granted']) {
if (u.id.toString() === id.toString()) {
this.Connect(u);
return;
}
}
}
}
}
}
Connect(host) { Connect(host) {
console.log(host); // console.log(host);
let userid: string; let userid: string;
const that = this;
if (host.system_users_granted.length > 1) { if (host.system_users_granted.length > 1) {
let options = ''; let options = '';
for (let u of host.system_users_granted) { for (let u of host.system_users_granted) {
...@@ -112,6 +132,7 @@ export class CleftbarComponent implements OnInit { ...@@ -112,6 +132,7 @@ export class CleftbarComponent implements OnInit {
content: '<select id="selectuser">' + options + '</select>', content: '<select id="selectuser">' + options + '</select>',
yes: function (index, layero) { yes: function (index, layero) {
userid = jQuery('#selectuser').val(); userid = jQuery('#selectuser').val();
that.login(host, userid);
layer.close(index); layer.close(index);
}, },
btn2: function (index, layero) { btn2: function (index, layero) {
...@@ -123,15 +144,19 @@ export class CleftbarComponent implements OnInit { ...@@ -123,15 +144,19 @@ export class CleftbarComponent implements OnInit {
}); });
} else if (host.system_users_granted.length === 1) { } else if (host.system_users_granted.length === 1) {
userid = host.system_users_granted[0].id; userid = host.system_users_granted[0].id;
this.login(host, userid);
} }
}
login(host, userid) {
if (userid === '') { if (userid === '') {
return; return;
} }
if (host.system === 'linux') { if (host.plantform.toLowerCase() === 'linux') {
jQuery('app-ssh').show(); jQuery('app-ssh').show();
jQuery('app-rdp').hide(); jQuery('app-rdp').hide();
this._term.TerminalConnect(host, userid); this._term.TerminalConnect(host, userid);
} else if (host.system === 'windows') { } else if (host.plantform.toLowerCase() === 'windows') {
jQuery('app-ssh').hide(); jQuery('app-ssh').hide();
jQuery('app-rdp').show(); jQuery('app-rdp').show();
this._rdp.Connect(host, userid); this._rdp.Connect(host, userid);
......
.tabs {
#tabs {
height: 30px; height: 30px;
width: 100% overflow-y: hidden;
overflow-x: auto;
} }
#tabs ul li.disconnected { .tabs ul li.disconnected {
background-color: darkgray; background-color: darkgray;
} }
#tabs ul li.hidden { .tabs ul li.hidden {
display: none; display: none;
} }
#tabs ul { .tabs ul {
list-style-type: none; list-style-type: none;
height: 30px; height: 30px;
background-color: #3a3333; background-color: #3a3333;
overflow-y: hidden; display: block;
overflow-x: auto; min-width: 100%;
width: 100%; padding-left: 0;
display: inline-flex;
position: absolute;
} }
#tabs ul li { .tabs ul li {
display: inline-table; display: inline-table;
width: 150px; width: 150px;
height: 30px; height: 30px;
position: relative; position: relative;
box-sizing: content-box; box-sizing: content-box;
float: left;;
} }
#tabs ul li.active { .tabs ul li.active {
box-sizing: border-box; box-sizing: border-box;
border-bottom: 3px solid #7f3f98 !important; border-bottom: 3px solid #19aa8d !important;
} }
#tabs ul li span { .tabs ul li span {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
...@@ -50,7 +49,7 @@ ...@@ -50,7 +49,7 @@
height: 21px; height: 21px;
} }
#tabs ul li a.close { .tabs ul li a.close {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
font-size: 13px; font-size: 13px;
position: absolute; position: absolute;
...@@ -62,17 +61,17 @@ ...@@ -62,17 +61,17 @@
display: inline-block; display: inline-block;
} }
#tabs ul li.active a { .tabs ul li.active a {
color: white; color: white;
} }
#tabs ul li.active span { .tabs ul li.active span {
padding: 5px 20px 4px 15px; padding: 5px 20px 4px 15px;
color: white; color: white;
height: 18px; height: 18px;
} }
#tabs ul li input { .tabs ul li input {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
font-size: 13px; font-size: 13px;
width: 115px; width: 115px;
......
<div id="tabs"> <div class="tabs">
<ul> <ul [ngStyle]="{'width':150*NavList.List.length+'px'}">
<li *ngFor="let m of NavList.List;let i = index" <li *ngFor="let m of NavList.List;let i = index"
[ngClass]="{'active':i==NavList.Active,'disconnected':!m.connected, 'hidden': m.closed != false}" [ngClass]="{'active':i==NavList.Active,'disconnected':!m.connected, 'hidden': m.closed != false}"
id="termnav-{{i}}" (click)="setActive(i)"> id="termnav-{{i}}" (click)="setActive(i)">
......
...@@ -34,7 +34,7 @@ export class ControlnavComponent implements OnInit { ...@@ -34,7 +34,7 @@ export class ControlnavComponent implements OnInit {
} else { } else {
NavList.Active = index; NavList.Active = index;
} }
ControlnavComponent.setActive(NavList.Active) ControlnavComponent.setActive(NavList.Active);
} }
static setActive(index) { static setActive(index) {
......
...@@ -47,7 +47,7 @@ export class SshComponent implements OnInit { ...@@ -47,7 +47,7 @@ export class SshComponent implements OnInit {
} }
TerminalConnect(host, userid) { TerminalConnect(host, userid) {
console.log(host, userid); // console.log(host, userid);
const socket = io.connect('/ssh'); const socket = io.connect('/ssh');
let cols = '80'; let cols = '80';
let rows = '24'; let rows = '24';
...@@ -77,11 +77,11 @@ export class SshComponent implements OnInit { ...@@ -77,11 +77,11 @@ export class SshComponent implements OnInit {
screenKeys: true, screenKeys: true,
}); });
NavList.List.push(new View()); NavList.List.push(new View());
for (let _i = 0; _i < NavList.List.length; _i++) { for (let i = 0; i < NavList.List.length; i++) {
if (id === _i) { if (id === i) {
NavList.List[id].hide = false; NavList.List[id].hide = false;
} else { } else {
NavList.List[_i].hide = true; NavList.List[i].hide = true;
} }
} }
...@@ -109,7 +109,7 @@ export class SshComponent implements OnInit { ...@@ -109,7 +109,7 @@ export class SshComponent implements OnInit {
}); });
socket.on('disconnect', function () { socket.on('disconnect', function () {
this.TerminalDisconnect(NavList.List[id]); SshComponent.TerminalDisconnect(NavList.List[id]);
// TermStore.term[id]["term"].destroy(); // TermStore.term[id]["term"].destroy();
// TermStore.term[id]["connected"] = false; // TermStore.term[id]["connected"] = false;
}); });
......
...@@ -7,6 +7,8 @@ div, term-leftbar, term-body { ...@@ -7,6 +7,8 @@ div, term-leftbar, term-body {
div { div {
background-color: black; background-color: black;
margin: 0; margin: 0;
top:30px;
position: absolute;
} }
app-cleftbar { app-cleftbar {
......
<app-element-nav *ngIf="DataStore.NavShow"></app-element-nav> <app-element-nav *ngIf="DataStore.NavShow"></app-element-nav>
<nav *ngIf="DataStore.NavShow"></nav>
<router-outlet></router-outlet> <router-outlet></router-outlet>
<!--<app-element-interactive></app-element-interactive>--> <!--<app-element-interactive></app-element-interactive>-->
...@@ -13,6 +13,7 @@ import {Logger} from 'angular2-logger/core'; ...@@ -13,6 +13,7 @@ import {Logger} from 'angular2-logger/core';
import 'rxjs/add/operator/map'; import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/catch';
import {DataStore, User, Browser} from './globals'; import {DataStore, User, Browser} from './globals';
declare function unescape(s: string): string;
@Injectable() @Injectable()
export class HttpService { export class HttpService {
...@@ -174,6 +175,14 @@ export class AppService implements OnInit { ...@@ -174,6 +175,14 @@ export class AppService implements OnInit {
this._http.post('/api/browser', JSON.stringify(Browser)).map(res => res.json()).subscribe(); this._http.post('/api/browser', JSON.stringify(Browser)).map(res => res.json()).subscribe();
} }
getQueryString(name) {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
const r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
}
// //
// //
......
<div class="nav"> <div class="nav">
<ul> <ul>
<li><a [routerLink]="['Index']"><img src="static/imgs/logo.png" height="26px"/></a> <li><a [routerLink]="['']"><img src="static/imgs/logo.png" height="26px"/></a>
</li> </li>
<li *ngFor="let v of DataStore.Nav" [ngClass]="{'dropdown': v.children}"> <li *ngFor="let v of DataStore.Nav" [ngClass]="{'dropdown': v.children}">
<a>{{v.name}}</a> <a>{{v.name}}</a>
......
...@@ -129,18 +129,18 @@ export class ElementNavComponent implements OnInit { ...@@ -129,18 +129,18 @@ export class ElementNavComponent implements OnInit {
'id': 'File', 'id': 'File',
'name': 'Server', 'name': 'Server',
'children': [ 'children': [
{ // {
'id': 'NewConnection', // 'id': 'NewConnection',
'href': '', // 'href': '',
'name': 'New connection', // 'name': 'New connection',
'disable': true // 'disable': true
}, // },
{ // {
'id': 'Connect', // 'id': 'Connect',
'click': 'Connect', // 'click': 'Connect',
'name': 'Connect', // 'name': 'Connect',
'disable': true // 'disable': true
}, // },
{ {
'id': 'Disconnect', 'id': 'Disconnect',
'click': 'Disconnect', 'click': 'Disconnect',
...@@ -151,35 +151,35 @@ export class ElementNavComponent implements OnInit { ...@@ -151,35 +151,35 @@ export class ElementNavComponent implements OnInit {
'click': 'DisconnectAll', 'click': 'DisconnectAll',
'name': 'Disconnect all' 'name': 'Disconnect all'
}, },
{ // {
'id': 'Duplicate', // 'id': 'Duplicate',
'href': '', // 'href': '',
'name': 'Duplicate', // 'name': 'Duplicate',
'disable': true // 'disable': true
}, // },
{ // {
'id': 'Upload', // 'id': 'Upload',
'href': '', // 'href': '',
'name': 'Upload', // 'name': 'Upload',
'disable': true // 'disable': true
}, // },
{ // {
'id': 'Download', // 'id': 'Download',
'href': '', // 'href': '',
'name': 'Download', // 'name': 'Download',
'disable': true // 'disable': true
}, // },
{ // {
'id': ' Search', // 'id': ' Search',
'href': '', // 'href': '',
'name': 'Search', // 'name': 'Search',
'disable': true // 'disable': true
}, // },
{ // {
'id': 'Reload', // 'id': 'Reload',
'click': 'ReloadLeftbar', // 'click': 'ReloadLeftbar',
'name': 'Reload' // 'name': 'Reload'
} // }
] ]
}, { }, {
'id': 'View', 'id': 'View',
...@@ -218,11 +218,11 @@ export class ElementNavComponent implements OnInit { ...@@ -218,11 +218,11 @@ export class ElementNavComponent implements OnInit {
'id': 'Help', 'id': 'Help',
'name': 'Help', 'name': 'Help',
'children': [ 'children': [
{ // {
'id': 'EnterLicense', // 'id': 'EnterLicense',
'click': 'EnterLicense', // 'click': 'EnterLicense',
'name': 'Enter License' // 'name': 'Enter License'
}, // },
{ {
'id': 'Website', 'id': 'Website',
'click': 'Website', 'click': 'Website',
......
...@@ -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',
...@@ -21,8 +20,10 @@ export class ElementTermComponent implements OnInit, AfterViewInit { ...@@ -21,8 +20,10 @@ 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: term.col, cols: term.col,
rows: term.row, rows: term.row,
...@@ -30,19 +31,19 @@ export class ElementTermComponent implements OnInit, AfterViewInit { ...@@ -30,19 +31,19 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
screenKeys: true, screenKeys: true,
}); });
term.term.open(this.el.nativeElement, true); term.term.open(this.el.nativeElement, true);
const that = this; // const that = this;
window.onresize = function () { // window.onresize = function () {
term.col = Math.floor(jQuery(that.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3; // term.col = Math.floor(jQuery(that.el.nativeElement).width() / jQuery('#liuzheng').width() * 8) - 3;
term.row = Math.floor(jQuery(that.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5; // term.row = Math.floor(jQuery(that.el.nativeElement).height() / jQuery('#liuzheng').height()) - 5;
//
if (term.col < 80) { // if (term.col < 80) {
term.col = 80; // term.col = 80;
} // }
if (term.row < 24) { // if (term.row < 24) {
term.row = 24; // term.row = 24;
} // }
term.term.resize(term.col, term.row); // term.term.resize(term.col, term.row);
}; // };
} }
} }
...@@ -20,12 +20,16 @@ export class LinuxComponent implements OnInit { ...@@ -20,12 +20,16 @@ export class LinuxComponent implements OnInit {
Monitor.socket.emit('room', Monitor.sessionid); Monitor.socket.emit('room', Monitor.sessionid);
Monitor.socket.on('room', function (room) { Monitor.socket.on('room', function (room) {
Monitor.room = room; Monitor.room = room;
console.log(room);
Monitor.socket.emit('join', room); Monitor.socket.emit('join', room);
console.log(Monitor); console.log(Monitor);
}); });
Monitor.socket.on('data', function (data) { Monitor.socket.on('data', function (data) {
term.term.write(data); term.term.write(data);
}); });
Monitor.socket.on('error', function (data) {
alert(data);
});
}); });
} }
......
...@@ -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">-->
<!--<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>
<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> <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;
...@@ -27,6 +27,10 @@ export class JsonComponent implements OnInit { ...@@ -27,6 +27,10 @@ export class JsonComponent implements OnInit {
this.restart(); this.restart();
} }
ngAfterViewInit() {
this.restart();
}
setSpeed() { setSpeed() {
if (this.speed === 0) { if (this.speed === 0) {
......
<app-mp4 *ngIf='Video.type=="mp4"'></app-mp4> <app-json></app-json>
<app-json *ngIf='Video.type=="json"'></app-json>
@import url("https://fonts.googleapis.com/css?family=Roboto:400,300,500,700");
$md-color-primary: #1AB394; $md-color-primary: #1AB394;
$md-shadow-main: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); $md-shadow-main: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
* *
*/ */
// Google Fonts // Google Fonts
@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700");
// Variables, Mixins // Variables, Mixins
@import "imports/variables"; @import "imports/variables";
......
src/favicon.ico

1.59 KB | W: | H:

src/favicon.ico

1.7 KB | W: | H:

src/favicon.ico
src/favicon.ico
src/favicon.ico
src/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
...@@ -4,3 +4,8 @@ $fa-font-path: "~font-awesome/fonts"; ...@@ -4,3 +4,8 @@ $fa-font-path: "~font-awesome/fonts";
// bootstrap // bootstrap
@import "~bootstrap/scss/bootstrap"; @import "~bootstrap/scss/bootstrap";
$FontPathOpenSans: "~npm-font-open-sans/fonts";
@import '~npm-font-open-sans/open-sans';
$roboto-font-path: "~roboto-fontface/fonts";
@import "~roboto-fontface/css/mixins.scss";
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
* -------------------------------------------------- * --------------------------------------------------
*/ */
@font-face { @font-face {
font-family: iosevka; font-family: Inconsolata;
src: url('assets/fonts/iosevka-term-ss07-1.13.3/woff2/iosevka-term-ss07-light.woff2') format("woff2"); src: url('assets/fonts/inconsolata.woff') format("woff");
font-weight: normal; font-weight: normal;
font-size: large;
} }
html, html,
...@@ -29,11 +30,11 @@ app-root { ...@@ -29,11 +30,11 @@ app-root {
z-index: -1; z-index: -1;
font-size: 11px !important; font-size: 11px !important;
padding-bottom: 16px !important; padding-bottom: 16px !important;
font-family: 'Monaco', iosevka !important; font-family: 'Monaco', Inconsolata !important;
} }
.terminal { .terminal {
font-family: 'Monaco', iosevka; font-family: 'Monaco', Inconsolata;
font-size: 11px; font-size: 11px;
white-space: nowrap; white-space: nowrap;
display: inline-block; display: inline-block;
......
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