feat: complete in-game commands, GUIs, admin panel fixes, and launcher enhancements

This commit is contained in:
scoped committed 2026-09-29 12:14:16 -04:00
1 parent a9ff92e1d1
commit 752f0cc43d
34 files changed
+4170 -181

No files matched your search

+17 -2
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import { onMount } from 'svelte';
import { Plus, Pencil, Trash2, Trophy, Sparkles, Shield, Swords, Pickaxe, Compass, Users } from '@lucide/svelte';
import Modal from '../components/Modal.svelte';
import { get, post, put, del } from '../lib/api';
@@ -61,7 +62,21 @@
async function loadAchievements() {
loading = true;
try {
achievements = await get<Achievement[]>('/api/admin/achievements');
const res = await get<any[]>('/api/admin/achievements');
achievements = (res || []).map((a: any) => ({
id: a.id || '',
title: a.title || '',
description: a.description || '',
category: a.category || 'progression',
xp_reward: a.xp_reward || 0,
frame_type: a.frame_type || a.icon_frame || 'task',
icon_item: a.icon_item || 'diamond_pickaxe',
icon_bg: a.icon_bg || 'deepslate',
icon_border: a.icon_border || 'gold',
stat_type: a.stat_type || a.requirement_key || 'blocks_broken',
target_count: a.target_count || a.requirement_value || 1,
secret: !!a.secret,
}));
} catch (e) {
toastError(e);
} finally {
@@ -69,7 +84,7 @@
}
}
$effect(() => {
onMount(() => {
loadAchievements();
});