Compare commits

...

3 Commits

Author SHA1 Message Date
cec4fe8905 Revert prerender hack that ignored 404s 2025-10-30 10:26:16 -07:00
f28b963ba3 Merge commit '2d8d6ca' 2025-10-30 10:23:45 -07:00
2d8d6cae70 Fix 404s 2025-10-30 10:23:00 -07:00
4 changed files with 6 additions and 29 deletions

View File

@ -16,9 +16,9 @@
<div class="absolute -inset-6 bg-gradient-to-tr from-neon/20 via-transparent to-neon-fuchsia/20 blur-2xl rounded-3xl"></div>
<div class="relative card-surface p-6 sm:p-8">
<div class="grid grid-cols-2 gap-4">
<a href="/tools/beatleader-compare" class="rounded-lg bg-black/30 ring-1 ring-white/10 p-4 block hover:ring-white/20 transition">
<a href="/tools/compare-histories" class="rounded-lg bg-black/30 ring-1 ring-white/10 p-4 block hover:ring-white/20 transition">
<div class="text-sm text-muted">Tool</div>
<div class="mt-1 text-2xl font-mono">BeatLeader Compare</div>
<div class="mt-1 text-2xl font-mono">Compare PlayerHistories</div>
<div class="mt-1 text-sm text-muted">A vs B: songs A played that B has not</div>
</a>

View File

@ -1,12 +0,0 @@
import { dev } from '$app/environment';
import { error } from '@sveltejs/kit';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async () => {
if (!dev) {
throw error(404, 'Not found');
}
return {};
};

View File

@ -30,7 +30,7 @@
For this app, I explored three ways to access your BeatLeader data: Steam, OAuth, or a websitestyle session.
</p>
<p>
I wanted tools like <a href="/tools/beatleader-compare">Compare Players</a> to show unranked star ratings when your BeatLeader account is a supporter and <code>ShowAllRatings</code> is enabled. That turns out to not be possible without implementing Steam ticket handling using the Steamworks SDK. <strong>The rest of the notes here were written before I realized that.</strong>
I wanted tools like <a href="/tools/compare-histories">Compare Players</a> to show unranked star ratings when your BeatLeader account is a supporter and <code>ShowAllRatings</code> is enabled. That turns out to not be possible without implementing Steam ticket handling using the Steamworks SDK. <strong>The rest of the notes here were written before I realized that.</strong>
</p>
@ -97,7 +97,7 @@
<li><code>scp:offline_access</code> to refresh your session without reprompting (optional).</li>
</ul>
<p>
You can still login with OAuth when needed: <a class="btn-neon" href="/auth/beatleader/login?redirect_uri=%2Ftools%2Fbeatleader-compare">Login with BeatLeader (OAuth)</a>
You can still login with OAuth when needed: <a class="btn-neon" href="/auth/beatleader/login?redirect_uri=%2Ftools%2Fcompare-histories">Login with BeatLeader (OAuth)</a>
</p>
<p>
After OAuth login, we attempt to enable <code>ShowAllRatings</code> automatically. If your BL account is not a supporter, BL will ignore it.
@ -142,7 +142,7 @@
<h2 id="setup">OAuth App Setup (for developers)</h2>
<ol>
<li>
Configure BeatLeader OAuth credentials here: <a href="/tools/beatleader-oauth">BL OAuth Setup</a>.
Configure BeatLeader OAuth credentials here: <strike>BL OAuth Setup</strike>.
If you already have credentials, you can paste them there.
</li>
<li>

View File

@ -6,18 +6,7 @@ const config = {
// Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
adapter: adapter(),
prerender: {
handleHttpError: ({ status, path }) => {
if (status === 404) {
console.warn(`Skipping prerender of ${path} (expected 404)`);
return;
}
throw new Error(`${status} ${path}`);
}
}
}
kit: { adapter: adapter() }
};
export default config;