mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-12 09:11:54 +00:00
Add class registry (first pass)
In the first pass I add a `register` method and update `defineComponent` so it calls `register` as well. This made it possible to create a proof-of-concept for registered classes. Additionally ExportService was added to expose registered classes to service scripts. This first pass works, but it would be better if all types of classes (components or otherwise) were registered via the same method.
This commit is contained in:
@@ -49,6 +49,7 @@ const end_process = async (uuid, force) => {
|
||||
};
|
||||
|
||||
class TaskManagerTable extends Component {
|
||||
static ID = 'ui.component.TaskManagerTable';
|
||||
static PROPERTIES = {
|
||||
tasks: { value: [] },
|
||||
};
|
||||
@@ -157,9 +158,11 @@ class TaskManagerTable extends Component {
|
||||
return rows;
|
||||
};
|
||||
}
|
||||
defineComponent('c-task-manager-table', TaskManagerTable);
|
||||
defineComponent(TaskManagerTable);
|
||||
|
||||
class TaskManagerRow extends Component {
|
||||
static ID = 'ui.component.TaskManagerRow';
|
||||
|
||||
static PROPERTIES = {
|
||||
name: {},
|
||||
uuid: {},
|
||||
@@ -291,7 +294,7 @@ class TaskManagerRow extends Component {
|
||||
});
|
||||
}
|
||||
}
|
||||
defineComponent('c-task-manager-row', TaskManagerRow);
|
||||
defineComponent(TaskManagerRow);
|
||||
|
||||
const UIWindowTaskManager = async function UIWindowTaskManager () {
|
||||
const svc_process = globalThis.services.get('process');
|
||||
|
||||
Reference in New Issue
Block a user