-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show commit version under info popup; fix #SNRGY-2829
- Loading branch information
1 parent
1edb884
commit 1e31ad2
Showing
14 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#container { | ||
min-width: 500px; | ||
} | ||
|
||
mat-form-field { | ||
width: 100% | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div id="container"> | ||
<h2 mat-dialog-title>Info</h2> | ||
|
||
<mat-dialog-content> | ||
<mat-form-field class="full-width" color="accent"> | ||
<mat-label>Version</mat-label> | ||
<input type="text" matInput placeholder="Version" [value]="commit" readonly> | ||
</mat-form-field> | ||
</mat-dialog-content> | ||
|
||
<mat-dialog-actions fxLayoutAlign="end center"> | ||
<button mat-raised-button color="primary" (click)="close()">Cancel</button> | ||
</mat-dialog-actions> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { InfoComponent } from './info.component'; | ||
|
||
describe('InfoComponent', () => { | ||
let component: InfoComponent; | ||
let fixture: ComponentFixture<InfoComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ InfoComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(InfoComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Component } from '@angular/core'; | ||
import { MatDialogRef } from '@angular/material/dialog'; | ||
import { environment } from 'src/environments/environment'; | ||
|
||
@Component({ | ||
selector: 'app-info', | ||
templateUrl: './info.component.html', | ||
styleUrls: ['./info.component.css'] | ||
}) | ||
export class InfoDialogComponent { | ||
commit: string = "" | ||
|
||
constructor( | ||
private dialogRef: MatDialogRef<InfoDialogComponent>, | ||
) { | ||
this.commit = environment.commit | ||
} | ||
|
||
close(): void { | ||
this.dialogRef.close(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { InfoDialogComponent } from './dialogs/info/info.component'; | ||
import { MatDialogModule } from '@angular/material/dialog'; | ||
import { MatFormFieldModule } from '@angular/material/form-field'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { MatInputModule } from '@angular/material/input'; | ||
import { MatButtonModule } from '@angular/material/button'; | ||
import { FlexLayoutModule } from '@angular/flex-layout'; | ||
|
||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
InfoDialogComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
MatDialogModule, | ||
MatFormFieldModule, | ||
MatInputModule, | ||
MatButtonModule, | ||
FlexLayoutModule | ||
] | ||
}) | ||
export class InfoModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { InfoService } from './info.service'; | ||
|
||
describe('InfoService', () => { | ||
let service: InfoService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(InfoService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; | ||
import { InfoDialogComponent } from '../dialogs/info/info.component'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class InfoService { | ||
|
||
constructor( | ||
private dialog: MatDialog | ||
) { } | ||
|
||
openInfoDialog() { | ||
const dialogConfig = new MatDialogConfig(); | ||
dialogConfig.disableClose = false; | ||
// dialogConfig.data = { | ||
// name: name, | ||
// permissions: permissionsIn, | ||
// }; | ||
const editDialogRef = this.dialog.open(InfoDialogComponent, dialogConfig); | ||
|
||
editDialogRef.afterClosed().subscribe(() => {}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters