Skip to content

Commit b4a89d6

Browse files
committed
Reapply "Merge branch 'main' of https://github.com/UTDallasEPICS/Soccer-Robots"
This reverts commit c450f88.
1 parent f336cc3 commit b4a89d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2453
-402
lines changed

components/Button.vue

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

components/NavBars/BottomNavBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<p class="nav-item dark:text-[#C0C0C0]" v-if="isLoggedIn" @click="openChangeUsername"> Change Username </p>
1616
</div>
1717
<div class="nav-item" v-if="isAdmin" @click="openAdminPanel">Admin</div>
18-
<div class="nav-login"> <TopRightNavbar /> </div>
18+
<div> <Profile /> </div>
1919
</div>
2020
</div>
2121
<!-- overlays -->
Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,25 @@
2727
</template>
2828

2929
<script setup>
30-
const goToLogin = () => {
31-
window.location.href = '/api/login';
30+
const goToLogin = async () => {
31+
32+
const email = prompt("Please enter your email address:");
33+
if (!email) {
34+
alert("Email is required to log in.");
35+
return;
36+
}
37+
38+
try {
39+
await $fetch('/api/login-request', {
40+
method: 'POST',
41+
body: { email }
42+
});
43+
alert("Login link sent! Please check your email.");
44+
} catch (error) {
45+
console.error("Error requesting login link:", error);
46+
alert("Failed to send login link. Please try again later.");
47+
}
48+
3249
};
3350
3451
const sruser = useCookie('sruser');

components/NavBars/TopRightNavbar.vue

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)