mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
Update initgui.js
This commit is contained in:
parent
4d0e6b4772
commit
3c92cd3198
@ -81,6 +81,16 @@ window.initgui = async function(){
|
|||||||
if(window.api_origin && puter.APIOrigin !== window.api_origin)
|
if(window.api_origin && puter.APIOrigin !== window.api_origin)
|
||||||
puter.setAPIOrigin(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).
|
// 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
|
// 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.
|
// to style or script the page differently for each device type.
|
||||||
|
Loading…
Reference in New Issue
Block a user