From 3c92cd319896b653ce7ba21cda55c8ecf7e63405 Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Fri, 3 May 2024 12:04:38 -0700 Subject: [PATCH] Update initgui.js --- src/initgui.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/initgui.js b/src/initgui.js index c752eaca..e2a20832 100644 --- a/src/initgui.js +++ b/src/initgui.js @@ -81,6 +81,16 @@ window.initgui = async function(){ if(window.api_origin && puter.APIOrigin !== window.api_origin) puter.setAPIOrigin(window.api_origin); + // Print the version to the console + puter.os.version() + .then(res => { + const deployed_date = new Date(res.deploy_timestamp).toLocaleString(); + console.log(`Version: ${(res.version)} | Server: ${(res.location)} | Deployed: ${(deployed_date)}`); + }) + .catch(error => { + console.error("Failed to fetch server info:", error); + }); + // Checks the type of device the user is on (phone, tablet, or desktop). // Depending on the device type, it sets a class attribute on the body tag // to style or script the page differently for each device type.