feat: proxy avatars

This commit is contained in:
TrèsAbhi committed 2026-01-02 20:04:19 -06:00
1 parent 4b8e73fa57
commit 437bee4a85
9 files changed
+47 -65

No files matched your search

@@ -16,4 +16,5 @@ export abstract class AbstractAPI {
abstract tank(id: string): Promise<Tank>;
abstract avatars(): Promise<CatalogItemAccessor[]>;
abstract avatar(id: string): Promise<CatalogItemAccessor>;
}
+1 -1
View File
@@ -6,7 +6,7 @@ import { AbstractAPI } from "./abstract";
export class ClientAPI extends AbstractAPI {
tanks() {
return fetchPB("/api/tanks.pb", Tanks);
return fetchPB("/api/tanks/all.pb", Tanks);
}
tankList() {
@@ -150,4 +150,8 @@ export class ServerAPI extends AbstractAPI {
async avatars() {
return this.metadata.group("ProfileAvatarEntity");
}
async avatar(id: string) {
return this.metadata.item(`ProfileAvatarEntity.${id}`);
}
}
+2 -55
View File
@@ -17,66 +17,13 @@ export const tools: Record<string, Tool> = {
button: "purple",
significant: true,
},
players: {
id: "players",
disabled: true,
button: "blue",
},
compare: {
id: "compare",
button: "crimson",
},
performance: {
id: "performance",
button: "jade",
},
charts: {
id: "charts",
disabled: true,
button: "bronze",
},
playlist: {
id: "playlist",
button: "tomato",
},
mixer: {
id: "mixer",
button: "gray",
},
guess: {
id: "guess",
button: "cyan",
},
gallery: {
id: "gallery",
avatars: {
id: "avatars",
button: "gold",
},
session: {
id: "session",
button: "blue",
},
discord: {
id: "discord",
href: "https://discord.com/application-directory/1097673957865443370",
button: "indigo",
},
tier_list: {
id: "tier-list",
strings: "tier_list",
button: "orange",
},
embed: {
id: "embed",
button: "red",
},
api: {
id: "api",
disabled: true,
button: "bronze",
},
more: {
id: "more",
href: "https://discord.gg/nDt7AjGJQH",
button: "plum",
},
};