| import type { |
| AdConfig, |
| AnnouncementConfig, |
| BackgroundWallpaperConfig, |
| CommentConfig, |
| CoverImageConfig, |
| FriendsPageConfig, |
| LicenseConfig, |
| Live2DModelConfig, |
| MusicPlayerConfig, |
| ProfileConfig, |
| SidebarLayoutConfig, |
| SiteConfig, |
| SpineModelConfig, |
| SponsorConfig, |
| NavBarLink, |
| FriendLink, |
| FooterConfig, |
| } from "./config"; |
|
|
| export type AdminNavPreset = |
| | "home" |
| | "archive" |
| | "about" |
| | "friends" |
| | "sponsor" |
| | "guestbook" |
| | "bangumi"; |
|
|
| export type AdminNavItem = |
| | { |
| preset: AdminNavPreset; |
| } |
| | (Omit<NavBarLink, "children"> & { |
| children?: AdminNavItem[]; |
| }); |
|
|
| export type AdminNavbarConfig = { |
| links: AdminNavItem[]; |
| }; |
|
|
| export type AdminFriendsConfig = { |
| page: FriendsPageConfig; |
| items: FriendLink[]; |
| }; |
|
|
| export type AdminPioConfig = { |
| spine: SpineModelConfig; |
| live2d: Live2DModelConfig; |
| }; |
|
|
| export type AdminAdConfig = { |
| ad1: AdConfig; |
| ad2: AdConfig; |
| }; |
|
|
| export type AdminConfigData = { |
| site: SiteConfig; |
| navbar: AdminNavbarConfig; |
| sidebar: SidebarLayoutConfig; |
| profile: ProfileConfig; |
| wallpaper: BackgroundWallpaperConfig; |
| announcement: AnnouncementConfig; |
| footer: FooterConfig; |
| comment: CommentConfig; |
| friends: AdminFriendsConfig; |
| sponsor: SponsorConfig; |
| music: MusicPlayerConfig; |
| pio: AdminPioConfig; |
| ad: AdminAdConfig; |
| license: LicenseConfig; |
| coverImage: CoverImageConfig; |
| }; |
|
|
| export type AdminBuildStatus = |
| | "idle" |
| | "running" |
| | "success" |
| | "error"; |
|
|
| export type AdminDashboardData = { |
| stats: { |
| postCount: number; |
| draftCount: number; |
| pageCount: number; |
| mediaCount: number; |
| tagCount: number; |
| categoryCount: number; |
| }; |
| build: { |
| status: AdminBuildStatus; |
| reason: string; |
| startedAt: string | null; |
| finishedAt: string | null; |
| lastDurationMs: number | null; |
| logTail: string[]; |
| }; |
| }; |
|
|
| export type AdminPostSummary = { |
| file: string; |
| slug: string; |
| title: string; |
| description: string; |
| published: string; |
| updated: string; |
| tags: string[]; |
| category: string; |
| draft: boolean; |
| pinned: boolean; |
| image: string; |
| wordCount: number; |
| }; |
|
|
| export type AdminPostDocument = { |
| file: string; |
| slug: string; |
| frontmatter: Record<string, unknown>; |
| body: string; |
| }; |
|
|
| export type AdminSpecPageId = "about" | "friends" | "guestbook"; |
|
|
| export type AdminSpecPageDocument = { |
| id: AdminSpecPageId; |
| frontmatter: Record<string, unknown>; |
| body: string; |
| }; |
|
|
| export type AdminMediaItem = { |
| name: string; |
| relativePath: string; |
| root: "uploads" | "content"; |
| publicUrl: string; |
| previewUrl: string; |
| size: number; |
| updatedAt: string; |
| }; |
|
|