Skip to content

Commit

Permalink
Login page on startup, README logo fix (#189)
Browse files Browse the repository at this point in the history
* Display Login Page on StartUp for first time users 1/2 (#185)

* Added checklog script

* checklog to check if user logged in

checklog script checks if user has already logged in before to show log in page on start

* Redirect to popup after user enters login info

* Readme logo fix (#188)

* Removed logo

* Fixed the colour of the log in button

* Udated Login Page

* Update README.md

Co-authored-by: Pranjal Prasoon <[email protected]>
Co-authored-by: Vishal Lokare <[email protected]>
Co-authored-by: Pranjal Prasoon <[email protected]>
Co-authored-by: Sumanth Kotikalapudi <[email protected]>
Co-authored-by: Aditya Srinivas Menon <[email protected]>

Co-authored-by: Neeraj P Yetheendran <[email protected]>
Co-authored-by: D PRIYATHAM <[email protected]>
Co-authored-by: Pranjal Prasoon <[email protected]>
Co-authored-by: Pranjal Prasoon <[email protected]>
Co-authored-by: Sumanth Kotikalapudi <[email protected]>
Co-authored-by: Aditya Srinivas Menon <[email protected]>
  • Loading branch information
7 people authored Oct 9, 2022
1 parent 6e67fa1 commit 2e67591
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
![Firebase](https://camo.githubusercontent.com/ea0283d34b92d1905070c14ffe1c48412fef80c44232679c0657db176708403f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46697265626173652d79656c6c6f773f7374796c653d666f722d7468652d6261646765266c6f676f3d666972656261736526)

<p align="center">
<a href="https://github.com/vishal-lokare/AutoJoomer/"><img src="https://github.com/vishal-lokare/AutoJoomer/blob/main/src/images/icon.jpeg?raw=true" alt="AutoJoomer" width="100" height="100"></a><br>
<a href="https://github.com/vishal-lokare/AutoJoomer/"><img src="https://github.com/vishal-lokare/AutoJoomer/blob/main/src/images/icon.png" alt="AutoJoomer" width="100" height="100"></a><br>
<a href="https://github.com/vishal-lokare/AutoJoomer/"><b>AutoJoomer</b></a>
<br><br><hr>
<p> AutoJoomer extension on Chrome Webstore - <a href="https://chrome.google.com/webstore/detail/autojoomer/gbclbcfjcjnajkkibmadammhkbmgbiao">Add to your browser</a></p>
Expand Down
7 changes: 7 additions & 0 deletions src/js/checklog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
chrome.storage.local.get(["AutoJoomerUsername"], function (result) { //checks if user has logged in to show login page on opening popup
if (!result.AutoJoomerUsername) {
window.open("/src/pages/login/login.html", "_self");
} else {

}
});
5 changes: 3 additions & 2 deletions src/js/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
<script src="popup.js"></script>
<script src="checklog.js"></script>
<script src="popup.js" async="async"></script> <!-- async to run checklog before popup.js -->

</head>
<style>
Expand Down Expand Up @@ -352,4 +353,4 @@

</body>

</html>
</html>
5 changes: 4 additions & 1 deletion src/pages/login/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ btn.addEventListener("click", () => {
);
btn.disabled = true;
btn.innerText = "Saved";
setTimeout(() => { //redirecting to popup.html
window.open("/src/js/popup.html", "_self");
}, 1000);
} else {
alert("Roll number does not exist");
return;
}
});
});

0 comments on commit 2e67591

Please sign in to comment.