+3
-1
frontend/src/lib/queue.svelte.ts
+3
-1
frontend/src/lib/queue.svelte.ts
···
2
import type { QueueResponse, QueueState, Track } from './types';
3
import { API_URL } from './config';
4
import { APP_BROADCAST_PREFIX } from './branding';
5
6
const SYNC_DEBOUNCE_MS = 250;
7
···
141
142
private isAuthenticated(): boolean {
143
if (!browser) return false;
144
-
return !!localStorage.getItem('session_id');
145
}
146
147
async fetchQueue(force = false) {
···
188
this.revision = data.revision;
189
this.etag = newEtag;
190
191
this.applySnapshot(data);
192
} catch (error) {
193
console.error('failed to fetch queue:', error);
···
2
import type { QueueResponse, QueueState, Track } from './types';
3
import { API_URL } from './config';
4
import { APP_BROADCAST_PREFIX } from './branding';
5
+
import { auth } from './auth.svelte';
6
7
const SYNC_DEBOUNCE_MS = 250;
8
···
142
143
private isAuthenticated(): boolean {
144
if (!browser) return false;
145
+
return auth.isAuthenticated;
146
}
147
148
async fetchQueue(force = false) {
···
189
this.revision = data.revision;
190
this.etag = newEtag;
191
192
+
this.lastUpdateWasLocal = false;
193
this.applySnapshot(data);
194
} catch (error) {
195
console.error('failed to fetch queue:', error);
+3
frontend/src/routes/+layout.svelte
+3
frontend/src/routes/+layout.svelte