feat: add folder management endpoints and CORS support
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user