-
Notifications
You must be signed in to change notification settings - Fork 24
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
117 changed files
with
4,904 additions
and
3,854 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
5.21.0 | ||
5.21.1 |
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
7 changes: 2 additions & 5 deletions
7
...p/site/src/app/login/login-google-user-not-found/login-google-user-not-found.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 |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-login-google-user-not-found', | ||
templateUrl: './login-google-user-not-found.component.html', | ||
styleUrls: ['./login-google-user-not-found.component.scss'] | ||
}) | ||
export class LoginGoogleUserNotFoundComponent implements OnInit { | ||
constructor() {} | ||
|
||
ngOnInit() {} | ||
export class LoginGoogleUserNotFoundComponent { | ||
} |
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
47 changes: 47 additions & 0 deletions
47
src/main/webapp/site/src/app/notebook/notebook-item/notebook-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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<mat-card class="notebook-item" | ||
(click)="doSelect($event)" | ||
(keyup.enter)="doSelect($event)" | ||
role="button" | ||
tabindex="0"> | ||
<mat-card-content class="content" [ngClass]="{'text-only': !item.content.attachments.length}"> | ||
<div *ngIf="item.content.attachments.length > 0" | ||
class="attachment-content" | ||
style="background-image: url('{{item.content.attachments[0].iconURL}}')"> | ||
</div> | ||
<div *ngIf="item.content.text" | ||
class="text-content mat-body-1" | ||
style="color: {{label.color}}"> | ||
{{item.content.text}} | ||
</div> | ||
</mat-card-content> | ||
<mat-card-actions class="dark-theme"> | ||
<div class="actions app-bar" | ||
fxLayoutAlign="start center" | ||
style="background-color: {{color}}"> | ||
<span class="location" fxLayoutAlign="start center"> | ||
<mat-icon>place</mat-icon><span class="mat-body-1">{{getItemNodePosition()}}</span> | ||
</span> | ||
<span fxFlex></span> | ||
<button mat-icon-button | ||
*ngIf="canDeleteNotebookItem()" | ||
i18n-aria-label | ||
attr.aria-label="Delete {{label.singular}}" | ||
i18n-matTooltip | ||
attr.matTooltip="Delete {{label.singular}}" | ||
matTooltipPosition="above" | ||
(click)="doDelete($event)"> | ||
<mat-icon>delete</mat-icon> | ||
</button> | ||
<button mat-icon-button | ||
*ngIf="canReviveNotebookItem()" | ||
i18n-aria-label | ||
attr.aria-label="Revive {{label.singular}}" | ||
i18n-matTooltip | ||
attr.matTooltip="Revive {{label.singular}}" | ||
matTooltipPosition="above" | ||
(click)="doRevive($event)"> | ||
<mat-icon>undo</mat-icon> | ||
</button> | ||
</div> | ||
</mat-card-actions> | ||
</mat-card> |
105 changes: 105 additions & 0 deletions
105
src/main/webapp/site/src/app/notebook/notebook-item/notebook-item.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,105 @@ | ||
@import '~@angular/material/theming', | ||
'~style/abstracts/variables', | ||
'~style/themes/default'; | ||
|
||
$light-gray: map-get($mat-grey, 300); | ||
|
||
.notebook-item { | ||
transition: box-shadow 250ms; | ||
margin: 0; | ||
padding: 0; | ||
cursor: pointer; | ||
|
||
&:hover, &:focus { | ||
@include mat-elevation(4); | ||
outline: none; | ||
} | ||
|
||
&:active { | ||
outline: none; | ||
} | ||
} | ||
|
||
.content { | ||
height: 200px; | ||
padding: 0; | ||
background-color: $light-gray; | ||
border-top-left-radius: $card-border-radius; | ||
border-top-right-radius: $card-border-radius; | ||
} | ||
|
||
.attachment-content, .text-content { | ||
position: absolute; | ||
left: 0; | ||
right: 0; | ||
} | ||
|
||
.attachment-content { | ||
background-repeat: no-repeat; | ||
border-top-left-radius: $card-border-radius; | ||
border-top-right-radius: $card-border-radius; | ||
background-position: center top; | ||
background-size: cover; | ||
top: 0; | ||
bottom: 0; | ||
} | ||
|
||
.text-content { | ||
bottom: 0; | ||
padding: 8px; | ||
font-weight: 500; | ||
overflow: hidden; | ||
max-height: 120px; | ||
min-height: 56px; | ||
background-color: rgba(255,255,255,0.95); | ||
border-top: 1px solid $light-gray; | ||
|
||
&:after { | ||
content: ""; | ||
text-align: right; | ||
position: absolute; | ||
bottom: 0; | ||
right: 0; | ||
width: 100%; | ||
height: 0.8em; | ||
background: linear-gradient(180deg,hsla(0,0%,100%,0),rgba(255,255,255,0.95) 100%); | ||
} | ||
} | ||
|
||
.text-only { | ||
&:after { | ||
content: "note"; | ||
font-family: 'Material Icons'; | ||
font-weight: normal; | ||
font-style: normal; | ||
display: inline-block; | ||
line-height: 1; | ||
text-transform: none; | ||
letter-spacing: normal; | ||
word-wrap: normal; | ||
white-space: nowrap; | ||
direction: ltr; | ||
-webkit-font-smoothing: antialiased; | ||
text-rendering: optimizeLegibility; | ||
-moz-osx-font-smoothing: grayscale; | ||
font-feature-settings: 'liga'; | ||
font-size: 80px; | ||
color: map-get($default-colors, disabled-text); | ||
} | ||
} | ||
|
||
.location { | ||
opacity: 0.9; | ||
padding: 8px 0; | ||
} | ||
|
||
mat-card-actions { | ||
padding-top: 0; | ||
} | ||
|
||
.actions { | ||
margin: 0; | ||
padding: 0 8px; | ||
border-bottom-left-radius: $card-border-radius; | ||
border-bottom-right-radius: $card-border-radius; | ||
} |
68 changes: 68 additions & 0 deletions
68
src/main/webapp/site/src/app/notebook/notebook-item/notebook-item.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,68 @@ | ||
import { HttpClientTestingModule } from "@angular/common/http/testing"; | ||
import { TestBed } from "@angular/core/testing"; | ||
import { UpgradeModule } from "@angular/upgrade/static"; | ||
import { configureTestSuite } from "ng-bullet"; | ||
import { Subscription } from "rxjs"; | ||
import { AnnotationService } from "../../../../../wise5/services/annotationService"; | ||
import { ConfigService } from "../../../../../wise5/services/configService"; | ||
import { NotebookService } from "../../../../../wise5/services/notebookService"; | ||
import { ProjectService } from "../../../../../wise5/services/projectService"; | ||
import { SessionService } from "../../../../../wise5/services/sessionService"; | ||
import { StudentAssetService } from "../../../../../wise5/services/studentAssetService"; | ||
import { StudentDataService } from "../../../../../wise5/services/studentDataService"; | ||
import { TagService } from "../../../../../wise5/services/tagService"; | ||
import { UtilService } from "../../../../../wise5/services/utilService"; | ||
import { NotebookItemComponent } from "./notebook-item.component"; | ||
|
||
let component: NotebookItemComponent; | ||
|
||
describe('NotebookItemComponent', () => { | ||
configureTestSuite(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [ HttpClientTestingModule, UpgradeModule ], | ||
declarations: [ NotebookItemComponent ], | ||
providers: [ | ||
AnnotationService, | ||
ConfigService, | ||
NotebookService, | ||
ProjectService, | ||
SessionService, | ||
StudentAssetService, | ||
StudentDataService, | ||
TagService, | ||
UtilService | ||
] | ||
}); | ||
}); | ||
|
||
beforeEach(() => { | ||
const fixture = TestBed.createComponent(NotebookItemComponent); | ||
component = fixture.componentInstance; | ||
component.notebookUpdatedSubscription = new Subscription(); | ||
}); | ||
|
||
isItemInGroup(); | ||
isNotebookItemActive(); | ||
}); | ||
|
||
function isItemInGroup() { | ||
it('should check if an notebook item is in group when it is not in the group', () => { | ||
component.item = { groups: ['Group A'] }; | ||
expect(component.isItemInGroup('Group B')).toEqual(false); | ||
}); | ||
it('should check if an notebook item is in group when it is in the group', () => { | ||
component.item = { groups: ['Group A'] }; | ||
expect(component.isItemInGroup('Group A')).toEqual(true); | ||
}); | ||
} | ||
|
||
function isNotebookItemActive() { | ||
it('should check if a notebook item is active when it is not active', () => { | ||
component.item = { serverDeleteTime: 1607704074794 }; | ||
expect(component.isNotebookItemActive()).toEqual(false); | ||
}); | ||
it('should check if a notebook item is active when it is active', () => { | ||
component.item = { serverDeleteTime: null }; | ||
expect(component.isNotebookItemActive()).toEqual(true); | ||
}); | ||
} |
Oops, something went wrong.