From 132817dbe0f9ec585a8db2c1f15bf3b17c2a44b2 Mon Sep 17 00:00:00 2001 From: tresabhi Date: Sat, 3 Jun 2023 00:32:50 +0000 Subject: [PATCH] feat: disabled image encoding --- package.json | 2 +- src/commands/stats.tsx | 2 +- src/core/blitz/tankopedia.ts | 27 +++++++++++++-------------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 9261c5965..ab9f3d934 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blitzkrieg", - "version": "1.5.1", + "version": "1.5.2", "description": "", "main": "index.js", "type": "module", diff --git a/src/commands/stats.tsx b/src/commands/stats.tsx index 47e4ce267..ee6e30b45 100644 --- a/src/commands/stats.tsx +++ b/src/commands/stats.tsx @@ -39,7 +39,7 @@ import { PlayerClanData } from '../types/playerClanData.js'; export default { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/core/blitz/tankopedia.ts b/src/core/blitz/tankopedia.ts index 876f5b7b3..3889df0c3 100644 --- a/src/core/blitz/tankopedia.ts +++ b/src/core/blitz/tankopedia.ts @@ -1,5 +1,4 @@ import { WargamingResponse } from '../../types/wargamingResponse.js'; -import URLToBase64 from '../ui/URLToBase64.js'; /* "1": { @@ -57,16 +56,16 @@ export const TANK_IDS = Object.keys(tankopedia).map((id) => Number(id)); export const TANKS = TANK_IDS.map((id) => tankopedia[id]); export const TANK_NAMES = TANKS.map((tank) => tank.name); -console.log('Encoding tank images...'); -await Promise.all( - Object.entries(tankopedia).map(async ([, tank]) => { - try { - tank.images.normal = await URLToBase64(tank.images.normal); - } catch (error) { - console.warn( - `Failed to encode tank image for ${tank.images.normal}: ${error}`, - ); - } - }), -); -console.log('Encoded tank images'); +// console.log('Encoding tank images...'); +// await Promise.all( +// Object.entries(tankopedia).map(async ([, tank]) => { +// try { +// tank.images.normal = await URLToBase64(tank.images.normal); +// } catch (error) { +// console.warn( +// `Failed to encode tank image for ${tank.images.normal}: ${error}`, +// ); +// } +// }), +// ); +// console.log('Encoded tank images');