Compare commits
No commits in common. "60557834041b47f448b2e5958da5c1676a509ad0" and "f8344ba1d3101d957c3cb4027da575d3164281f9" have entirely different histories.
6055783404
...
f8344ba1d3
@ -1,13 +1,13 @@
|
||||
<script>
|
||||
import stringify from 'json-stable-stringify';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import {createEventDispatcher} from 'svelte'
|
||||
import createScoresStore from '../../stores/http/http-scores-store.js';
|
||||
import { scrollToTargetAdjusted } from '../../utils/browser';
|
||||
import { opt } from '../../utils/js';
|
||||
import Error from '../Common/Error.svelte';
|
||||
import ScoreServiceSwitcher from './ScoreServiceSwitcher.svelte';
|
||||
import ScoresPager from './ScoresPager.svelte';
|
||||
import SongScore from './SongScore.svelte';
|
||||
import {opt} from '../../utils/js'
|
||||
import {scrollToTargetAdjusted} from '../../utils/browser'
|
||||
import SongScore from './SongScore.svelte'
|
||||
import Error from '../Common/Error.svelte'
|
||||
import ScoreServiceSwitcher from './ScoreServiceSwitcher.svelte'
|
||||
import ScoresPager from './ScoresPager.svelte'
|
||||
import stringify from 'json-stable-stringify'
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import { navigate } from 'svelte-routing';
|
||||
import { SS_CDN_HOST } from '../../network/queues/scoresaber/page-queue';
|
||||
import Difficulty from '../Song/Difficulty.svelte';
|
||||
import {SS_HOST} from '../../network/queues/scoresaber/page-queue'
|
||||
import {navigate} from 'svelte-routing'
|
||||
import Difficulty from '../Song/Difficulty.svelte'
|
||||
|
||||
export let leaderboard = null;
|
||||
export let url = null;
|
||||
@ -31,12 +31,10 @@
|
||||
}
|
||||
|
||||
$: hash = leaderboard?.song?.hash ?? null;
|
||||
$: ssCoverUrl = hash ? `${SS_CDN_HOST}/covers/${encodeURIComponent(hash.toUpperCase())}.png` : null;
|
||||
$: ssCoverUrl = hash ? `${SS_HOST}/imports/images/songs/${encodeURIComponent(hash)}.png` : null;
|
||||
$: beatSaverCoverUrl = leaderboard?.beatMaps?.versions?.[0]?.coverURL ?? null;
|
||||
|
||||
console.log(leaderboard)
|
||||
|
||||
$: preloadImages([{url: ssCoverUrl, priority: 10}, {url: beatSaverCoverUrl, priority: 15}]);
|
||||
$: preloadImages([{url: ssCoverUrl, priority: 10}, {url: beatSaverCoverUrl, priority: 5}]);
|
||||
|
||||
$: coverUrl = loadedImages.length ? (loadedImages.sort((a, b) => a?.priority - b?.priority))[0].url : DEFAULT_IMG;
|
||||
</script>
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { SS_CDN_HOST } from "../../../network/queues/scoresaber/page-queue";
|
||||
import tweened from "../../../svelte-utils/tweened";
|
||||
import { opt } from "../../../utils/js";
|
||||
|
||||
@ -171,7 +170,7 @@ function updateSsBadges(playerData) {
|
||||
if (!opt(playerData, "playerInfo.badges.length")) return null;
|
||||
|
||||
return playerData.playerInfo.badges.map((b) => ({
|
||||
src: `${SS_CDN_HOST}/badges/${b.image}`,
|
||||
src: `https://cdn.scoresaber.com/badges/${b.image}`,
|
||||
title: b.description,
|
||||
}));
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
import ssrConfig from "../../../ssr-config";
|
||||
import { substituteVars } from "../../../utils/format";
|
||||
import { default as createQueue, PRIORITY } from "../http-queue";
|
||||
import { substituteVars } from "../../../utils/format";
|
||||
|
||||
const ACCSABER_API_URL = ssrConfig.proxy + "/https://api.accsaber.com";
|
||||
const ACCSABER_API_URL = "https://api.accsaber.com";
|
||||
const CATEGORIES_URL = ACCSABER_API_URL + "/categories";
|
||||
const RANKING_URL = ACCSABER_API_URL + "/categories/${category}/standings";
|
||||
const PLAYER_SCORES_URL = ACCSABER_API_URL + "/players/${playerId}/scores";
|
||||
|
@ -2,8 +2,7 @@ import ssrConfig from "../../../ssr-config";
|
||||
import { substituteVars } from "../../../utils/format";
|
||||
import { default as createQueue, PRIORITY } from "../http-queue";
|
||||
|
||||
const BEATSAVIOR_API_URL =
|
||||
"https://beat-savior.herokuapp.com/api/livescores/player/";
|
||||
const BEATSAVIOR_API_URL = "https://www.beatsavior.io/api/livescores/player/";
|
||||
const PLAYER_URL = ssrConfig.proxy + "/" + BEATSAVIOR_API_URL + "/${playerId}";
|
||||
|
||||
export default (options = {}) => {
|
||||
|
@ -8,7 +8,6 @@ import { extractDiffAndType } from "../../../utils/scoresaber/format";
|
||||
import { PRIORITY, default as createQueue } from "../http-queue";
|
||||
|
||||
export const SS_HOST = "https://scoresaber.com";
|
||||
export const SS_CDN_HOST = "https://cdn.scoresaber.com";
|
||||
const SS_CORS_HOST = `${ssrConfig.proxy}/${SS_HOST}`;
|
||||
const RANKEDS_URL =
|
||||
SS_CORS_HOST +
|
||||
|
Reference in New Issue
Block a user