perf: optimize Docker build with layer caching and BuildKit support

This commit is contained in:
2025-10-22 23:13:09 -04:00
parent 58bd57543b
commit c030f91ebe
11 changed files with 172 additions and 36 deletions
@@ -66,12 +66,33 @@ export class FileExplorerComponent {
selectedNoteId = input<string | null>(null);
foldersOnly = input<boolean>(false);
useTrashCounts = input<boolean>(false);
quickLinkFilter = input<'favoris' | 'publish' | 'draft' | 'template' | 'task' | 'private' | 'archive' | null>(null);
fileSelected = output<string>();
folderSelected = output<string>();
private vaultService = inject(VaultService);
folderCount(path: string): number {
const quickLink = this.quickLinkFilter();
if (quickLink) {
// Compute filtered count
let filteredNotes = this.vaultService.allNotes().filter(note => {
const frontmatter = note.frontmatter || {};
return frontmatter[quickLink] === true;
});
// Apply folder filter
if (path) {
const folder = path.toLowerCase().replace(/^\/+|\/+$/g, '');
filteredNotes = filteredNotes.filter(note => {
const originalPath = (note.originalPath || '').toLowerCase().replace(/^\/+|\/+$/g, '');
return originalPath === folder || originalPath.startsWith(folder + '/');
});
}
return filteredNotes.length;
}
if (this.useTrashCounts()) {
const counts = this.vaultService.trashFolderCounts();
const raw = (path || '').replace(/\\/g, '/');