Skip to content

Commit

Permalink
taskmanager mini v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chinonso098 committed Nov 4, 2023
1 parent 24c0f18 commit a601d5e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/app/shared/system-service/running.process.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ import { Process } from "src/app/system-files/process";

export class RunningProcessService{

responseToEventCount = 0;
readonly MAX_RESPONSE_TO_EVENT = 1;

private _runningProcesses:Process[]
processListChangeNotify: Subject<void> = new Subject<void>();
closeProcessNotify: Subject<Process> = new Subject<Process>();
focusOnNextProcessNotify: Subject<void> = new Subject<void>();
focusOnCurrentProcessNotify: Subject<number> = new Subject<number>();
focusOutOtherProcessNotify: Subject<number> = new Subject<number>();
restoreOrMinimizeWindowNotify: Subject<number> = new Subject<number>();
responseToEventCount = 0;

constructor(){
this._runningProcesses = []
Expand Down
4 changes: 2 additions & 2 deletions src/app/system-apps/desktop/desktop.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class DesktopComponent implements OnInit, OnDestroy, AfterViewInit{
* The desktop will always repond to the event, but other components will only respond when they are in focus.
* If there is a count of 2 or more(highly unlikely) reponses for a given event, then, ignore the desktop's response
*/
if(evtRespCount >= 2){
if(evtRespCount > this._runningProcessService.MAX_RESPONSE_TO_EVENT){
this._runningProcessService.responseToEventCount = 0
return;
}
Expand Down Expand Up @@ -183,7 +183,7 @@ export class DesktopComponent implements OnInit, OnDestroy, AfterViewInit{
'width': '0px',
'height': '0px',
'transform': 'translate(-100000px, 100000px)',
'z-index': -2,
'z-index': -1,
'opacity':0
}
}
Expand Down
10 changes: 10 additions & 0 deletions src/app/system-apps/taskmanager/taskmanager.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@
table-layout: auto;
}

/* Custom styles for the table */
.table.mini {
border-collapse: collapse; /* Remove spacing between table cells */
min-width: 100%; /* Set the table width to 100% of its container */
margin: 1px 0; /* Add margin above and below the table */
font-family: Arial, sans-serif; /* Set the font family for the table */
table-layout: auto;
}


/* Custom styles for table headers */
.table th {
background-color: #ffffff; /* Header background color */
Expand Down
10 changes: 5 additions & 5 deletions src/app/system-apps/taskmanager/taskmanager.mini.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class='card'>
<div class='card-body'>
<div class='table-responsive'>
<table class='table' *ngIf = 'processes.length > 0' >
<table class='table mini' *ngIf = 'processes.length > 0' >
<tbody>
<tr *ngFor='let process of processes'>
<td style="width: 55%;">
Expand All @@ -17,15 +17,15 @@
</div>
</div>
<span class="basediv">
<span style="display: inline-block; width: 50%;
<span style="display: inline-block; width: 40%;
padding-top:15px; height:50px; margin-left: 0;">
<figure (click)="onMoreDetailsBtnClick()" style="padding-right: 45%;">
<figure (click)="onMoreDetailsBtnClick()" style="padding-right: 15%;">
<img [src]="'osdrive/icons/arrow_down.png'">
<figcaption>More details</figcaption>
</figure>
</span>
<span style="display: inline-block; height:50px; margin-top:10px; width:50%; margin-right: 0;">
<button class="btn btn-primary" style="margin-left: 45%;" >
<span style="display: inline-block; height:50px; margin-top:10px; width: 60%; margin-right: 0;">
<button class="btn btn-primary" style="margin-left: 30%;" >
End task
</button>
</span>
Expand Down

0 comments on commit a601d5e

Please sign in to comment.