Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ <h1>{{headerMessage}}</h1>
</div>
<section class="modal-body">
<section class="information">
<p><b>You are about to delete:</b></p>
<p>You are about to {{ fileAction || 'remove' }} the {{ fileType || 'File' }} <b>{{ fileName }}</b>{{ deleteFrom ? ' from ' + deleteFrom + '.' : '.'}}</p>
<!--
<section class="items">
<div class="item"><b>{{fileType}}</b></div>
<div class="item"><i>{{fileName}}</i></div>
</section>
-->
<p>{{deleteMessage}}</p>
</section>
</section>
<footer>
<button type="button" class="secondary" (click)="activeModal.dismiss()">Cancel</button>
<button type="button" class="delete" (click)="activeModal.close(true)">Delete File</button>
<button type="button" class="delete" (click)="activeModal.close(true)">{{ confirmButtonText || 'Delete File' }}</button>
</footer>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,14 @@ describe('DeleteComponent', () => {
component['fileName'].should.equal('test_name');
component['fileType'].should.equal('File');
}));

it('should not initialise file name if provided', fakeAsync( () => {
component['fileName'] = 'test_name';
component.ngOnInit();

tick();

component['fileName'].should.equal('test_name');
}));
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ export class DeleteComponent implements OnInit {
}

ngOnInit() {
this.fileName = this.deleteFile.displayID;
if (!this.fileName) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you test the else on this please?

this.fileName = this.deleteFile.displayID;

if (this.deleteFile.model) {
this.fileType = 'Model File';
} else if (this.deleteFile.script) {
this.fileType = 'Script File';
} else {
this.fileType = 'File';
if (this.deleteFile.model) {
this.fileType = 'Model File';
} else if (this.deleteFile.script) {
this.fileType = 'Script File';
} else {
this.fileType = 'File';
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,23 @@ <h1 class="flex">My Wallet</h1>
<span>+ Add to Wallet</span>
</button>

<button type="button" class="primary" (click)="issueNewId()">
<span>+ Issue New Identity</span>
<button type="button" class="secondary" (click)="issueNewId()">
<span>+ Issue New ID</span>
</button>
</div>

<div class="identity-title">
<div class="selected-border"></div>
<div class="id">ID Name</div>
<div class="status">Status</div>
</div>
<div class="identity" *ngFor="let id of identities" (click)="setCurrentIdentity(id)">
<div class="identity" *ngFor="let id of myIdentities" (dblclick)="setCurrentIdentity(id)">
<div class="selected-border" [ngClass]="{'selected-border--selected': id === currentIdentity}"></div>
<div class="id">
{{id}}
</div>
<div class="flex" *ngIf="id===currentIdentity">
In use
<svg class="standard-icon" aria-hidden="true">
<use xlink:href="#icon-selected_16"></use>
</svg>
In Use
</div>
<div class="flex" *ngIf="id!==currentIdentity">
<i>In my wallet</i>
Expand All @@ -35,6 +34,36 @@ <h1 class="flex">My Wallet</h1>
</div>
</div>
</div>
<div class="flex">
<div class="flex-container">
<h1 class="flex">All IDs for {{ deployedPackageName }}</h1>
</div>

<div class="identity-title">
<div class="selected-border"></div>
<div class="id cell-24">ID Name</div>
<div class="issued-to cell-24">Issued to</div>
<div class="status cell-24">Status</div>
<div class="actions cell-24"></div>
</div>
<div class="identity" *ngFor="let id of allIdentities">
<div class="selected-border" [ngClass]="{'selected-border--selected': id.name === currentIdentity}"></div>
<div class="id cell-24">
{{ id.name }}
</div>
<div class="issued-to cell-24">
{{ id.participant.$identifier }}
</div>
<div class="status cell-24">
{{ id.state }}
</div>
<div class="cell-24">
<div class="actions" *ngIf="id.name!==currentIdentity&&id.state!=='REVOKED'">
<button class="clear" (click)="revokeIdentity(id)">Revoke</button>
</div>
</div>
</div>
</div>
<app-footer></app-footer>

</section>
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ identity {
display: flex;
flex-direction: column;

.selected-border {
width: $border-width-large;
margin-right: $space-medium;
}

.identity-title {
display: flex;
padding: $space-smedium;

padding-left: 0px;
padding-right: $space-medium;
margin-top: $space-medium;
& > * {
font-weight: bold;
}
Expand All @@ -23,23 +30,36 @@ identity {
flex-basis: 48%;
}

.cell-24 {
flex-basis: 24%;
}

.identity {
background-color: $white;
box-shadow: 0 2px 5px -1px $fifth-highlight;
margin-bottom: $space-medium;
margin-bottom: $space-smedium;
display: flex;
padding: 8px;
height:45px;
cursor: pointer;
padding: 0px;
padding-right: $space-medium;
height: 50px;
line-height: 50px;
cursor: default;
overflow: hidden;
border-radius: $border-width-medium;

&:hover {
.actions {
display: block;
}
}

.selected-border--selected {
background-color: $second-highlight;
}

.actions {
display: none;
text-align: right;
}
}

Expand Down
Loading