misc: switch to universal vote function
This commit is contained in:
1 parent
8915759031
commit
76b9864a3b
9 files changed
+134
-102
No files matched your search
@@ -1,15 +1,15 @@
|
||||
import type { Submission } from '$lib/lemmy/contentview.js'
|
||||
import type { SubmissionView } from '$lib/lemmy/contentview.js'
|
||||
import type { Community, MyUserInfo, Person } from 'lemmy-js-client'
|
||||
import { writable } from 'svelte/store'
|
||||
|
||||
interface Modals {
|
||||
reporting: {
|
||||
open: boolean
|
||||
item: Submission | undefined
|
||||
item: SubmissionView | undefined
|
||||
}
|
||||
removing: {
|
||||
open: boolean
|
||||
item: Submission | undefined
|
||||
item: SubmissionView | undefined
|
||||
purge: boolean
|
||||
}
|
||||
banning: {
|
||||
@@ -38,7 +38,7 @@ export let modals = writable<Modals>({
|
||||
},
|
||||
})
|
||||
|
||||
export function report(item: Submission) {
|
||||
export function report(item: SubmissionView) {
|
||||
modals.update((m) => ({
|
||||
...m,
|
||||
reporting: {
|
||||
@@ -48,7 +48,7 @@ export function report(item: Submission) {
|
||||
}))
|
||||
}
|
||||
|
||||
export function remove(item: Submission, purge: boolean = false) {
|
||||
export function remove(item: SubmissionView, purge: boolean = false) {
|
||||
modals.update((m) => ({
|
||||
...m,
|
||||
removing: {
|
||||
|
||||
Reference in new issue
Block a user