Rewards: delivery on Paper/Fabric, admin bundle editor, launcher chips
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DjMbLQujBHunCCu5GpsHaT
This commit is contained in:
18 files changed
+496
-2
No files matched your search
@@ -218,6 +218,8 @@ export async function mockInvoke(cmd: string, args: Record<string, any>): Promis
|
||||
return 21;
|
||||
case 'get_my_level':
|
||||
return { uuid: 'mock-user-1', level: 14, current_xp: 3450, next_level_xp: 5000, progress_pct: 69, title: 'Veteran Adventurer', badges: ['Beta Pioneer', 'Dragon Slayer'], rewards: [] };
|
||||
case 'get_reward_summaries':
|
||||
return { 'quest:q1': ['$250.00', 'Diamond x3'], 'quest:q2': ['+4 claim chunks'] };
|
||||
case 'get_my_quests':
|
||||
return [
|
||||
{ quest: { id: 'q1', title: 'Deepslate Quarry', description: 'Mine 50 deepslate blocks in the caverns.', quest_type: 'daily', category: 'mining', xp_reward: 120, stat_type: 'mine_deepslate', target_count: 50, icon: 'pickaxe', active: true }, current_count: 35, completed: false, claimed: false, expires_at: '2026-10-01T00:00:00Z' },
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
exploration: Compass
|
||||
};
|
||||
|
||||
let extras = $state<Record<string, string[]>>({});
|
||||
|
||||
async function loadData() {
|
||||
invoke<Record<string, string[]>>('get_reward_summaries').then((r) => (extras = r ?? {})).catch(() => {});
|
||||
loading = true;
|
||||
try {
|
||||
const [lvl, quests, achs] = await Promise.all([
|
||||
@@ -227,6 +230,7 @@
|
||||
<p class="ach-desc">{ach.description}</p>
|
||||
<div class="ach-footer">
|
||||
<span class="xp-tag">+{ach.xp_reward} XP</span>
|
||||
{#each extras[`achievement:${ach.id}`] ?? [] as extra}<span class="extra-tag"><Gift size={10} /> {extra}</span>{/each}
|
||||
{#if ach.unlocked}
|
||||
<span class="badge unlocked-tag"><Check size={11} /> Unlocked</span>
|
||||
{:else}
|
||||
@@ -293,6 +297,7 @@
|
||||
<strong>{currentCount}</strong> / {targetCount} ({pct}%)
|
||||
</span>
|
||||
<span class="xp-badge">+{q.xp_reward} XP</span>
|
||||
{#each extras[`quest:${q.id}`] ?? [] as extra}<span class="extra-tag"><Gift size={10} /> {extra}</span>{/each}
|
||||
</div>
|
||||
<div class="progress-bar-bg">
|
||||
<div class="progress-fill" style:width="{pct}%"></div>
|
||||
@@ -626,6 +631,9 @@
|
||||
}
|
||||
.progress-labels {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
justify-content: space-between;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
@@ -754,6 +762,7 @@
|
||||
align-items: center;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
.extra-tag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0.5rem; border-radius: 99px; font-size: 0.7rem; font-weight: 600; color: #fbbf24; background: color-mix(in srgb, #fbbf24 14%, transparent); border: 1px solid color-mix(in srgb, #fbbf24 30%, transparent); }
|
||||
.xp-tag {
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
|
||||
Reference in new issue
Block a user