Add Paddling Pool + Proving Grounds logo and self-host

This commit is contained in:
Kalle
2024-01-13 19:14:01 +02:00
parent 58bbdccee8
commit d67b0534c3
10 changed files with 24 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => {
name: tournament.name,
startTime: databaseTimestampToDate(tournament.startTime).toISOString(),
url: `https://sendou.ink/to/${id}/brackets`,
logoUrl: HACKY_resolvePicture(tournament),
logoUrl: `https://sendou.ink${HACKY_resolvePicture(tournament)}`,
teams: {
checkedInCount: tournament.teams.filter((team) => team.checkedInAt)
.length,

View File

@@ -52,7 +52,7 @@ export interface GetTournamentResponse {
*/
url: string;
/**
* @example "https://abload.de/img/screenshot2023-04-19a2bfv0.png"
* @example "https://sendou.ink/static-assets/img/tournament-logos/itz.png"
*/
logoUrl: string | null;
/**

View File

@@ -12,6 +12,7 @@ import type {
import { TOURNAMENT } from "./tournament-constants";
import { validate } from "~/utils/remix";
import type { PlayedSet } from "./core/sets.server";
import { tournamentLogoUrl } from "~/utils/urls";
export function resolveOwnedTeam({
teams,
@@ -78,13 +79,27 @@ export function isOneModeTournamentOf(
}
export function HACKY_resolvePicture(event: { name: string }) {
if (HACKY_isInviteOnlyEvent(event))
return "https://abload.de/img/screenshot2023-11-25ay1fbc.png";
if (HACKY_isInviteOnlyEvent(event)) {
return tournamentLogoUrl("sf");
}
if (event.name.includes("In The Zone"))
return "https://abload.de/img/screenshot2023-04-19a2bfv0.png";
if (event.name.includes("Paddling Pool")) {
return tournamentLogoUrl("pp");
}
return "https://abload.de/img/screenshot2022-12-15ap0ca1.png";
if (event.name.includes("In The Zone")) {
return tournamentLogoUrl("itz");
}
if (event.name.includes("PICNIC")) {
return tournamentLogoUrl("pn");
}
if (event.name.includes("Proving Grounds")) {
return tournamentLogoUrl("pg");
}
return tournamentLogoUrl("default");
}
// hacky because db query not taking in account possibility of many start times

View File

@@ -357,6 +357,8 @@ export const preferenceEmojiUrl = (preference?: Preference) => {
return `/static-assets/img/emoji/${emoji}.svg`;
};
export const tournamentLogoUrl = (identifier: string) =>
`/static-assets/img/tournament-logos/${identifier}.png`;
export const TIER_PLUS_URL = `/static-assets/img/tiers/plus`;
export const winnersImageUrl = ({

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB