Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
fix: admin paint tool shadows
Browse files Browse the repository at this point in the history
  • Loading branch information
lennartkloock committed Dec 7, 2024
1 parent c66d5be commit 56d312c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/structures/Cosmetic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export namespace Paint {
}

export interface Shadow {
x_offset: number;
y_offset: number;
radius: number;
x_offset: string;
y_offset: string;
radius: string;
color: number;
}
}
Expand Down
14 changes: 13 additions & 1 deletion src/views/admin/AdminCosmetics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,19 @@ const filteredPaints = computed(() =>
}),
);
onResult((res) => (paints.value = res.data.cosmetics.paints ?? []));
onResult(
(res) =>
(paints.value =
res.data.cosmetics.paints.map((p) => {
p.shadows = p.shadows.map((s) => {
s.x_offset = s.x_offset.toString();
s.y_offset = s.y_offset.toString();
s.radius = s.radius.toString();
return s;
});
return p;
}) ?? []),
);
const view = ref<"overview" | "builder">("overview");
const currentPaint = ref(null as Paint | null);
Expand Down

0 comments on commit 56d312c

Please sign in to comment.