Skip to content

Commit

Permalink
visualizer: add button to prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed Nov 16, 2023
1 parent f5362c8 commit 3c1d913
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/topo/global.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ import { Topology } from './topo';
(click)="visualizeFileTLV()">
Visualize TLV File
</button>
<button class="button is-link is-light is-small full-width mt-1"
(click)="visualizeEncodedTLV()">
Visualize Encoded TLV
</button>
</div>
</div>
Expand Down Expand Up @@ -174,4 +178,9 @@ export class TopoGlobalComponent {
async visualizeFileTLV() {
window.visualize(await window.loadfile());
}

async visualizeEncodedTLV() {
const str = prompt('Enter TLV to visualize (hex or base64)');
if (str) window.visualize(str);
}
}

0 comments on commit 3c1d913

Please sign in to comment.