diff --git a/src/backend/src/services/PuterHomepageService.js b/src/backend/src/services/PuterHomepageService.js index 551864052..d5adb7846 100644 --- a/src/backend/src/services/PuterHomepageService.js +++ b/src/backend/src/services/PuterHomepageService.js @@ -20,6 +20,7 @@ const { PathBuilder } = require("../util/pathutil"); const BaseService = require("./BaseService"); const {is_valid_url} = require('../helpers'); +const { Endpoint } = require("../util/expressutil"); /** * PuterHomepageService serves the initial HTML page that loads the Puter GUI @@ -66,6 +67,20 @@ class PuterHomepageService extends BaseService { } + async ['__on_install.routes'] (_, { app }) { + Endpoint({ + route: '/whoarewe', + methods: ['GET'], + handler: async (req, res) => { + res.json({ + disable_user_signup: this.global_config.disable_user_signup, + disable_temp_users: this.global_config.disable_temp_users, + }); + } + }).attach(app); + } + + /** * This method sends the initial HTML page that loads the Puter GUI and its assets. */ diff --git a/src/gui/src/UI/UIWindowLogin.js b/src/gui/src/UI/UIWindowLogin.js index 1447cc4ae..148eef471 100644 --- a/src/gui/src/UI/UIWindowLogin.js +++ b/src/gui/src/UI/UIWindowLogin.js @@ -70,6 +70,9 @@ async function UIWindowLogin(options){ h += ``; h += ``; // create account link + + // If show_signup_button is undefined, the default behavior is to show it. + // If show_signup_button is set to false, the button will not be shown. if(options.show_signup_button === undefined || options.show_signup_button){ h += `