2024-11-28 16:47:10 +01:00
|
|
|
import { SortBy, NSFWFilter, ModeratedFilter } from './modsFilter'
|
|
|
|
|
2024-11-05 13:57:39 +01:00
|
|
|
export interface BlogForm {
|
2024-10-31 18:14:45 +01:00
|
|
|
title: string
|
|
|
|
content: string
|
|
|
|
image: string
|
2024-11-05 13:57:39 +01:00
|
|
|
summary: string
|
2024-10-31 18:14:45 +01:00
|
|
|
tags: string
|
2024-11-05 13:57:39 +01:00
|
|
|
nsfw: boolean
|
|
|
|
}
|
2024-10-31 18:14:45 +01:00
|
|
|
|
2024-11-05 13:57:39 +01:00
|
|
|
export interface BlogDetails extends BlogForm {
|
2024-10-31 18:14:45 +01:00
|
|
|
id: string
|
|
|
|
author: string
|
|
|
|
published_at: number
|
|
|
|
edited_at: number
|
2024-10-31 20:14:29 +01:00
|
|
|
rTag: string
|
|
|
|
dTag: string
|
|
|
|
aTag: string
|
|
|
|
tTags: string[]
|
2024-10-31 18:14:45 +01:00
|
|
|
}
|
|
|
|
|
2025-01-09 13:21:49 +01:00
|
|
|
export interface BlogEventSubmitForm extends BlogForm {}
|
2024-10-31 18:14:45 +01:00
|
|
|
|
2024-11-08 11:14:07 +01:00
|
|
|
export interface BlogEventEditForm extends BlogEventSubmitForm {
|
|
|
|
dTag: string
|
|
|
|
rTag: string
|
|
|
|
published_at: string
|
|
|
|
}
|
|
|
|
|
2024-11-05 13:57:39 +01:00
|
|
|
export interface BlogFormErrors extends Partial<BlogEventSubmitForm> {}
|
|
|
|
|
|
|
|
export interface BlogCardDetails extends BlogDetails {
|
|
|
|
naddr: string
|
|
|
|
}
|
2024-11-06 13:17:13 +01:00
|
|
|
|
|
|
|
export interface BlogPageLoaderResult {
|
|
|
|
blog: Partial<BlogDetails> | undefined
|
|
|
|
latest: Partial<BlogDetails>[]
|
2024-11-07 17:33:59 +01:00
|
|
|
isAddedToNSFW: boolean
|
|
|
|
isBlocked: boolean
|
2025-01-16 12:56:46 +01:00
|
|
|
postWarning?: 'user' | 'admin'
|
2024-11-06 13:17:13 +01:00
|
|
|
}
|
2024-11-28 16:47:10 +01:00
|
|
|
|
|
|
|
export interface BlogsFilterOptions {
|
|
|
|
sort: SortBy
|
|
|
|
nsfw: NSFWFilter
|
|
|
|
source: string
|
|
|
|
moderated: ModeratedFilter
|
|
|
|
}
|