Implement Bookdrop: Watch folder for file drops and auto-process uploads
This commit is contained in:
committed by
Aditya Chandel
parent
5064706b8f
commit
177528e640
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="flex flex-col px-4 py-6 live-border">
|
||||
<p>{{ latestNotification.timestamp }}</p>
|
||||
<p class="text-sm text-gray-400">{{ latestNotification.timestamp }}</p>
|
||||
<p>{{ latestNotification.message }}</p>
|
||||
</div>
|
||||
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
<div class="metadata-progress-box flex flex-col w-[25rem] max-h-[60vh] overflow-y-auto">
|
||||
<app-live-notification-box/>
|
||||
|
||||
@if (hasMetadataTasks$ | async) {
|
||||
<app-metadata-progress-widget/>
|
||||
}
|
||||
@if (hasPendingBookdropFiles$ | async) {
|
||||
<app-bookdrop-files-widget-component/>
|
||||
}
|
||||
</div>
|
||||
|
||||
+7
-1
@@ -4,13 +4,16 @@ import {MetadataProgressWidgetComponent} from '../metadata-progress-widget-compo
|
||||
import {MetadataProgressService} from '../../service/metadata-progress-service';
|
||||
import {map} from 'rxjs/operators';
|
||||
import {AsyncPipe} from '@angular/common';
|
||||
import {BookdropFilesWidgetComponent} from '../../../bookdrop/bookdrop-files-widget-component/bookdrop-files-widget.component';
|
||||
import {BookdropFileService} from '../../../bookdrop/bookdrop-file.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-unified-notification-popover-component',
|
||||
imports: [
|
||||
LiveNotificationBoxComponent,
|
||||
MetadataProgressWidgetComponent,
|
||||
AsyncPipe
|
||||
AsyncPipe,
|
||||
BookdropFilesWidgetComponent
|
||||
],
|
||||
templateUrl: './unified-notification-popover-component.html',
|
||||
standalone: true,
|
||||
@@ -18,8 +21,11 @@ import {AsyncPipe} from '@angular/common';
|
||||
})
|
||||
export class UnifiedNotificationBoxComponent {
|
||||
metadataProgressService = inject(MetadataProgressService);
|
||||
bookdropFileService = inject(BookdropFileService);
|
||||
|
||||
hasMetadataTasks$ = this.metadataProgressService.activeTasks$.pipe(
|
||||
map(tasks => Object.keys(tasks).length > 0)
|
||||
);
|
||||
|
||||
hasPendingBookdropFiles$ = this.bookdropFileService.hasPendingFiles$;
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ export interface AppSettings {
|
||||
metadataProviderSettings: MetadataProviderSettings;
|
||||
metadataMatchWeights: MetadataMatchWeights;
|
||||
metadataPersistenceSettings: MetadataPersistenceSettings;
|
||||
metadataDownloadOnBookdrop: boolean;
|
||||
}
|
||||
|
||||
export enum AppSettingKey {
|
||||
@@ -108,5 +109,5 @@ export enum AppSettingKey {
|
||||
METADATA_MATCH_WEIGHTS = 'METADATA_MATCH_WEIGHTS',
|
||||
METADATA_PERSISTENCE_SETTINGS = 'METADATA_PERSISTENCE_SETTINGS',
|
||||
MOVE_FILE_PATTERN = 'MOVE_FILE_PATTERN',
|
||||
BOOK_DELETION_ENABLED = 'BOOK_DELETION_ENABLED'
|
||||
METADATA_DOWNLOAD_ON_BOOKDROP = 'METADATA_DOWNLOAD_ON_BOOKDROP'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user