fix: resolve all typescript errors in sv check (#715)
This commit is contained in:
1 parent
2a5fb886ae
commit
7bddf16559
38 files changed
+233
-287
No files matched your search
@@ -118,7 +118,7 @@ export class PostFormState {
|
||||
).post_view
|
||||
}
|
||||
|
||||
if (api instanceof PiefedClient) {
|
||||
if (api instanceof PiefedClient && api.assignFlair) {
|
||||
const flairRes = await api.assignFlair({
|
||||
flair_id_list: this.flairList.map((i) => i.id),
|
||||
post_id: res.post.id,
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
opened?: boolean
|
||||
autoplay?: boolean
|
||||
title?: string
|
||||
class?: string
|
||||
}
|
||||
|
||||
let {
|
||||
@@ -112,6 +113,7 @@
|
||||
title,
|
||||
opened = $bindable(!settings.embeds.clickToView),
|
||||
autoplay = settings.embeds.clickToView,
|
||||
class: clazz = '',
|
||||
}: Props = $props()
|
||||
|
||||
let data = $derived(typeData(type))
|
||||
@@ -122,7 +124,7 @@
|
||||
@component
|
||||
Displays a video file or embedded video iframe.
|
||||
-->
|
||||
<div class="iframe-container">
|
||||
<div class={['iframe-container', clazz]}>
|
||||
{#if opened}
|
||||
{#if type == 'video'}
|
||||
<video {autoplay} controls>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
>
|
||||
{#if post.alt_text}
|
||||
<Button
|
||||
onclick={(e) => {
|
||||
onclick={(e: MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
modal({
|
||||
title: 'Alt',
|
||||
|
||||
@@ -60,16 +60,18 @@
|
||||
|
||||
canVote = false
|
||||
|
||||
if (typeof id !== 'number') {
|
||||
await api.voteOnPoll({
|
||||
post_id: post.id,
|
||||
choice_id: id,
|
||||
})
|
||||
} else {
|
||||
await api.voteOnPoll({
|
||||
post_id: post.id,
|
||||
choice_id: [id],
|
||||
})
|
||||
if (api.voteOnPoll) {
|
||||
if (typeof id !== 'number') {
|
||||
await api.voteOnPoll({
|
||||
post_id: post.id,
|
||||
choice_id: id,
|
||||
})
|
||||
} else {
|
||||
await api.voteOnPoll({
|
||||
post_id: post.id,
|
||||
choice_id: [id],
|
||||
})
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
|
||||
Reference in new issue
Block a user