Skip to content

Commit

Permalink
Merge pull request #25 from ThinLiquid:main
Browse files Browse the repository at this point in the history
✨ feature: guest mode
  • Loading branch information
ThinLiquid authored Jul 20, 2023
2 parents c58e159 + 0798fc5 commit 22463e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions FlowOS/public/builtin/apps/scripts/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,12 @@ const handleForm = async (form, type) => {
handleAuthSignup(signup_data.user, form.elements.username.value);
break;
}
};

window.guest = async () => {
await auth.signInAnonymously(_auth).catch((error) => {
handleAuthError(error, 0);
handleAuthError(error, 1);
});
window.reboot();
};
4 changes: 4 additions & 0 deletions FlowOS/public/builtin/apps/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ <h1>Create a FlowID.</h1>
<a href="#" onclick="switchType()">already have an account?</a>
</div>
</div>
<br/>
<div style="text-align: center;">
<button onclick="window.guest()">Use as Guest</button>
</div>
</div>
<div class="page3">
<h1>Setup Finished!</h1>
Expand Down

0 comments on commit 22463e9

Please sign in to comment.