mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-07-18 06:49:47 +02:00
Loading animation is now based on the current context (global or application context)
This commit is contained in:
@ -24,6 +24,10 @@ namespace OS {
|
||||
/**
|
||||
* All running processes is stored in this variables
|
||||
*/
|
||||
/**
|
||||
* Current active process ID
|
||||
*/
|
||||
export var pidactive: number = 0;
|
||||
export var processes: GenericObject<BaseModel[]> = {};
|
||||
/**
|
||||
* Create a new process of application or service
|
||||
@ -159,5 +163,19 @@ namespace OS {
|
||||
p.quit(force);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current active application
|
||||
* @export
|
||||
* @returns {BaseModel}
|
||||
*/
|
||||
export function getActiveApp():BaseModel
|
||||
{
|
||||
if(PM.pidactive === 0)
|
||||
{
|
||||
return undefined;
|
||||
}
|
||||
return PM.appByPid(PM.pidactive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user