Skip to content

Commit

Permalink
fix: loading wiregasm status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
RFbkak37y3kIY committed Dec 16, 2024
1 parent ef80059 commit 0e47286
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
14 changes: 4 additions & 10 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,16 @@

.init-status {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 400px;
min-height: 50px;
height: 400px;
padding: 2rem;
width: 100%;
color: #fff;
padding: 0.5rem;
z-index: 999;
background-color: rgba(255, 255, 255, 0.9);
background-color: #3f51b5;
box-shadow: 0 0 15px #bbb;
}

.init-status>div {
text-align: left;
font-size: 16pt;
height: 50px;
}
8 changes: 3 additions & 5 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,25 @@ import { WiregasmService } from './services/wiregasm.service';
</div>
<div class="init-status-wrapper" [ngClass]="{ready: isReady}" [hidden]="done">
<div class="init-status">
<h1><strong>Wiregasm:</strong></h1>
<div *ngFor="let item of msg">{{item}}</div>
<div *ngFor="let item of msg">WASM-LIB: {{item || '. . .'}}</div>
</div>
</div>
<router-outlet></router-outlet>`,
styleUrls: ['./app.component.scss'],

})
export class AppComponent {
msg: string[] = [];
msg: string[] = [' '];
done = false;
isReady = false;
parsingProgress = 100;
constructor(private wiregasmService: WiregasmService) {
this.wiregasmService.listen().subscribe(data => {
console.log('wiregasmService.listen', data);
if (data?.isParsing) {
this.parsingProgress = +data?.parsingProgress?.toFixed(2);
}
if (data?.status) {
this.msg.push(data.status)
this.msg = [data.status];
}
if (data?.type === 'init') {
this.isReady = true;
Expand Down

0 comments on commit 0e47286

Please sign in to comment.