Commit 6993e7a8 authored by ibuler's avatar ibuler

[Update] 修改手动密码窗

parent bc92f254
import {Component, OnInit, Output, Inject, OnDestroy, EventEmitter} from '@angular/core';
import {connectEvt} from '@app/globals';
import {AppService, HttpService, LogService} from '@app/app.service';
import {AppService, HttpService, LogService, NavService} from '@app/app.service';
import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material';
import {FormControl, Validators} from '@angular/forms';
import {ActivatedRoute} from '@angular/router';
......@@ -19,6 +19,7 @@ export class ElementConnectComponent implements OnInit, OnDestroy {
constructor(private _appSvc: AppService,
public _dialog: MatDialog,
public _logger: LogService,
private _navSrv: NavService,
private activatedRoute: ActivatedRoute,
private _http: HttpService,
) {
......@@ -144,7 +145,7 @@ export class ElementConnectComponent implements OnInit, OnDestroy {
}
manualSetUserAuthLoginIfNeed(node: any, user: SystemUser, callback) {
if (user.login_mode !== 'manual' || user.protocol !== 'rdp') {
if (user.login_mode !== 'manual' || user.protocol !== 'rdp' || this._navSrv.skipAllManualPassword) {
return callback(node, user);
}
user = Object.assign({}, user);
......@@ -235,7 +236,6 @@ export class AssetTreeDialogComponent implements OnInit {
templateUrl: 'manual-password-dialog.html',
})
export class ManualPasswordDialogComponent implements OnInit {
PasswordControl = new FormControl('', [Validators.required]);
constructor(@Inject(MAT_DIALOG_DATA) public data: any,
public dialogRef: MatDialogRef<ManualPasswordDialogComponent>) {
}
......
......@@ -5,8 +5,8 @@
</mat-form-field>
<mat-form-field style="width: 100%">
<input matInput [type]="'password'" [(ngModel)]="data.password"
[formControl]="PasswordControl" placeholder="{{'Password'|trans}}"
<input matInput [type]="'password'" [(ngModel)]="data.password" required
placeholder="{{'Password'|trans}}"
(keyup.enter)="onEnter()" [attr.cdkFocusInitial]="data.username? true : null">
</mat-form-field>
......
......@@ -2,7 +2,7 @@
[ngClass]="{'active': view.active,'disconnected': !view.connected, 'hidden': view.closed != false}"
[id]="view.id" (click)="setActive()" (dblclick)="view.editable=true;setActive()"
>
<span *ngIf="view.nick">{{view.nick | truncatechars:25 }}</span>
<input *ngIf="view.editable" [(ngModel)]="view.nick" (blur)="view.editable=false" (keyup.enter)="view.editable=false" autofocus="true"/>
<span *ngIf="view.nick && !view.editable">{{view.nick | truncatechars:25 }}</span>
<input *ngIf="view.editable" [(ngModel)]="view.nick" (blur)="view.editable=false" (keyup.enter)="view.editable=false" autofocus="autofocus"/>
<a class="close" (click)="close()">&times;</a>
</li>
......@@ -415,7 +415,7 @@ export class RDPSolutionDialogComponent implements OnInit {
@Component({
selector: 'elements-font-size-dialog',
templateUrl: 'fontDialog.html',
styles: ['.mat-form-field { width: 100%; }']
styles: ['.mat-form-field { width: 100%; }'],
})
export class FontDialogComponent implements OnInit {
fontSize: string;
......
......@@ -29,7 +29,7 @@
outline: none;
-webkit-user-select: none;
user-select: none;
z-index: 9999;
z-index: 99;
height: 5px;
width: 0;
display: block;
......
......@@ -6,6 +6,7 @@ $fa-font-path: '~font-awesome/fonts';
// Todo: 去掉依赖
@import '~bootstrap/scss/bootstrap';
//@import "~@angular/material/prebuilt-themes/indigo-pink.css";
//$FontPathOpenSans: '~npm-font-open-sans/fonts';
//@import '~npm-font-open-sans/open-sans';
//$roboto-font-path: '~roboto-fontface/fonts';
......@@ -99,3 +100,7 @@ button.icon-split-handle.ngx-split-button {
//border: 1px solid #3a3333;
opacity: 0.0;
}
button.mat-raised-button {
margin-left: 5px;
}
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