Skip to content

Commit

Permalink
Added Select image to create schema #257
Browse files Browse the repository at this point in the history
Signed-off-by: Jannik Kiesel <jannik.kiesel@fau.de>
  • Loading branch information
jackDS008 committed Jul 18, 2022
1 parent 4e63a22 commit 4fb9e7b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,28 @@
>Schema information
{{ schemaFormGroup.value["name"] }}</mat-card-subtitle
>
<mat-form-field>
<mat-label>IconUrl:</mat-label>
<div>
<input
matInput
type="text"
placeholder="../../assets/images/DIdentity.png"
formControlName="iconUrl"
/>
</mat-form-field>
id="fileInput"
type="file"
hidden
#inputFile
disabled
/>
<button
mat-raised-button
disabled
color="primary"
>
Select image
</button>
<br/>
<mat-icon [ngStyle]="{ color: 'orange', opacity: '1' }"
>warning</mat-icon
>
Adding an image/icon to a proof template is not supported yet. It may
be finished in the future.
</div>
<mat-form-field>
<mat-label>Name:</mat-label>
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ export class CreateSchemaPageComponent implements OnInit {
createSchemaButtonEvent() {
this.schemaTmp.name = this.schemaFormGroup.value['name'];
this.schemaTmp.version = this.schemaFormGroup.value['version'];
this.schemaTmp.iconUrl = this.schemaFormGroup.value['iconUrl'];
this.schemaTmp.iconUrl = '../../assets/images/DIdentity.png';
for (let elem of this.schemaTmp.attributes) {
elem.name =
this.schemaFormGroup.value['attributes'][elem.attribID]['name'];
}
this.schema.name = this.schemaTmp.name;
this.schema.version = this.schemaTmp.version;
this.schema.iconUrl = this.schemaTmp.iconUrl;
this.schema.iconUrl = '../../assets/images/DIdentity.png';

for (let i = 0; i < this.schemaTmp.attributes.length; i++) {
if (i >= this.schema.attributes.length) {
Expand Down

0 comments on commit 4fb9e7b

Please sign in to comment.