Skip to content

Commit

Permalink
minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
chinonso098 committed Oct 21, 2023
1 parent bcb7a4a commit 24df770
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 25 deletions.
1 change: 0 additions & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<cos-desktop>
<cos-filemanager> </cos-filemanager>
<!-- <cos-jsdos> </cos-jsdos> -->
<ng-container #processContainerRef> </ng-container>

<cos-taskbar>
Expand Down
5 changes: 2 additions & 3 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ export class AppComponent implements OnDestroy, AfterViewInit {

const componentToDelete = this._componentReferenceService.getComponentReference(eventData.getProcessId);
this._componentRefView = componentToDelete.hostView;

// eslint-disable-next-line prefer-const
let iVCntr = this.itemViewContainer.indexOf(this._componentRefView);

const iVCntr = this.itemViewContainer.indexOf(this._componentRefView);
this.itemViewContainer.remove(iVCntr);

this._runningProcessService.removeProcess(eventData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
<li taskBarEntryHighlight *ngFor="let rProcess of runningProcess">
<cos-taskbarentry [taskBarPid]="rProcess.getProcessId" [taskBarIconImgUrl]="rProcess.getIcon" [taskBarIconName]="rProcess.getProcessName" (restoreOrMinizeWindowEvent)="restoreOrMinizeWindow($event)"> </cos-taskbarentry>
</li>
<!-- <cos-taskbarentry [taskBarIconImgUrl]="" [taskBarIconTitle]="" > </cos-taskbarentry> -->
</ol>
15 changes: 1 addition & 14 deletions src/app/user-apps/jsdos/jsdos.component.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
<!--
<cos-window [runningProcessID]="100">
<div #doswindow></div>
</cos-window> -->

<!-- <div #doswindow class="canvas" style="height:640px; width:480px; left:50%; position: absolute;"></div> -->


<!-- <div #doswindow class="canvas" style="height:640px; width:480px; left:50%; position: relative; top:15px; left:0px"></div> try this-->


<cos-window [runningProcessID]="this.processId">
<cos-window [runningProcessID]="this.processId" [processAppIcon]="this.icon" [processAppName]="this.name">

<div #doswindow class="canvas" style="height:800px; width:600px; position: relative;" ></div>

Expand Down
13 changes: 7 additions & 6 deletions src/app/user-apps/jsdos/jsdos.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class JsdosComponent implements BaseComponent, OnInit, OnDestroy, AfterVi

name= 'jsdos';
hasWindow = true;
icon = '';
icon = '/osdrive/icons/js-dos-logo.png';
processId = 0;
type = ComponentType.userComponent;
displayName = 'JS-Dos';
Expand All @@ -54,6 +54,8 @@ export class JsdosComponent implements BaseComponent, OnInit, OnDestroy, AfterVi

ngOnInit(): void {
this._fileInfo = this._triggerProcessService.getLastProcessTrigger();
//this.icon = this._fileInfo.getIcon;
this.name = this._fileInfo.getFileName;
}

async ngAfterViewInit() {
Expand All @@ -70,17 +72,16 @@ export class JsdosComponent implements BaseComponent, OnInit, OnDestroy, AfterVi
URL.revokeObjectURL(this._fileInfo.getDataPath);

}, 1500);

}


async ngOnDestroy(): Promise<void> {
ngOnDestroy(): void {

console.log('clean up:')
if(this.dosOptions){

if(this._ci != undefined)
await this._ci.exit();

this._ci.exit();
}
}


Expand Down

0 comments on commit 24df770

Please sign in to comment.