fixed bug to compile frontend
authorPhiTux <redacted>
Fri, 18 Jul 2025 17:00:34 +0000 (19:00 +0200)
committerPhiTux <redacted>
Fri, 18 Jul 2025 17:00:34 +0000 (19:00 +0200)
frontend/src/lib/DatepickerLogic.svelte
frontend/src/routes/+layout.svelte
frontend/src/routes/login/+page.svelte

index 9e2212fa27f171920967310a26e7ae3e2f1d17a7..650aa20a17f5d2048453ba292f9cd1b86cc0c337 100644 (file)
@@ -2,7 +2,6 @@
        import { API_URL } from '$lib/APIurl.js';
        import { cal } from '$lib/calendarStore.js';
        import axios from 'axios';
-       import { currentUser } from '$lib/helpers.js';
 
        $effect(() => {
                if ($cal.currentMonth || $cal.currentYear) {
                        return;
                }
 
-               if (!$currentUser) {
-                       console.log('User not logged in, skipping loadMarkedDays');
-                       return;
-               }
-
                if (isLoadingMarkedDays) {
                        return;
                }
index ab5f4a4319174b3a28d7481e045b1449428d275f..9ffc4a5c269acd8a640302b79be32f4575f49a49 100644 (file)
@@ -9,7 +9,7 @@
        import { page } from '$app/state';
        import { API_URL } from '$lib/APIurl.js';
        import trianglify from 'trianglify';
-       import { alwaysShowSidenav, currentUser } from '$lib/helpers.js';
+       import { alwaysShowSidenav } from '$lib/helpers.js';
 
        let { children } = $props();
        let inDuration = 150;
@@ -35,7 +35,6 @@
                                        .get(API_URL + '/users/logout')
                                        .then((response) => {
                                                localStorage.removeItem('user');
-                                               $currentUser = null;
                                                goto(`/login?error=${error.response.status}`);
                                        })
                                        .catch((error) => {
index 74dd068a14cbc19bcb34c497ac4f20b8c3a74085..52c3e3362c21361c9f96fd6bd24c244905a8f2ff 100644 (file)
@@ -5,7 +5,6 @@
        import axios from 'axios';
        import { goto } from '$app/navigation';
        import { API_URL } from '$lib/APIurl.js';
-       import { currentUser } from '$lib/helpers';
 
        let show_login_failed = $state(false);
        let show_login_warning_empty_fields = $state(false);
                axios
                        .post(API_URL + '/users/login', { username, password })
                        .then((response) => {
-                               $currentUser = response.data.username;
-
                                if (response.data.migration_started) {
                                        is_migrating = true;
 
git clone https://git.99rst.org/PROJECT