feat: add folder management endpoints and CORS support

This commit is contained in:
2025-10-24 08:02:40 -04:00
parent 7e20098d14
commit 08a2d05dad
39 changed files with 5267 additions and 132 deletions
@@ -1,4 +1,4 @@
import { AfterViewInit, Component, ElementRef, Input, OnDestroy, Output, EventEmitter, ViewContainerRef, inject } from '@angular/core';
import { AfterViewInit, Component, ElementRef, Input, OnDestroy, Output, EventEmitter, ViewContainerRef, inject, OnChanges, SimpleChanges } from '@angular/core';
import { CommonModule } from '@angular/common';
import { debounceTime, Subject } from 'rxjs';
import { splitPathKeepFilename } from '../../../../shared/utils/path';
@@ -16,7 +16,7 @@ import { VaultService } from '../../../../../services/vault.service';
templateUrl: './note-header.component.html',
styleUrls: ['./note-header.component.scss']
})
export class NoteHeaderComponent implements AfterViewInit, OnDestroy {
export class NoteHeaderComponent implements AfterViewInit, OnDestroy, OnChanges {
@Input() fullPath = '';
@Input() noteId = '';
@Input() tags: string[] = [];
@@ -42,6 +42,16 @@ export class NoteHeaderComponent implements AfterViewInit, OnDestroy {
constructor(private host: ElementRef<HTMLElement>) {}
ngOnChanges(changes: SimpleChanges): void {
if (changes['fullPath']) {
this.pathParts = splitPathKeepFilename(this.fullPath);
// Also update the path display if component is already initialized
if (this.ro) {
this.fitPath();
}
}
}
ngAfterViewInit(): void {
this.pathParts = splitPathKeepFilename(this.fullPath);