-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35bfd8c
commit 3e1b9d6
Showing
26 changed files
with
376 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export class ProjectModel { | ||
public name?: string; | ||
public path?: string; | ||
public viewPath?: string; | ||
public languagesPath?: string; | ||
} |
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,30 @@ | ||
import { Injectable } from '@angular/core'; | ||
|
||
// If you import a module but never use any of the imported values other than as TypeScript types, | ||
// the resulting javascript file will look as if you never imported the module at all. | ||
|
||
import { ElectronService } from 'app/core/services'; | ||
import { remote } from 'electron'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class DialogService { | ||
remote: typeof remote; | ||
|
||
|
||
constructor( | ||
private electronService: ElectronService | ||
) { | ||
// Conditional imports | ||
this.remote = this.electronService.remote; | ||
} | ||
|
||
public readFolder() { | ||
|
||
} | ||
|
||
public readFile() { | ||
|
||
} | ||
} |
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,29 @@ | ||
import { Injectable } from '@angular/core'; | ||
|
||
// If you import a module but never use any of the imported values other than as TypeScript types, | ||
// the resulting javascript file will look as if you never imported the module at all. | ||
import * as fs from 'fs'; | ||
import { ElectronService } from 'app/core/services'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class FsService { | ||
fs: typeof fs; | ||
|
||
|
||
constructor( | ||
private electronService: ElectronService | ||
) { | ||
// Conditional imports | ||
this.fs = this.electronService.fs; | ||
} | ||
|
||
public readFolder() { | ||
|
||
} | ||
|
||
public readFile() { | ||
|
||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/app/core/services/ngx-translate-lint/ngx-translate-lint.service.ts
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,32 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { NgxTranslateLint, IRulesConfig, ResultCliModel, ErrorTypes } from 'ngx-translate-lint'; | ||
import * as NodePath from 'path'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class NgxTranslateLintService { | ||
public viewPath: string; | ||
public languagesPath: string; | ||
|
||
constructor() {} | ||
|
||
public run(viewsPath: string, languagesPath: string) { | ||
/* const viewsPathCorrect: string = './src/app/!**!/!*.{html,ts}'; | ||
const languagesPathCorrect: string = './src/assets/i18n/!*.json';*/ | ||
const ignoredLanguagesPath: string = ""; | ||
const ruleConfig: IRulesConfig = { | ||
keysOnViews: ErrorTypes.error, | ||
zombieKeys: ErrorTypes.warning, | ||
misprint: ErrorTypes.warning, | ||
maxWarning: 0, | ||
misprintCoefficient: 0.9, | ||
ignoredKeys: [] | ||
}; | ||
|
||
const ngxTranslateLint = new NgxTranslateLint(viewsPath, languagesPath, ignoredLanguagesPath, ruleConfig) | ||
const resultLint: ResultCliModel = ngxTranslateLint.lint(); | ||
console.log(resultLint); | ||
return resultLint; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
src/app/modules/project/project-add/project-add.component.html
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,12 @@ | ||
<h1 mat-dialog-title>Hi {{data.name}}</h1> | ||
<div mat-dialog-content> | ||
<p>What's your favorite animal?</p> | ||
<mat-form-field> | ||
<mat-label>Favorite Animal</mat-label> | ||
<input matInput [(ngModel)]="data.animal"> | ||
</mat-form-field> | ||
</div> | ||
<div mat-dialog-actions> | ||
<button mat-button (click)="onNoClick()">No Thanks</button> | ||
<button mat-button [mat-dialog-close]="data.animal" cdkFocusInitial>Ok</button> | ||
</div> |
Empty file.
25 changes: 25 additions & 0 deletions
25
src/app/modules/project/project-add/project-add.component.spec.ts
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 { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ProjectAddComponent } from './project-add.component'; | ||
|
||
describe('ProjectAddComponent', () => { | ||
let component: ProjectAddComponent; | ||
let fixture: ComponentFixture<ProjectAddComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ProjectAddComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ProjectAddComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
28 changes: 28 additions & 0 deletions
28
src/app/modules/project/project-add/project-add.component.ts
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,28 @@ | ||
import { Component, Inject, OnInit } from '@angular/core'; | ||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; | ||
|
||
export interface DialogData { | ||
animal: string; | ||
name: string; | ||
} | ||
|
||
@Component({ | ||
selector: 'app-project-add', | ||
templateUrl: './project-add.component.html', | ||
styleUrls: ['./project-add.component.scss'] | ||
}) | ||
export class ProjectAddComponent implements OnInit { | ||
|
||
constructor( | ||
public dialogRef: MatDialogRef<ProjectAddComponent>, | ||
@Inject(MAT_DIALOG_DATA) public data: DialogData | ||
) { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
onNoClick(): void { | ||
this.dialogRef.close(); | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
src/app/modules/project/project-edit/project-edit.component.html
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 @@ | ||
<p>project-edit works!</p> |
Empty file.
25 changes: 25 additions & 0 deletions
25
src/app/modules/project/project-edit/project-edit.component.spec.ts
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 { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ProjectEditComponent } from './project-edit.component'; | ||
|
||
describe('ProjectEditComponent', () => { | ||
let component: ProjectEditComponent; | ||
let fixture: ComponentFixture<ProjectEditComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ProjectEditComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ProjectEditComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
src/app/modules/project/project-edit/project-edit.component.ts
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,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-project-edit', | ||
templateUrl: './project-edit.component.html', | ||
styleUrls: ['./project-edit.component.scss'] | ||
}) | ||
export class ProjectEditComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
23 changes: 22 additions & 1 deletion
23
src/app/modules/project/project-item/project-item.component.html
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 |
---|---|---|
@@ -1 +1,22 @@ | ||
<p>project-item works!</p> | ||
<mat-card> | ||
{{ project.name }} | ||
{{ project.path }} | ||
{{ project.viewPath }} | ||
{{ project.languagesPath }} | ||
<button mat-raised-button | ||
(click)="OpenLanguagesFolder()" | ||
class="example-add-tab-button"> | ||
Open Languages Folder | ||
</button> | ||
<button mat-raised-button | ||
(click)="OpenViewsFolder()" | ||
class="example-add-tab-button"> | ||
Open Views Folder | ||
</button> | ||
<button mat-raised-button | ||
(click)="RunLint()" | ||
class="example-add-tab-button"> | ||
Run Lint | ||
</button> | ||
</mat-card> | ||
|
Oops, something went wrong.