KernelDeimos 1 рік тому
батько
коміт
61f1caa122
3 змінених файлів з 12 додано та 10 видалено
  1. 3 3
      src/UI/UIWindowTaskManager.js
  2. 7 5
      src/definitions.js
  3. 2 2
      src/services/ProcessService.js

+ 3 - 3
src/UI/UIWindowTaskManager.js

@@ -14,12 +14,11 @@ const UIWindowTaskManager = async function UIWindowTaskManager () {
         is_resizable: true,
         is_droppable: false,
         has_head: true,
-        stay_on_top: true,
         selectable_body: true,
         draggable_body: false,
         allow_context_menu: true,
         allow_native_ctxmenu: true,
-        show_in_taskbar: false,
+        show_in_taskbar: true,
         window_class: 'window-alert',
         dominant: true,
         body_content: '',
@@ -154,7 +153,7 @@ const UIWindowTaskManager = async function UIWindowTaskManager () {
     el_taskarea.classList.add('taskmgr-taskarea');
 
     const tasktable = Table({
-        headings: ['Name', 'Status']
+        headings: ['Name', 'Type', 'Status']
     });
 
     el_taskarea.appendChild(tasktable.el());
@@ -172,6 +171,7 @@ const UIWindowTaskManager = async function UIWindowTaskManager () {
                 },
                 name: item.name
             }));
+            row.add($(`<span>${item.type}</span>`)[0])
             row.add($('<span>open</span>')[0])
             tasktable.add(row);
 

+ 7 - 5
src/definitions.js

@@ -36,24 +36,26 @@ export class Process {
         const _to_type_name = (name) => {
             return name.replace(/Process$/, '').toLowerCase();
         };
-        return this.type || _to_type_name(this.constructor.name) ||
+        return this.type_ || _to_type_name(this.constructor.name) ||
             'invalid'
     }
 };
 
-export class InitProccess extends Process {
+export class InitProcess extends Process {
     static created_ = false;
 
     _construct () {
         this.name = 'Puter';
 
-        if (InitProccess.created_) {
+        if (InitProcess.created_) {
             throw new Error('InitProccess already created');
         }
 
-        InitProccess.created_ = true;
+        InitProcess.created_ = true;
     }
 }
 
 export class PortalProcess extends Process {};
-export class PseudoProcess extends Process {};
+export class PseudoProcess extends Process {
+    _construct () { this.type_ = 'ui' }
+};

+ 2 - 2
src/services/ProcessService.js

@@ -1,4 +1,4 @@
-import { InitProccess, Service } from "../definitions.js";
+import { InitProcess, Service } from "../definitions.js";
 
 // The NULL UUID is also the UUID for the init process.
 const NULL_UUID = '00000000-0000-0000-0000-000000000000';
@@ -9,7 +9,7 @@ export class ProcessService extends Service {
         this.processes_map = new Map();
         this.uuid_to_treelist = new Map();
 
-        const root = new InitProccess({
+        const root = new InitProcess({
             uuid: NULL_UUID,
         });
         this.register_(root);