Skip to content

Created a simple GUI system concept. #78

Description

@Wazzaps

So this is my concept, it's basically an HTTP server, which serves some specific files that the client can access.

Spec:

HTTP server has two files.

  • auth: iframe'd in client, has to have a JS function called auth(user, pass, callback), It should contact the server securely and get a token, which should be used like this: callback({token: tokenFromServer}). That will be stored for this session by the client, accesible inside the actual app as authObj.token (the object passed to the callback is authObj).
    • Example:
<script>
    function auth (usr, pass, cb) {
        if (usr == "root" && pass == "toor") {
            cb({token: "123456789"});
            return true;
        } else {
            cb({token: ""});
            return true; // This desktop manager supports login inside, so we can connect anyway.
        }
    }
</script>
  • main: Ideally this file should be used for redirection to the app/desktop manager, but can be used for anything.
    • Example:
<script>
    location = "exampleDE/index.html?fullscreen"
</script>
  • Extras:
    • Use ?fullscreen at the url for auto fullscreen
    • Create the "nos-gui" enviromental variable for some power options such as: (In JSON format)
      • "fullscreenDisable": Disable fullscreen even if requested by app.
      • "kiosk": Disable Alt+F4, Alt+Tab, and close events. Opens NW's kiosk mode. See "instructions_for_kiosk.txt" in included example for more.
      • Example: "nos-gui"={"fullscreenDisable":true,"kiosk":false}

Download example:

Linky

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions