|
|
|
@ -2,35 +2,35 @@
|
|
|
|
|
<div mat-dialog-content>
|
|
|
|
|
<form [formGroup]="formGroup">
|
|
|
|
|
|
|
|
|
|
<mat-form-field matTooltipShowDelay="1000" matTooltip="A unique name for the repository">
|
|
|
|
|
<mat-form-field matTooltip="A unique name for the repository" matTooltipShowDelay="1000">
|
|
|
|
|
<mat-label>Name</mat-label>
|
|
|
|
|
<input matInput formControlName="name" (change)="validateName()" (input)="validateName()" (blur)="validateName()">
|
|
|
|
|
<input (blur)="validateName()" (change)="validateName()" (input)="validateName()" formControlName="name" matInput>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
|
|
|
|
|
<mat-form-field matTooltipShowDelay="1000"
|
|
|
|
|
matTooltip="Type of repository if it's on the local system or somewhere else">
|
|
|
|
|
<mat-form-field matTooltip="Type of repository if it's on the local system or somewhere else"
|
|
|
|
|
matTooltipShowDelay="1000">
|
|
|
|
|
<mat-label>Type</mat-label>
|
|
|
|
|
<mat-select #repoTypeSelect formControlName="repositoryType"
|
|
|
|
|
(selectionChange)="onTypeChange(repoTypeSelect.value)">
|
|
|
|
|
<mat-select #repoTypeSelect (selectionChange)="onTypeChange(repoTypeSelect.value)"
|
|
|
|
|
formControlName="repositoryType">
|
|
|
|
|
<mat-option value="local">Local</mat-option>
|
|
|
|
|
<mat-option value="remote">Remote</mat-option>
|
|
|
|
|
</mat-select>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
|
|
|
|
|
<mat-form-field *ngIf="repoTypeSelect.value === 'local'"
|
|
|
|
|
matTooltipShowDelay="1000"
|
|
|
|
|
matTooltip="Path where the repository is located or should be created">
|
|
|
|
|
<button class="button-folder-select" mat-button (click)="openFolderDialog()">
|
|
|
|
|
matTooltip="Path where the repository is located or should be created"
|
|
|
|
|
matTooltipShowDelay="1000">
|
|
|
|
|
<button (click)="openFolderDialog()" class="button-folder-select" mat-button>
|
|
|
|
|
<mat-icon>folder</mat-icon>
|
|
|
|
|
</button>
|
|
|
|
|
<mat-label>Path</mat-label>
|
|
|
|
|
<input matInput formControlName="path" (change)="this.checkLocalRepoExists()">
|
|
|
|
|
<input (change)="this.checkLocalRepoExists()" formControlName="path" matInput>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
|
|
|
|
|
<mat-form-field *ngIf="repoTypeSelect.value === 'remote'" matTooltipShowDelay="1000"
|
|
|
|
|
matTooltip="IP address and port of the remote repository">
|
|
|
|
|
<mat-form-field *ngIf="repoTypeSelect.value === 'remote'" matTooltip="IP address and port of the remote repository"
|
|
|
|
|
matTooltipShowDelay="1000">
|
|
|
|
|
<mat-label>Address</mat-label>
|
|
|
|
|
<input matInput formControlName="address">
|
|
|
|
|
<input formControlName="address" matInput>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</form>
|
|
|
|
|
<div *ngIf="repoTypeSelect.value === 'remote'" class="connection-state">
|
|
|
|
@ -38,17 +38,17 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="dialog-buttons" mat-dialog-actions>
|
|
|
|
|
<button mat-stroked-button color="accent" (click)="closeDialog()">Cancel</button>
|
|
|
|
|
<button mat-flat-button *ngIf="repoTypeSelect.value === 'remote' || this.localRepoExists"
|
|
|
|
|
[disabled]="!formGroup.valid" matTooltip="Add the existing repository" color="primary"
|
|
|
|
|
(click)="addRepository()">Add
|
|
|
|
|
<button (click)="closeDialog()" color="accent" mat-stroked-button>Cancel</button>
|
|
|
|
|
<button (click)="addRepository()" *ngIf="repoTypeSelect.value === 'remote' || this.localRepoExists"
|
|
|
|
|
[disabled]="!formGroup.valid" color="primary" mat-flat-button
|
|
|
|
|
matTooltip="Add the existing repository">Add
|
|
|
|
|
</button>
|
|
|
|
|
<button mat-flat-button *ngIf="repoTypeSelect.value === 'local' && !this.localRepoExists"
|
|
|
|
|
<button (click)="this.initLocalRepository()" *ngIf="repoTypeSelect.value === 'local' && !this.localRepoExists"
|
|
|
|
|
[disabled]="!formGroup.valid"
|
|
|
|
|
matTooltip="Initialize the repository in the specified path" color="accent"
|
|
|
|
|
(click)="this.initLocalRepository()">Init
|
|
|
|
|
color="accent" mat-flat-button
|
|
|
|
|
matTooltip="Initialize the repository in the specified path">Init
|
|
|
|
|
</button>
|
|
|
|
|
<button class="check-connection-button" *ngIf="repoTypeSelect.value === 'remote'" [disabled]="!formGroup.valid"
|
|
|
|
|
mat-stroked-button (click)="checkRepositoryStatus()">Check Connection
|
|
|
|
|
<button (click)="checkRepositoryStatus()" *ngIf="repoTypeSelect.value === 'remote'" [disabled]="!formGroup.valid"
|
|
|
|
|
class="check-connection-button" mat-stroked-button>Check Connection
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|