mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 23:27:55 -05:00
Add Paddling Pool + Proving Grounds logo and self-host
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = ({
|
||||
|
||||
BIN
public/static-assets/img/tournament-logos/default.png
Normal file
BIN
public/static-assets/img/tournament-logos/default.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
BIN
public/static-assets/img/tournament-logos/itz.png
Normal file
BIN
public/static-assets/img/tournament-logos/itz.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
BIN
public/static-assets/img/tournament-logos/pg.png
Normal file
BIN
public/static-assets/img/tournament-logos/pg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
BIN
public/static-assets/img/tournament-logos/pn.png
Normal file
BIN
public/static-assets/img/tournament-logos/pn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
public/static-assets/img/tournament-logos/pp.png
Normal file
BIN
public/static-assets/img/tournament-logos/pp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
public/static-assets/img/tournament-logos/sf.png
Normal file
BIN
public/static-assets/img/tournament-logos/sf.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 204 KiB |
Reference in New Issue
Block a user