fix: resolve all remaining audit failures across rust, svelte, and java

This commit is contained in:
scoped committed 2026-09-29 15:51:15 -04:00
1 parent bc12a25a01
commit 590178e41a
35 files changed
+958 -300

No files matched your search

@@ -54,7 +54,7 @@
savingProfile = true;
try {
profile = await invoke<UserProfileView>('update_my_profile', {
bio: editBio.trim() || null,
bio: editBio.trim(),
bannerUrl: editBanner.trim() || null
});
editing = false;
@@ -89,9 +89,8 @@
async function handleLikePost(post: UserPost) {
try {
const liked = await invoke<boolean>('like_user_post', { postId: post.id });
post.liked_by_me = liked;
post.likes_count = liked ? post.likes_count + 1 : Math.max(0, post.likes_count - 1);
await invoke('like_user_post', { postId: post.id });
post.likes_count += 1;
} catch (e: any) {
toast(e?.message ?? 'Failed to update like', 'error');
}
@@ -131,8 +130,8 @@
<div class="user-titles">
<div class="user-row">
<h2>{profile.username}</h2>
{#if profile.global_level?.title}
<span class="badge title-badge"><Award size={12} /> {profile.global_level.title}</span>
{#if profile.level_info?.title}
<span class="badge title-badge"><Award size={12} /> {profile.level_info.title}</span>
{/if}
</div>
<div class="meta-row tiny muted">
@@ -140,7 +139,7 @@
<span>•</span>
<span>{profile.friends_count} Friends</span>
<span>•</span>
<span class="global-lvl-tag">Level {profile.global_level?.level ?? 1}</span>
<span class="global-lvl-tag">Level {profile.level_info?.level ?? 1}</span>
</div>
</div>
</div>
@@ -195,7 +194,7 @@
<Award size={14} /> Levels & Ranks
</button>
<button class:active={activeTab === 'achievements'} onclick={() => (activeTab = 'achievements')}>
<Trophy size={14} /> Achievements ({profile.achievements.length})
<Trophy size={14} /> Achievements ({profile.achievements_count ?? profile.achievements?.length ?? 0})
</button>
<button class:active={activeTab === 'stats'} onclick={() => (activeTab = 'stats')}>
<Swords size={14} /> Stats
@@ -285,16 +284,16 @@
<h3>SCOPENET Global Level</h3>
</div>
<div class="level-pill">
Level {profile.global_level.level}
Level {profile.level_info.level}
</div>
</div>
<div class="xp-bar-wrap">
<div class="xp-numbers tiny">
<span>{profile.global_level.current_xp.toLocaleString()} XP</span>
<span>{profile.global_level.next_level_xp.toLocaleString()} XP</span>
<span>{profile.level_info.current_xp.toLocaleString()} XP</span>
<span>{profile.level_info.next_level_xp.toLocaleString()} XP</span>
</div>
<div class="xp-bar">
<div class="xp-fill" style:width="{profile.global_level.progress_pct}%"></div>
<div class="xp-fill" style:width="{profile.level_info.progress_pct}%"></div>
</div>
</div>
</div>