Remove comments from backend and web-player source
Strip //, /* */ and XML doc comments from all backend .cs files, and JS/TS/CSS/HTML comments from web-player source (.ts, .svelte, .css), per the project's no-comments convention.
This commit is contained in:
@@ -11,8 +11,6 @@ export const load: PageServerLoad = async ({ url, locals, fetch }) => {
|
||||
const query = url.searchParams.get('q')?.trim() ?? '';
|
||||
const page = Math.max(1, Number(url.searchParams.get('page')) || 1);
|
||||
|
||||
// This page is reachable without a session when anonymous listening is on
|
||||
// (see +layout.server.ts), so `user` may be null here.
|
||||
const user = locals.user;
|
||||
const api = createApiClient({ fetch, accessToken: locals.accessToken ?? undefined });
|
||||
|
||||
|
||||
@@ -273,7 +273,6 @@
|
||||
<PlayButton as="span" size="lg" label="Reproducir" class="group-hover/top:brightness-110" />
|
||||
{/snippet}
|
||||
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<svelte:element
|
||||
this={topResult.kind === 'track' ? 'button' : 'a'}
|
||||
type={topResult.kind === 'track' ? 'button' : undefined}
|
||||
@@ -308,7 +307,6 @@
|
||||
{/if}
|
||||
|
||||
{#if !data.query}
|
||||
<!-- GÉNEROS -->
|
||||
<div class="grid-wide">
|
||||
{#each genreTiles as genre, i (genre.query)}
|
||||
<a
|
||||
|
||||
@@ -23,7 +23,6 @@ async function fetchSidebarPlaylists(
|
||||
});
|
||||
return data?.items ?? [];
|
||||
} catch {
|
||||
// The sidebar shell must render even when the API is unreachable.
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
import { pickGreeting } from '$lib/server/greeting';
|
||||
|
||||
export const load: PageServerLoad = async ({ locals, url, fetch }) => {
|
||||
// This dashboard is personal; an anonymous listener goes to /explore instead.
|
||||
if (!locals.user) redirect(302, '/explore');
|
||||
const user = requireUser(locals, url);
|
||||
const api = createApiClient({ fetch, accessToken: locals.accessToken ?? undefined });
|
||||
|
||||
@@ -182,7 +182,6 @@
|
||||
</div>
|
||||
|
||||
<div class="mt-10 flex flex-col gap-section">
|
||||
<!-- CONTINUAR ESCUCHANDO -->
|
||||
<section>
|
||||
<SectionHeading title="Continuar escuchando" subtitle="Retomalo donde lo dejaste" />
|
||||
{#if continueItems.length > 0}
|
||||
@@ -209,7 +208,6 @@
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
<!-- PLAYLIST DESTACADA -->
|
||||
{#if spotlight}
|
||||
<section>
|
||||
<div
|
||||
@@ -274,7 +272,6 @@
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
<!-- MIXES -->
|
||||
<section>
|
||||
<SectionHeading title="Mixes" subtitle="Generados a partir de lo que más repites" />
|
||||
{#if mixes.length > 0}
|
||||
@@ -299,7 +296,6 @@
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
<!-- POPULARES ESTA SEMANA -->
|
||||
<section>
|
||||
<SectionHeading title="Populares esta semana" subtitle="Lo más escuchado de tu biblioteca" />
|
||||
{#if popularTracks.length > 0}
|
||||
@@ -339,7 +335,6 @@
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
<!-- TUS PLAYLISTS -->
|
||||
<section>
|
||||
<SectionHeading
|
||||
title="Tus playlists"
|
||||
|
||||
@@ -3,8 +3,6 @@ import { json } from '@sveltejs/kit';
|
||||
import { createApiClient, unwrapOrError } from '$lib/server/api';
|
||||
|
||||
export const GET: RequestHandler = async ({ params, locals, fetch }) => {
|
||||
// No hard login gate here: the API itself allows an anonymous request when
|
||||
// AllowAnonymousListening is on, and rejects it with 401 otherwise.
|
||||
const api = createApiClient({ fetch, accessToken: locals.accessToken ?? undefined });
|
||||
const result = await api.GET('/tracks/{id}/stream', {
|
||||
params: { path: { id: params.id } }
|
||||
|
||||
Reference in New Issue
Block a user