Compare commits

..

No commits in common. "6cbf0a9265462f8c70eac82462af5a537f95fc62" and "bbce59047eb9b61d4136fb3da195d3e046d8c007" have entirely different histories.

2 changed files with 6 additions and 16 deletions

View File

@ -1,22 +1,14 @@
<script> <script>
import { opt } from '../../utils/js'; import {opt} from '../../utils/js'
export let player; export let player;
const avatar = opt(player, 'playerInfo.avatar') $: avatar = opt(player, 'playerInfo.avatar')
// TEMP WORKAROUND UNTIL I MIGRATE TO NEW SS API
export let avatarr;
if (avatar.includes("oculus")) {
avatarr = "https://cdn.scoresaber.com/avatars/oculus.png"
} else {
avatarr = `https://cdn.scoresaber.com/avatars/${player.playerId}.jpg`
}
</script> </script>
{#if avatarr} {#if avatar}
<figure class="image is-24x24" on:click> <figure class="image is-24x24" on:click>
<img src={avatarr} alt=""/> <img src={avatar} alt=""/>
</figure> </figure>
{/if} {/if}

View File

@ -1,6 +1,5 @@
<script> <script>
import { SS_CDN_HOST } from '../../network/queues/scoresaber/page-queue'; import Spinner from '../Common/Spinner.svelte'
import Spinner from '../Common/Spinner.svelte';
export let playerInfo; export let playerInfo;
export let isLoading = false; export let isLoading = false;
@ -11,8 +10,7 @@
<span class="no-image">?</span> <span class="no-image">?</span>
{#if playerInfo && playerInfo.avatar} {#if playerInfo && playerInfo.avatar}
<!-- TEMP WORKAROUND UNTIL I MIGRATE TO NEW SS API --> <img src={playerInfo.avatar} class="avatar" alt="" />
<img src={playerInfo.avatar.replace("https://new.scoresaber.com/api/static", SS_CDN_HOST)} class="avatar" alt="" />
{/if} {/if}
<span class="spinner"> <span class="spinner">
<Spinner width="100%" height="100%"/> <Spinner width="100%" height="100%"/>