feat: complete in-game commands, GUIs, admin panel fixes, and launcher enhancements
This commit is contained in:
1 parent
a9ff92e1d1
commit
752f0cc43d
34 files changed
+4170
-181
No files matched your search
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { Shield, Users, MapPin, Trash2, Search, ExternalLink, Flag } from '@lucide/svelte';
|
||||
import Modal from '../components/Modal.svelte';
|
||||
import { get, del } from '../lib/api';
|
||||
@@ -17,11 +18,28 @@
|
||||
loading = true;
|
||||
try {
|
||||
const [g, inst] = await Promise.all([
|
||||
get<Guild[]>('/api/admin/guilds'),
|
||||
get<Instance[]>('/api/v1/instances'),
|
||||
get<any[]>('/api/admin/guilds').catch(() => []),
|
||||
get<Instance[]>('/api/admin/instances').catch(() => []),
|
||||
]);
|
||||
guilds = g;
|
||||
instances = inst;
|
||||
guilds = (g || []).map((x: any) => ({
|
||||
id: x.id || '',
|
||||
instance_id: x.instance_id || '',
|
||||
name: x.name || 'Unnamed Guild',
|
||||
tag: x.tag || '',
|
||||
description: x.description || '',
|
||||
motd: x.motd || '',
|
||||
leader_uuid: x.leader_uuid || '',
|
||||
icon_url: x.icon_url || null,
|
||||
banner_url: x.banner_url || null,
|
||||
level: x.level || 1,
|
||||
xp: x.xp || 0,
|
||||
max_claims: x.max_claims || 10,
|
||||
member_count: x.member_count ?? 1,
|
||||
max_members: x.max_members || 50,
|
||||
claims_count: x.claims_count ?? 0,
|
||||
created_at: x.created_at || new Date().toISOString(),
|
||||
}));
|
||||
instances = inst || [];
|
||||
} catch (e) {
|
||||
toastError(e);
|
||||
} finally {
|
||||
@@ -29,7 +47,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
$effect(() => {
|
||||
onMount(() => {
|
||||
loadData();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user