Revert "fix: update svelte -> 5.43.8"

This reverts commit c9ca98eb30.
This commit is contained in:
Xylight committed 2025-11-16 20:56:12 -08:00
1 parent 2db777f99a
commit dbe05459cd
5 files changed
+19 -11

No files matched your search

+1 -1
View File
@@ -5888,7 +5888,7 @@ export interface components {
}
PollVoteRequest: {
post_id: number
choice_id: number | number[]
choice_id: number
}
PollVoteResponse: {
banned_from_community: boolean
+1 -1
View File
@@ -2463,7 +2463,7 @@ export interface PostEvent {
export interface PollVote {
post_id: number
choice_id: number | number[]
choice_id: number
}
export interface SetNote {
+14 -6
View File
@@ -53,10 +53,18 @@
canVote = false
if (typeof id !== 'number') {
await api.voteOnPoll({
post_id: post.id,
choice_id: id,
})
await Promise.all([
id.map((i) =>
api
.voteOnPoll({
post_id: post.id,
choice_id: i,
})
.catch((err) => {
throw err
}),
),
])
} else {
await api.voteOnPoll({
post_id: post.id,
@@ -81,7 +89,7 @@
{#each options.toSorted((a, b) => a.sort_order - b.sort_order) as choice}
{@const active =
selected == choice.id ||
(typeof selected !== 'number' && selected?.includes?.(choice.id))}
(typeof selected !== 'number' && selected?.includes(choice.id))}
{@const percentage = Math.floor(
(choice.num_votes / totalVotes || 0) * 100,
)}
@@ -106,7 +114,7 @@
></div>
{/if}
<label
class="px-4 py-2 w-full text-left flex flex-row gap-2 items-center relative"
class="px-4 py-2 w-full text-left flex flex-row gap-2 items-center"
>
{#if !multi}
<input