-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
25 changed files
with
445 additions
and
2 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
8 changes: 8 additions & 0 deletions
8
src/SIL.XForge.Scripture/ClientApp/src/app/core/models/help-video.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,8 @@ | ||
export interface HelpVideo { | ||
id: string; | ||
name: string; | ||
url: string; | ||
description: string; | ||
keywords: string[]; | ||
feature: string; | ||
} |
27 changes: 27 additions & 0 deletions
27
src/SIL.XForge.Scripture/ClientApp/src/app/shared/help-videos/help-videos.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,27 @@ | ||
<h1>Tutorial Videos</h1> | ||
@if (!isOnline) { | ||
<span class="offline-text"> Connect to internet to view videos </span> | ||
} @else { | ||
<mat-form-field> | ||
<mat-label>Search for video</mat-label> | ||
<input matInput type="text" placeholder="Search for video" /> | ||
</mat-form-field> | ||
<button mat-button mat-icon-button aria-label="Search"> | ||
<mat-icon>search</mat-icon> | ||
</button> | ||
<div class="help-videos"> | ||
@for (value of ["1", "2", "3", "4", "5"]; track value) { | ||
<mat-card class="help-video"> | ||
<mat-card-header> | ||
<mat-card-title>Video Name {{ value }}</mat-card-title> | ||
</mat-card-header> | ||
<mat-card-content> | ||
<iframe width="320" height="240" src="https://www.youtube.com/embed/qgTusgXJOoM"> </iframe> | ||
</mat-card-content> | ||
<mat-card-footer> | ||
<mat-card-subtitle> Description of the video {{ value }} </mat-card-subtitle> | ||
</mat-card-footer> | ||
</mat-card> | ||
} | ||
</div> | ||
} |
12 changes: 12 additions & 0 deletions
12
src/SIL.XForge.Scripture/ClientApp/src/app/shared/help-videos/help-videos.component.scss
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 @@ | ||
.help-videos, | ||
mat-card-header, | ||
mat-card-footer { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
gap: 2rem; | ||
} | ||
|
||
mat-form-field { | ||
width: 85%; | ||
} |
22 changes: 22 additions & 0 deletions
22
src/SIL.XForge.Scripture/ClientApp/src/app/shared/help-videos/help-videos.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,22 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { HelpVideosComponent } from './help-videos.component'; | ||
|
||
describe('HelpVideosComponent', () => { | ||
let component: HelpVideosComponent; | ||
let fixture: ComponentFixture<HelpVideosComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [HelpVideosComponent] | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(HelpVideosComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
25 changes: 25 additions & 0 deletions
25
src/SIL.XForge.Scripture/ClientApp/src/app/shared/help-videos/help-videos.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,25 @@ | ||
import { Component } from '@angular/core'; | ||
import { MatCardModule } from '@angular/material/card'; | ||
import { MatIconModule } from '@angular/material/icon'; | ||
import { MatInputModule } from '@angular/material/input'; | ||
import { MatFormFieldModule } from '@angular/material/form-field'; | ||
import { OnlineStatusService } from '../../../xforge-common/online-status.service'; | ||
|
||
@Component({ | ||
selector: 'app-help-videos', | ||
standalone: true, | ||
imports: [MatCardModule, MatIconModule, MatInputModule, MatFormFieldModule], | ||
templateUrl: './help-videos.component.html', | ||
styleUrl: './help-videos.component.scss' | ||
}) | ||
export class HelpVideosComponent { | ||
isOnlineStatus: boolean; | ||
constructor(private readonly onlineStatusService: OnlineStatusService) { | ||
this.onlineStatusService.onlineStatus$.subscribe(isOnline => { | ||
this.isOnlineStatus = isOnline; | ||
}); | ||
} | ||
get isOnline(): boolean { | ||
return this.isOnlineStatus; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...ministration/sa-help-video-tab/sa-help-videos-dialog/sa-help-videos-dialog.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,23 @@ | ||
<h2 mat-dialog-title>{{ data.isEdit ? "Edit Help Video" : "Add Help Video" }}</h2> | ||
<mat-dialog-content> | ||
<form [formGroup]="helpVideoForm"> | ||
<mat-form-field> | ||
<mat-label>Title</mat-label> | ||
<input matInput formControlName="title" required /> | ||
</mat-form-field> | ||
<mat-form-field> | ||
<mat-label>URL</mat-label> | ||
<input matInput formControlName="url" required /> | ||
</mat-form-field> | ||
<mat-form-field> | ||
<mat-label>Description</mat-label> | ||
<textarea matInput formControlName="description"></textarea> | ||
</mat-form-field> | ||
</form> | ||
</mat-dialog-content> | ||
<mat-dialog-actions> | ||
<button mat-button (click)="onCancel()">Cancel</button> | ||
<button mat-button [mat-dialog-close]="helpVideoForm.value" [disabled]="!helpVideoForm.valid"> | ||
{{ data.isEdit ? "Save" : "Add" }} | ||
</button> | ||
</mat-dialog-actions> |
Empty file.
22 changes: 22 additions & 0 deletions
22
...istration/sa-help-video-tab/sa-help-videos-dialog/sa-help-videos-dialog.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,22 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { SaHelpVideosDialogComponent } from './sa-help-videos-dialog.component'; | ||
|
||
describe('SaHelpVideosDialogComponent', () => { | ||
let component: SaHelpVideosDialogComponent; | ||
let fixture: ComponentFixture<SaHelpVideosDialogComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [SaHelpVideosDialogComponent] | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(SaHelpVideosDialogComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
10 changes: 10 additions & 0 deletions
10
...administration/sa-help-video-tab/sa-help-videos-dialog/sa-help-videos-dialog.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,10 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-sa-help-videos-dialog', | ||
standalone: true, | ||
imports: [], | ||
templateUrl: './sa-help-videos-dialog.component.html', | ||
styleUrl: './sa-help-videos-dialog.component.scss' | ||
}) | ||
export class SaHelpVideosDialogComponent {} |
54 changes: 54 additions & 0 deletions
54
...p/src/xforge-common/system-administration/sa-help-video-tab/sa-help-videos.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,54 @@ | ||
<button mat-raised-button (click)="addEditVideoData()">Add Video</button> | ||
<mat-table [dataSource]="dataSource"> | ||
<ng-container matColumnDef="videoName"> | ||
<mat-header-cell *matHeaderCellDef> Video Name </mat-header-cell> | ||
<mat-cell *matCellDef="let element"> | ||
{{ element.videoName }} | ||
</mat-cell> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="videoDescription"> | ||
<mat-header-cell *matHeaderCellDef> Video Description </mat-header-cell> | ||
<mat-cell *matCellDef="let element"> | ||
{{ element.videoDescription }} | ||
</mat-cell> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="url"> | ||
<mat-header-cell *matHeaderCellDef> URL </mat-header-cell> | ||
<mat-cell *matCellDef="let element"> | ||
{{ element.url }} | ||
</mat-cell> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="component"> | ||
<mat-header-cell *matHeaderCellDef> Component </mat-header-cell> | ||
<mat-cell *matCellDef="let element"> | ||
{{ element.component }} | ||
</mat-cell> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="keywords"> | ||
<mat-header-cell *matHeaderCellDef> Keywords </mat-header-cell> | ||
<mat-cell *matCellDef="let element"> | ||
{{ element.keywords }} | ||
</mat-cell> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="edit"> | ||
<mat-header-cell *matHeaderCellDef></mat-header-cell> | ||
<mat-cell *matCellDef="let element"> | ||
<button mat-raised-button (click)="addEditVideoData()">Edit</button> | ||
</mat-cell> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="delete"> | ||
<mat-header-cell *matHeaderCellDef></mat-header-cell> | ||
<mat-cell *matCellDef="let element"> | ||
<button mat-raised-button (click)="addEditVideoData()">Delete</button> | ||
</mat-cell> | ||
</ng-container> | ||
|
||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> | ||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row> | ||
</mat-table> |
47 changes: 47 additions & 0 deletions
47
...p/src/xforge-common/system-administration/sa-help-video-tab/sa-help-videos.component.scss
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,47 @@ | ||
@use 'src/variables'; | ||
@use 'src/breakpoints'; | ||
|
||
.help-controls { | ||
margin: 32px 0; | ||
} | ||
|
||
mat-form-field { | ||
margin-top: 10px; | ||
} | ||
|
||
mat-table { | ||
width: 100%; | ||
} | ||
|
||
.mat-column-tasks { | ||
@include breakpoints.media-breakpoint-down(md) { | ||
display: none; | ||
} | ||
} | ||
|
||
.no-projects-label { | ||
padding-top: 14px; | ||
} | ||
|
||
.connect-cell { | ||
text-align: right; | ||
text-overflow: initial; | ||
} | ||
|
||
.task-label { | ||
font-size: small; | ||
color: variables.$greyLight; | ||
} | ||
|
||
.small-form-field { | ||
width: 130px; | ||
} | ||
|
||
td > mat-checkbox { | ||
margin: 0 1em; | ||
} | ||
|
||
ng-container { | ||
display: flex; | ||
align-items: center; | ||
} |
22 changes: 22 additions & 0 deletions
22
...rc/xforge-common/system-administration/sa-help-video-tab/sa-help-videos.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,22 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { SaHelpVideosComponent } from './sa-help-videos.component'; | ||
|
||
describe('HelpVideosComponent', () => { | ||
let component: SaHelpVideosComponent; | ||
let fixture: ComponentFixture<SaHelpVideosComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [SaHelpVideosComponent] | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(SaHelpVideosComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
25 changes: 25 additions & 0 deletions
25
...App/src/xforge-common/system-administration/sa-help-video-tab/sa-help-videos.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,25 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-sa-help-videos', | ||
templateUrl: './sa-help-videos.component.html', | ||
styleUrl: './sa-help-videos.component.scss' | ||
}) | ||
export class SaHelpVideosComponent { | ||
constructor() {} | ||
displayedColumns: string[] = ['videoName', 'videoDescription', 'url', 'component', 'keywords', 'edit', 'delete']; | ||
dataSource = [ | ||
{ | ||
videoName: 'Video 1', | ||
videoDescription: 'Description for Video 1', | ||
url: 'https://youtube.com', | ||
component: ['Component1'] | ||
} | ||
]; | ||
|
||
componentOptions: string[] = ['Component1', 'Component2', 'Component3']; | ||
|
||
addEditVideoData() { | ||
this.dataSource.push({ videoName: '', videoDescription: '', url: '', component: [] }); | ||
} | ||
} |
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
Oops, something went wrong.