feat: categories have settings for filtering and titles

This commit is contained in:
2026-02-20 21:10:15 +01:00
parent eeffa247bb
commit 63c4b148e1
15 changed files with 661 additions and 53 deletions

View File

@@ -43,6 +43,12 @@ export interface ProjectMetadata {
defaultAuthor?: string;
maxPostsPerPage?: number;
picoTheme?: import('./picoThemes').PicoThemeName;
categorySettings?: Record<string, CategoryRenderSettings>;
}
export interface CategoryRenderSettings {
renderInLists: boolean;
showTitle: boolean;
}
export interface ProjectData {
@@ -529,7 +535,7 @@ export interface ElectronAPI {
syncOnStartup: () => Promise<{ tags: string[]; categories: string[]; projectMetadata: ProjectMetadata | null }>;
getProjectMetadata: () => Promise<ProjectMetadata | null>;
setProjectMetadata: (metadata: { name: string; description?: string }) => Promise<ProjectMetadata | null>;
updateProjectMetadata: (updates: { name?: string; description?: string; dataPath?: string; publicUrl?: string; mainLanguage?: string; defaultAuthor?: string; maxPostsPerPage?: number; picoTheme?: import('./picoThemes').PicoThemeName }) => Promise<ProjectMetadata | null>;
updateProjectMetadata: (updates: { name?: string; description?: string; dataPath?: string; publicUrl?: string; mainLanguage?: string; defaultAuthor?: string; maxPostsPerPage?: number; picoTheme?: import('./picoThemes').PicoThemeName; categorySettings?: Record<string, CategoryRenderSettings> }) => Promise<ProjectMetadata | null>;
};
tags: {
getAll: () => Promise<TagData[]>;