-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add env variable to set language of the notebook server
Change Miscellanous Options to toggable Advanced Options Add select to choose language Add validation for language format
- Loading branch information
wg102
committed
Jan 21, 2021
1 parent
0fba437
commit 83af673
Showing
8 changed files
with
114 additions
and
18 deletions.
There are no files selected for viewing
29 changes: 19 additions & 10 deletions
29
frontend/src/app/resource-form/form-advanced-options/form-advanced-options.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,13 +1,22 @@ | ||
<div class="group-wrapper" [formGroup]="parentForm"> | ||
<h3> | ||
<input id="collapsible" class="toggle-advanced-options" type="checkbox"> | ||
<label for="collapsible" class="lbl-toggle-advanced-options"> | ||
<fa-icon [icon]="['fas', 'cogs']" class="check"></fa-icon> | ||
{{ "formAdvancedOptions.h3MiscSettings" | translate }} | ||
</h3> | ||
<p> | ||
{{ "formAdvancedOptions.txtMiscSettings" | translate }} | ||
</p> | ||
|
||
<mat-slide-toggle formControlName="shm"> | ||
{{ "formAdvancedOptions.toggleSharedMemory" | translate }} | ||
</mat-slide-toggle> | ||
{{ "formAdvancedOptions.h3AdvancedSettings" | translate }} | ||
</label> | ||
<div class="collapsible-content"> | ||
<div class="content-inner"> | ||
<mat-slide-toggle formControlName="shm" class="matSpacing"> | ||
{{ "formAdvancedOptions.toggleSharedMemory" | translate }} | ||
</mat-slide-toggle> | ||
<mat-form-field class="wide" appearance="outline"> | ||
<mat-label>{{ "formAdvancedOptions.lblSystemLanguage" | translate }}</mat-label> | ||
<mat-select matNativeControl formControlName="language"> | ||
<mat-option *ngFor="let v of languageList" [value]="v.id"> | ||
{{ v.label | translate }} | ||
</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
</div> | ||
</div> | ||
</div> |
57 changes: 57 additions & 0 deletions
57
frontend/src/app/resource-form/form-advanced-options/form-advanced-options.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 |
---|---|---|
@@ -1,3 +1,60 @@ | ||
mat-slide-toggle { | ||
margin-bottom: 0.6rem; | ||
} | ||
|
||
//Simulate the h3 heading for the title | ||
.lbl-toggle-advanced-options{ | ||
color: rgba(0, 0, 0, 0.54); | ||
display: block; | ||
font-size: 1.17em; | ||
margin-block-start: 1em; | ||
margin-block-end: 1em; | ||
margin-inline-start: 0px; | ||
margin-inline-end: 0px; | ||
font-weight: bold; | ||
|
||
transition: all 0.25s ease-out; | ||
cursor: pointer; | ||
} | ||
// Have the + sign | ||
.lbl-toggle-advanced-options::after { | ||
content: '\02795'; /* Unicode character for "plus" sign (+) */ | ||
font-size: 0.8em; | ||
float: right; | ||
margin-left: 0.5em; | ||
transition: transform .2s ease-out; | ||
} | ||
// Have the - sign | ||
.toggle-advanced-options:checked + .lbl-toggle-advanced-options::after { | ||
content: "\2796"; /* Unicode character for "minus" sign (-) */ | ||
} | ||
//Hide the checkbox | ||
.toggle-advanced-options[type='checkbox']{ | ||
display: none; | ||
} | ||
.collapsible-content { | ||
max-height: 0px; | ||
overflow: hidden; | ||
transition: max-height .25s ease-in-out; | ||
} | ||
|
||
.toggle-advanced-options:checked + .lbl-toggle-advanced-options + .collapsible-content { | ||
max-height: 100vh; | ||
} | ||
|
||
.toggle-advanced-options:checked + .lbl-toggle-advanced-options { | ||
border-bottom-right-radius: 0; | ||
border-bottom-left-radius: 0; | ||
} | ||
|
||
.collapsible-content .content-inner { | ||
border: 1px solid rgba(224, 224, 224, 0.45); | ||
border-bottom-left-radius: 7px; | ||
border-bottom-right-radius: 7px; | ||
padding: .5rem 1rem; | ||
} | ||
|
||
.matSpacing { | ||
padding: 0.6em 0em; | ||
} | ||
|
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