aboutsummaryrefslogtreecommitdiff
path: root/public/views/admin.html
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-03-15 21:11:29 -0400
committerBobby <[email protected]>2022-03-15 21:11:29 -0400
commit1ff9e1bda92ba4e568962bde517a489d3ffd9254 (patch)
treec2b708be7bee80d245e13412c46844d862cb3aa5 /public/views/admin.html
parenta4c3fd260d8cdcfd459e9a83db367ed5faea2ca1 (diff)
downloadluciferreeves.github.io-1ff9e1bda92ba4e568962bde517a489d3ffd9254.tar.xz
luciferreeves.github.io-1ff9e1bda92ba4e568962bde517a489d3ffd9254.zip
move js code to separate files, update links
Diffstat (limited to 'public/views/admin.html')
-rw-r--r--public/views/admin.html29
1 files changed, 1 insertions, 28 deletions
diff --git a/public/views/admin.html b/public/views/admin.html
index 94b1f7f..c7daacc 100644
--- a/public/views/admin.html
+++ b/public/views/admin.html
@@ -76,34 +76,7 @@
<script src="/static/assets/js/bootstrap-collapse.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.14.1/firebase-app.js" defer></script>
<script src="https://www.gstatic.com/firebasejs/7.14.1/firebase-auth.js" defer></script>
- <script>
- window.addEventListener("DOMContentLoaded", () => {
- const firebaseConfig = {
- apiKey: "AIzaSyBCmKUnEmm8hLR9ZcFWPYbYiplbP6yUzfU",
- authDomain: "thatcomputerscientist-e9cf2.firebaseapp.com",
- projectId: "thatcomputerscientist-e9cf2",
- storageBucket: "thatcomputerscientist-e9cf2.appspot.com",
- messagingSenderId: "178402875544",
- appId: "1:178402875544:web:8c9d8880d3ef495a5658ed",
- measurementId: "G-JECWWZG5J6"
- };
- firebase.initializeApp(firebaseConfig);
- const signInButton = document.getElementById("signInButton");
- signInButton.addEventListener("click", () => {
- const email = document.getElementById("inputEmail").value;
- const password = document.getElementById("inputPassword").value;
- firebase.auth().signInWithEmailAndPassword(email, password).then((user) => {
- window.location.assign("/admin/dashboard");
- });
- });
- firebase.auth().onAuthStateChanged((user) => {
- if (user) {
- window.location.assign("/admin/dashboard");
- }
- });
- });
-
- </script>
+ <script src="/static/assets/js/pages/admin.js"></script>
</body>
</html> \ No newline at end of file