mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	added a welcome widget
This commit is contained in:
		| @@ -45,6 +45,7 @@ import { SavedViewWidgetComponent } from './components/dashboard/widgets/saved-v | |||||||
| import { StatisticsWidgetComponent } from './components/dashboard/widgets/statistics-widget/statistics-widget.component'; | import { StatisticsWidgetComponent } from './components/dashboard/widgets/statistics-widget/statistics-widget.component'; | ||||||
| import { UploadFileWidgetComponent } from './components/dashboard/widgets/upload-file-widget/upload-file-widget.component'; | import { UploadFileWidgetComponent } from './components/dashboard/widgets/upload-file-widget/upload-file-widget.component'; | ||||||
| import { WidgetFrameComponent } from './components/dashboard/widgets/widget-frame/widget-frame.component'; | import { WidgetFrameComponent } from './components/dashboard/widgets/widget-frame/widget-frame.component'; | ||||||
|  | import { WelcomeWidgetComponent } from './components/dashboard/widgets/welcome-widget/welcome-widget.component'; | ||||||
|  |  | ||||||
| @NgModule({ | @NgModule({ | ||||||
|   declarations: [ |   declarations: [ | ||||||
| @@ -82,7 +83,8 @@ import { WidgetFrameComponent } from './components/dashboard/widgets/widget-fram | |||||||
|     SavedViewWidgetComponent, |     SavedViewWidgetComponent, | ||||||
|     StatisticsWidgetComponent, |     StatisticsWidgetComponent, | ||||||
|     UploadFileWidgetComponent, |     UploadFileWidgetComponent, | ||||||
|     WidgetFrameComponent |     WidgetFrameComponent, | ||||||
|  |     WelcomeWidgetComponent | ||||||
|   ], |   ], | ||||||
|   imports: [ |   imports: [ | ||||||
|     BrowserModule, |     BrowserModule, | ||||||
|   | |||||||
| @@ -4,11 +4,7 @@ | |||||||
|  |  | ||||||
| <div class='row'> | <div class='row'> | ||||||
|   <div class="col-lg-8"> |   <div class="col-lg-8"> | ||||||
|     <app-widget-frame title="Saved views" *ngIf="savedViews.length == 0"> |     <app-welcome-widget *ngIf="savedViews.length == 0"></app-welcome-widget> | ||||||
|       <p class="card-text">This space is reserved to display your saved views. Go to your documents and save a view |  | ||||||
|         to have it displayed |  | ||||||
|         here!</p> |  | ||||||
|     </app-widget-frame> |  | ||||||
|  |  | ||||||
|     <ng-container *ngFor="let v of savedViews"> |     <ng-container *ngFor="let v of savedViews"> | ||||||
|       <app-saved-view-widget [savedView]="v"></app-saved-view-widget> |       <app-saved-view-widget [savedView]="v"></app-saved-view-widget> | ||||||
| @@ -22,4 +18,4 @@ | |||||||
|     <app-upload-file-widget></app-upload-file-widget> |     <app-upload-file-widget></app-upload-file-widget> | ||||||
|  |  | ||||||
|   </div> |   </div> | ||||||
| </div> | </div> | ||||||
|   | |||||||
| @@ -0,0 +1,16 @@ | |||||||
|  | <app-widget-frame title="First steps"> | ||||||
|  |  | ||||||
|  |   <ng-container content> | ||||||
|  |     <img src="assets/save-filter.png" class="float-right"> | ||||||
|  |     <p>Paperless is running! :)</p> | ||||||
|  |     <p>You can start uploading documents by dropping them in the file upload box to the right or by dropping them in the configured consumption folder and they'll start showing up in the documents list. | ||||||
|  |       After you've added some metadata to your documents, use the filtering mechanisms of paperless to create custom views (such as 'Recently added', 'Tagged TODO') and have them displayed on the dashboard instead of this message.</p> | ||||||
|  |     <p>Paperless offers some more features that try to make your life easier, such as:</p> | ||||||
|  |     <ul> | ||||||
|  |       <li>Once you've got a couple documents in paperless and added metadata to them, paperless can assign that metadata to new documents automatically.</li> | ||||||
|  |       <li>You can configure paperless to read your mails and add documents from attached files.</li> | ||||||
|  |     </ul> | ||||||
|  |     <p>Consult the documentation on how to use these features. The section on basic usage also has some information on how to use paperless in general.</p> | ||||||
|  |   </ng-container> | ||||||
|  |  | ||||||
|  | </app-widget-frame> | ||||||
| @@ -0,0 +1,25 @@ | |||||||
|  | import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||||||
|  |  | ||||||
|  | import { WelcomeWidgetComponent } from './welcome-widget.component'; | ||||||
|  |  | ||||||
|  | describe('WelcomeWidgetComponent', () => { | ||||||
|  |   let component: WelcomeWidgetComponent; | ||||||
|  |   let fixture: ComponentFixture<WelcomeWidgetComponent>; | ||||||
|  |  | ||||||
|  |   beforeEach(async () => { | ||||||
|  |     await TestBed.configureTestingModule({ | ||||||
|  |       declarations: [ WelcomeWidgetComponent ] | ||||||
|  |     }) | ||||||
|  |     .compileComponents(); | ||||||
|  |   }); | ||||||
|  |  | ||||||
|  |   beforeEach(() => { | ||||||
|  |     fixture = TestBed.createComponent(WelcomeWidgetComponent); | ||||||
|  |     component = fixture.componentInstance; | ||||||
|  |     fixture.detectChanges(); | ||||||
|  |   }); | ||||||
|  |  | ||||||
|  |   it('should create', () => { | ||||||
|  |     expect(component).toBeTruthy(); | ||||||
|  |   }); | ||||||
|  | }); | ||||||
| @@ -0,0 +1,15 @@ | |||||||
|  | import { Component, OnInit } from '@angular/core'; | ||||||
|  |  | ||||||
|  | @Component({ | ||||||
|  |   selector: 'app-welcome-widget', | ||||||
|  |   templateUrl: './welcome-widget.component.html', | ||||||
|  |   styleUrls: ['./welcome-widget.component.scss'] | ||||||
|  | }) | ||||||
|  | export class WelcomeWidgetComponent implements OnInit { | ||||||
|  |  | ||||||
|  |   constructor() { } | ||||||
|  |  | ||||||
|  |   ngOnInit(): void { | ||||||
|  |   } | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										
											BIN
										
									
								
								src-ui/src/assets/save-filter.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src-ui/src/assets/save-filter.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 8.1 KiB | 
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler