feat: integrate Firebase for authentication and data management, add GameItem type, and enhance UI with tooltips

This commit is contained in:
2025-02-15 21:54:28 -03:00
parent 62634a426e
commit a12cfc5a2a
17 changed files with 1498 additions and 28 deletions

View File

@@ -3,6 +3,7 @@ import { InvItemInteraction, Pet, Resources } from '../../types/Pet';
import { PetCreationRequest } from '../../types/PetCreationRequest';
import { PetActionGathered, PetUpdateActionRequest } from '../../types/PetAction';
import { PetSkill, Skill } from '../../types/Skills';
import { GameItem } from '../../types/GameItem';
// Get API service instance
const api = ApiService.getInstance();
@@ -52,8 +53,13 @@ export async function putPetItemInteract(petId: string, itemId: number, inter: I
return response.data;
}
export async function getItemInfo(itemId: number): Promise<GameItem> {
const response = await api.get<GameItem>(`/api/v1/gamedata/item/${itemId}`);
return response.data;
}
export async function getItemIcon(itemId: number): Promise<Blob> {
const response = await api.get<Blob>(`/api/v1/gamedata/item/icon/${itemId}`, {
const response = await api.get<Blob>(`/api/v1/gamedata/item/${itemId}/icon`, {
responseType: 'blob',
headers: {
Accept: 'image/png'