npm run format

This commit is contained in:
2025-01-09 16:02:17 +01:00
parent 7b1dcf7ce3
commit fb18841c91
13 changed files with 39 additions and 70 deletions

View File

@ -17,27 +17,18 @@
<script setup lang="ts" async>
import config from '@/application/config'
import type { HttpResponse, MapObject } from '@/application/types'
import type { BaseStorage } from '@/storage/baseStorage'
import { CharacterHairStorage, CharacterTypeStorage, MapObjectStorage, MapStorage, SpriteStorage, TileStorage } from '@/storage/storages'
// import type { Map } from '@/application/types'
import { useGameStore } from '@/stores/gameStore'
import { ref } from 'vue'
import type { BaseStorage } from '@/storage/baseStorage'
import {
CharacterHairStorage,
CharacterTypeStorage,
MapObjectStorage,
MapStorage, SpriteStorage,
TileStorage
} from '@/storage/storages'
const gameStore = useGameStore()
const totalItems = ref(0)
const currentItem = ref(0)
async function downloadAndStore<T extends { id: string }>(
endpoint: string,
storage: BaseStorage<T>
) {
async function downloadAndStore<T extends { id: string }>(endpoint: string, storage: BaseStorage<T>) {
const request = await fetch(`${config.server_endpoint}/cache/${endpoint}`)
const response = (await request.json()) as HttpResponse<T[]>