mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-12 20:40:52 +00:00
add transaction for opening apps
This commit is contained in:
@@ -47,7 +47,7 @@ async function UIDesktop(options) {
|
||||
// start a transaction if we're not in embedded or fullpage mode
|
||||
let transaction;
|
||||
if (!window.is_embedded && !window.is_fullpage_mode) {
|
||||
transaction = new window.Transaction('desktop-load');
|
||||
transaction = new window.Transaction('desktop-is-ready');
|
||||
transaction.start();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ import UIWindow from "../UI/UIWindow.js";
|
||||
* @param {*} options.name - The name of the app to launch.
|
||||
*/
|
||||
const launch_app = async (options)=>{
|
||||
// start a transaction
|
||||
const transaction = new window.Transaction('app-is-ready');
|
||||
transaction.start();
|
||||
|
||||
const uuid = options.uuid ?? window.uuidv4();
|
||||
let icon, title, file_signature;
|
||||
const window_options = options.window_options ?? {};
|
||||
@@ -428,6 +432,9 @@ const launch_app = async (options)=>{
|
||||
svc_process.unregister(process.uuid);
|
||||
});
|
||||
|
||||
// end the transaction
|
||||
transaction.end();
|
||||
|
||||
|
||||
return process;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user