From 9f18d0ad4581c8db476b9924bb60696424721e03 Mon Sep 17 00:00:00 2001 From: Fabian Koller Date: Tue, 29 Dec 2020 23:52:27 +0100 Subject: [PATCH 01/18] Fix ENV var name for user args in example config The actual string used when looking up the user arguments ends with an S: `PAPERLESS_OCR_USER_ARGS` --- paperless.conf.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paperless.conf.example b/paperless.conf.example index 910fc22a0..cc4cc0eb7 100644 --- a/paperless.conf.example +++ b/paperless.conf.example @@ -39,7 +39,7 @@ #PAPERLESS_OCR_OUTPUT_TYPE=pdfa #PAPERLESS_OCR_PAGES=1 #PAPERLESS_OCR_IMAGE_DPI=300 -#PAPERLESS_OCR_USER_ARG={} +#PAPERLESS_OCR_USER_ARGS={} #PAPERLESS_CONVERT_MEMORY_LIMIT=0 #PAPERLESS_CONVERT_TMPDIR=/var/tmp/paperless From 57da323cea85bf65f50ed4c0d7e77cddf46ccae9 Mon Sep 17 00:00:00 2001 From: Jonas Winkler Date: Wed, 30 Dec 2020 03:39:25 +0100 Subject: [PATCH 02/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eea41ce05..5c5fa4a76 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/jonaswinkler/paperless-ng.svg?branch=master)](https://travis-ci.org/jonaswinkler/paperless-ng) +[![Build Status](https://travis-ci.com/jonaswinkler/paperless-ng.svg?branch=master)](https://travis-ci.com/jonaswinkler/paperless-ng) [![Documentation Status](https://readthedocs.org/projects/paperless-ng/badge/?version=latest)](https://paperless-ng.readthedocs.io/en/latest/?badge=latest) [![Gitter](https://badges.gitter.im/paperless-ng/community.svg)](https://gitter.im/paperless-ng/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Docker Hub Pulls](https://img.shields.io/docker/pulls/jonaswinkler/paperless-ng.svg)](https://hub.docker.com/r/jonaswinkler/paperless-ng) From b092bb6848d34e12d13487f82f935667f5cf407d Mon Sep 17 00:00:00 2001 From: Jan Wiebe Date: Wed, 30 Dec 2020 14:45:15 +0100 Subject: [PATCH 03/18] Add manifest file to add to home screen and launch in full screen mode. --- src-ui/angular.json | 264 ++++++++++++++++---------------- src-ui/src/index.html | 2 + src-ui/src/manifest.webmanifest | 14 ++ 3 files changed, 149 insertions(+), 131 deletions(-) create mode 100644 src-ui/src/manifest.webmanifest diff --git a/src-ui/angular.json b/src-ui/angular.json index 79233eeda..04a1bec50 100644 --- a/src-ui/angular.json +++ b/src-ui/angular.json @@ -1,133 +1,135 @@ { - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "paperless-ui": { - "projectType": "application", - "schematics": { - "@schematics/angular:component": { - "style": "scss" - } - }, - "root": "", - "sourceRoot": "src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "dist/paperless-ui", - "outputHashing": "none", - "index": "src/index.html", - "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.app.json", - "aot": true, - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], - "scripts": [], - "allowedCommonJsDependencies": [ - "ng2-pdf-viewer" - ] - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], - "optimization": true, - "outputHashing": "none", - "sourceMap": false, - "extractCss": true, - "namedChunks": false, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "budgets": [ - { - "type": "initial", - "maximumWarning": "2mb", - "maximumError": "5mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "6kb", - "maximumError": "10kb" - } - ] - } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "paperless-ui:build" - }, - "configurations": { - "production": { - "browserTarget": "paperless-ui:build:production" - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "paperless-ui:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], - "scripts": [] - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json", - "e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "paperless-ui:serve" - }, - "configurations": { - "production": { - "devServerTarget": "paperless-ui:serve:production" - } - } - } - } - } - }, - "defaultProject": "paperless-ui" + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "paperless-ui": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/paperless-ui", + "outputHashing": "none", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.app.json", + "aot": true, + "assets": [ + "src/favicon.ico", + "src/assets", + "src/manifest.webmanifest" + ], + "styles": [ + "src/styles.scss" + ], + "scripts": [], + "allowedCommonJsDependencies": [ + "ng2-pdf-viewer" + ] + }, + "configurations": { + "production": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "optimization": true, + "outputHashing": "none", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" + } + ] + } + } + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "paperless-ui:build" + }, + "configurations": { + "production": { + "browserTarget": "paperless-ui:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "paperless-ui:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.spec.json", + "karmaConfig": "karma.conf.js", + "assets": [ + "src/favicon.ico", + "src/assets", + "src/manifest.webmanifest" + ], + "styles": [ + "src/styles.scss" + ], + "scripts": [] + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "tsconfig.app.json", + "tsconfig.spec.json", + "e2e/tsconfig.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + }, + "e2e": { + "builder": "@angular-devkit/build-angular:protractor", + "options": { + "protractorConfig": "e2e/protractor.conf.js", + "devServerTarget": "paperless-ui:serve" + }, + "configurations": { + "production": { + "devServerTarget": "paperless-ui:serve:production" + } + } + } + } + } + }, + "defaultProject": "paperless-ui" } diff --git a/src-ui/src/index.html b/src-ui/src/index.html index f82399ce6..08ab3d931 100644 --- a/src-ui/src/index.html +++ b/src-ui/src/index.html @@ -5,6 +5,8 @@ Paperless-ng + + diff --git a/src-ui/src/manifest.webmanifest b/src-ui/src/manifest.webmanifest new file mode 100644 index 000000000..60151bb5c --- /dev/null +++ b/src-ui/src/manifest.webmanifest @@ -0,0 +1,14 @@ +{ + "background_color": "white", + "description": "A supercharged version of paperless: scan, index and archive all your physical documents", + "display": "fullscreen", + "icons": [ + { + "src": "favicon.ico", + "sizes": "128x128" + } + ], + "name": "Paperless NG", + "short_name": "Paperless NG", + "start_url": "/" +} From ab5098a036f25b4b46ce72e6b3c5bd911cee9509 Mon Sep 17 00:00:00 2001 From: Jan Wiebe Date: Wed, 30 Dec 2020 14:52:20 +0100 Subject: [PATCH 04/18] Fix indentation of angular.json --- src-ui/angular.json | 260 ++++++++++++++++++++++---------------------- 1 file changed, 130 insertions(+), 130 deletions(-) diff --git a/src-ui/angular.json b/src-ui/angular.json index 04a1bec50..6a689c115 100644 --- a/src-ui/angular.json +++ b/src-ui/angular.json @@ -1,135 +1,135 @@ { - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "paperless-ui": { - "projectType": "application", - "schematics": { - "@schematics/angular:component": { - "style": "scss" - } - }, - "root": "", - "sourceRoot": "src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "dist/paperless-ui", - "outputHashing": "none", - "index": "src/index.html", - "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.app.json", - "aot": true, - "assets": [ - "src/favicon.ico", - "src/assets", - "src/manifest.webmanifest" - ], - "styles": [ - "src/styles.scss" - ], + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "paperless-ui": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/paperless-ui", + "outputHashing": "none", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.app.json", + "aot": true, + "assets": [ + "src/favicon.ico", + "src/assets", + "src/manifest.webmanifest" + ], + "styles": [ + "src/styles.scss" + ], "scripts": [], "allowedCommonJsDependencies": [ "ng2-pdf-viewer" ] - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], - "optimization": true, - "outputHashing": "none", - "sourceMap": false, - "extractCss": true, - "namedChunks": false, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "budgets": [ - { - "type": "initial", - "maximumWarning": "2mb", - "maximumError": "5mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "6kb", - "maximumError": "10kb" - } - ] - } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "paperless-ui:build" - }, - "configurations": { - "production": { - "browserTarget": "paperless-ui:build:production" - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "paperless-ui:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "assets": [ - "src/favicon.ico", - "src/assets", - "src/manifest.webmanifest" - ], - "styles": [ - "src/styles.scss" - ], - "scripts": [] - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json", - "e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "paperless-ui:serve" - }, - "configurations": { - "production": { - "devServerTarget": "paperless-ui:serve:production" - } - } - } - } - } - }, - "defaultProject": "paperless-ui" -} + }, + "configurations": { + "production": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "optimization": true, + "outputHashing": "none", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" + } + ] + } + } + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "paperless-ui:build" + }, + "configurations": { + "production": { + "browserTarget": "paperless-ui:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "paperless-ui:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.spec.json", + "karmaConfig": "karma.conf.js", + "assets": [ + "src/favicon.ico", + "src/assets", + "src/manifest.webmanifest" + ], + "styles": [ + "src/styles.scss" + ], + "scripts": [] + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "tsconfig.app.json", + "tsconfig.spec.json", + "e2e/tsconfig.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + }, + "e2e": { + "builder": "@angular-devkit/build-angular:protractor", + "options": { + "protractorConfig": "e2e/protractor.conf.js", + "devServerTarget": "paperless-ui:serve" + }, + "configurations": { + "production": { + "devServerTarget": "paperless-ui:serve:production" + } + } + } + } + } + }, + "defaultProject": "paperless-ui" +} \ No newline at end of file From 9fe6c5c3a95c7b2e38cf9fa31015cd622b573fb4 Mon Sep 17 00:00:00 2001 From: Jan Wiebe Date: Wed, 30 Dec 2020 14:55:49 +0100 Subject: [PATCH 05/18] Fix indentation --- src-ui/angular.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src-ui/angular.json b/src-ui/angular.json index 6a689c115..f0acd5950 100644 --- a/src-ui/angular.json +++ b/src-ui/angular.json @@ -32,10 +32,10 @@ "styles": [ "src/styles.scss" ], - "scripts": [], - "allowedCommonJsDependencies": [ - "ng2-pdf-viewer" - ] + "scripts": [], + "allowedCommonJsDependencies": [ + "ng2-pdf-viewer" + ] }, "configurations": { "production": { From 664280ccce5ef14cc38aca5b140a01610f708a90 Mon Sep 17 00:00:00 2001 From: Jan Wiebe Date: Wed, 30 Dec 2020 14:56:18 +0100 Subject: [PATCH 06/18] Add newline to end of file --- src-ui/angular.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-ui/angular.json b/src-ui/angular.json index f0acd5950..ce2dd82f7 100644 --- a/src-ui/angular.json +++ b/src-ui/angular.json @@ -132,4 +132,4 @@ } }, "defaultProject": "paperless-ui" -} \ No newline at end of file +} From 208f4291d6bc217bdef85da9c828f9db8f27c4bb Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 21:54:36 +0100 Subject: [PATCH 07/18] fixes #222 --- src/documents/consumer.py | 2 +- src/documents/management/commands/document_retagger.py | 2 +- src/documents/tasks.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/documents/consumer.py b/src/documents/consumer.py index 4bcb6d1d9..5a06194b7 100755 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -158,7 +158,7 @@ class Consumer(LoggingMixin): try: classifier = DocumentClassifier() classifier.reload() - except (FileNotFoundError, IncompatibleClassifierVersionError) as e: + except (OSError, EOFError, IncompatibleClassifierVersionError) as e: self.log( "warning", f"Cannot classify documents: {e}.") diff --git a/src/documents/management/commands/document_retagger.py b/src/documents/management/commands/document_retagger.py index cf014dc6f..0fb9782c1 100755 --- a/src/documents/management/commands/document_retagger.py +++ b/src/documents/management/commands/document_retagger.py @@ -73,7 +73,7 @@ class Command(Renderable, BaseCommand): classifier = DocumentClassifier() try: classifier.reload() - except (FileNotFoundError, IncompatibleClassifierVersionError) as e: + except (OSError, EOFError, IncompatibleClassifierVersionError) as e: logging.getLogger(__name__).warning( f"Cannot classify documents: {e}.") classifier = None diff --git a/src/documents/tasks.py b/src/documents/tasks.py index ba7010ea9..38ff532b5 100644 --- a/src/documents/tasks.py +++ b/src/documents/tasks.py @@ -35,9 +35,9 @@ def train_classifier(): try: # load the classifier, since we might not have to train it again. classifier.reload() - except (FileNotFoundError, IncompatibleClassifierVersionError): + except (OSError, EOFError, IncompatibleClassifierVersionError): # This is what we're going to fix here. - pass + classifier = DocumentClassifier() try: if classifier.train(): From 63b841c496845b21200bf84c8cc05e36501b1a44 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 23:01:34 +0100 Subject: [PATCH 08/18] fixes #224 --- src-ui/src/app/components/common/input/tags/tags.component.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src-ui/src/app/components/common/input/tags/tags.component.html b/src-ui/src/app/components/common/input/tags/tags.component.html index 8a5dbc4f2..01b3fe755 100644 --- a/src-ui/src/app/components/common/input/tags/tags.component.html +++ b/src-ui/src/app/components/common/input/tags/tags.component.html @@ -5,7 +5,9 @@ From 1428b2670361e968a52a14308362026ab0575fca Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 23:34:21 +0100 Subject: [PATCH 09/18] this immensely improves resposibility --- .../app/components/document-list/document-list.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-ui/src/app/components/document-list/document-list.component.html b/src-ui/src/app/components/document-list/document-list.component.html index bc1047ba9..e627c428d 100644 --- a/src-ui/src/app/components/document-list/document-list.component.html +++ b/src-ui/src/app/components/document-list/document-list.component.html @@ -78,8 +78,8 @@
- - + +
From ef1ee8e0c0acadaaa9d4778dee69f60d1beab5a6 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Wed, 30 Dec 2020 23:34:50 +0100 Subject: [PATCH 10/18] fixes a bug with invisible selection --- .../correspondent-list.component.ts | 9 ++------- .../document-type-list.component.ts | 7 +------ .../components/manage/tag-list/tag-list.component.ts | 9 ++------- src-ui/src/app/services/document-list-view.service.ts | 11 ++++++++++- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts index d3b71b4ab..37b6fa66e 100644 --- a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts +++ b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts @@ -1,5 +1,4 @@ -import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { Component } from '@angular/core'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { FILTER_CORRESPONDENT } from 'src/app/data/filter-rule-type'; import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent'; @@ -16,7 +15,6 @@ import { CorrespondentEditDialogComponent } from './correspondent-edit-dialog/co export class CorrespondentListComponent extends GenericListComponent { constructor(correspondentsService: CorrespondentService, modalService: NgbModal, - private router: Router, private list: DocumentListViewService ) { super(correspondentsService,modalService,CorrespondentEditDialogComponent) @@ -27,9 +25,6 @@ export class CorrespondentListComponent extends GenericListComponent { constructor(service: DocumentTypeService, modalService: NgbModal, - private router: Router, private list: DocumentListViewService ) { super(service, modalService, DocumentTypeEditDialogComponent) @@ -28,9 +26,6 @@ export class DocumentTypeListComponent extends GenericListComponent { constructor(tagService: TagService, modalService: NgbModal, - private router: Router, private list: DocumentListViewService ) { super(tagService, modalService, TagEditDialogComponent) @@ -27,14 +25,11 @@ export class TagListComponent extends GenericListComponent { } getDeleteMessage(object: PaperlessTag) { - return $localize`Do you really want to delete the tag "${object.name}"?` } filterDocuments(object: PaperlessTag) { - this.list.documentListView.filter_rules = [ - {rule_type: FILTER_HAS_TAG, value: object.id.toString()} - ] - this.router.navigate(["documents"]) + this.list.quickFilter([{rule_type: FILTER_HAS_TAG, value: object.id.toString()}]) + } } diff --git a/src-ui/src/app/services/document-list-view.service.ts b/src-ui/src/app/services/document-list-view.service.ts index dfcf9c0c5..eb69439ec 100644 --- a/src-ui/src/app/services/document-list-view.service.ts +++ b/src-ui/src/app/services/document-list-view.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { Router } from '@angular/router'; import { Observable } from 'rxjs'; import { cloneFilterRules, FilterRule } from '../data/filter-rule'; import { PaperlessDocument } from '../data/paperless-document'; @@ -155,6 +156,14 @@ export class DocumentListViewService { sessionStorage.setItem(DOCUMENT_LIST_SERVICE.CURRENT_VIEW_CONFIG, JSON.stringify(this.documentListView)) } + quickFilter(filterRules: FilterRule[]) { + this.savedView = null + this.view.filter_rules = filterRules + this.reduceSelectionToFilter() + this.saveDocumentListView() + this.router.navigate(["documents"]) + } + getLastPage(): number { return Math.ceil(this.collectionSize / this.currentPageSize) } @@ -240,7 +249,7 @@ export class DocumentListViewService { } } - constructor(private documentService: DocumentService, private settings: SettingsService) { + constructor(private documentService: DocumentService, private settings: SettingsService, private router: Router) { let documentListViewConfigJson = sessionStorage.getItem(DOCUMENT_LIST_SERVICE.CURRENT_VIEW_CONFIG) if (documentListViewConfigJson) { try { From 6066d00c5e39bfba468d7a89175960554379a15f Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Thu, 31 Dec 2020 00:56:53 +0100 Subject: [PATCH 11/18] intelligent sorting of the bulk edit drop downs --- .../filterable-dropdown.component.html | 2 +- .../filterable-dropdown.component.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html index 015269c17..b09491683 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html +++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html @@ -20,7 +20,7 @@
- +
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts index e1aa6a06a..b51923c27 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts +++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts @@ -18,6 +18,18 @@ export class FilterableDropdownSelectionModel { items: MatchingModel[] = [] + get itemsSorted(): MatchingModel[] { + return this.items.sort((a,b) => { + if (this.getNonTemporary(a.id) == ToggleableItemState.NotSelected && this.getNonTemporary(b.id) != ToggleableItemState.NotSelected) { + return 1 + } else if (this.getNonTemporary(a.id) != ToggleableItemState.NotSelected && this.getNonTemporary(b.id) == ToggleableItemState.NotSelected) { + return -1 + } else { + return a.name.localeCompare(b.name) + } + }) + } + private selectionStates = new Map() private temporarySelectionStates = new Map() @@ -69,6 +81,10 @@ export class FilterableDropdownSelectionModel { } + private getNonTemporary(id: number) { + return this.selectionStates.get(id) || ToggleableItemState.NotSelected + } + get(id: number) { return this.temporarySelectionStates.get(id) || ToggleableItemState.NotSelected } From 45e52aa985c35256f0c7a00b5294c0504a64552e Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Thu, 31 Dec 2020 01:20:38 +0100 Subject: [PATCH 12/18] add the manifest to the frontend entry page #219 --- src/documents/templates/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/documents/templates/index.html b/src/documents/templates/index.html index 47a352cd5..83544b5e4 100644 --- a/src/documents/templates/index.html +++ b/src/documents/templates/index.html @@ -12,7 +12,9 @@ - + + + Loading... From 4c63dad309c8f71a752eb767fb3821517af6fd07 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Thu, 31 Dec 2020 01:43:04 +0100 Subject: [PATCH 13/18] fix sorting for "not assigned" --- .../filterable-dropdown/filterable-dropdown.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html index b09491683..a0e833c98 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html +++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html @@ -20,7 +20,7 @@
- +
From 9eb377703e935cb7bac72aa5519ea444b5aef4eb Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Thu, 31 Dec 2020 01:58:32 +0100 Subject: [PATCH 14/18] fix hover for check boxes --- .../document-card-small/document-card-small.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html index e0d8d28e1..f6128e077 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html @@ -1,5 +1,5 @@
-
+
From 70f052cb5cd6684f04ff12a088eeba347ddee94f Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Thu, 31 Dec 2020 02:15:16 +0100 Subject: [PATCH 15/18] changelog --- docs/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 4357a981b..bba0d087f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -25,6 +25,8 @@ paperless-ng 0.9.10 * Added missing dependencies for Raspberry Pi builds. * Fixed an issue with plain text file consumption: Thumbnail generation failed due to missing fonts. * An issue with the search index reporting missing documents after bulk deletes was fixed. + * Issue with the tag selector not clearing input correctly. + * The consumer used to stop working when encountering an incomplete classifier model file. .. note:: From 3b17f9d6ecc6d1e3459619458ea3fefb260a116d Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Thu, 31 Dec 2020 02:40:43 +0100 Subject: [PATCH 16/18] changelog --- docs/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index bba0d087f..fe4d89a55 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -15,6 +15,7 @@ paperless-ng 0.9.10 * Other changes and additions + * Thanks to `zjean`_, paperless now publishes a webmanifest, which is useful for adding the application to home screens on mobile devices. * The Paperless-ng logo now navigates to the dashboard. * Filter for documents that don't have any correspondents, types or tags assigned. * Tags, types and correspondents are now sorted case insensitive. @@ -958,6 +959,7 @@ bulk of the work on this big change. * Initial release +.. _zjean: https://github.com/zjean .. _rYR79435: https://github.com/rYR79435 .. _Michael Shamoon: https://github.com/shamoon .. _jayme-github: http://github.com/jayme-github From 2a744a3a83cab33d37458bdb79c996c3ee040cf2 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Thu, 31 Dec 2020 11:12:46 +0100 Subject: [PATCH 17/18] roll back changes #184 #227 --- docker/gunicorn.conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/gunicorn.conf.py b/docker/gunicorn.conf.py index 5c9c0eb37..edfb362d9 100644 --- a/docker/gunicorn.conf.py +++ b/docker/gunicorn.conf.py @@ -1,4 +1,4 @@ -bind = ['[::]:8000', 'localhost:8000'] +bind = '0.0.0.0:8000' backlog = 2048 workers = 3 worker_class = 'sync' From 70cb27bf0a04eab157bc1d91d7084f1a29a6bbc3 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Thu, 31 Dec 2020 11:23:03 +0100 Subject: [PATCH 18/18] bump versions --- docker/hub/docker-compose.postgres.yml | 2 +- docker/hub/docker-compose.sqlite.yml | 2 +- docs/changelog.rst | 7 +++++++ src-ui/src/environments/environment.prod.ts | 2 +- src/paperless/version.py | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docker/hub/docker-compose.postgres.yml b/docker/hub/docker-compose.postgres.yml index c2b599e52..0779cea22 100644 --- a/docker/hub/docker-compose.postgres.yml +++ b/docker/hub/docker-compose.postgres.yml @@ -15,7 +15,7 @@ services: POSTGRES_PASSWORD: paperless webserver: - image: jonaswinkler/paperless-ng:0.9.10 + image: jonaswinkler/paperless-ng:0.9.11 restart: always depends_on: - db diff --git a/docker/hub/docker-compose.sqlite.yml b/docker/hub/docker-compose.sqlite.yml index 429d42c06..3eed96cc3 100644 --- a/docker/hub/docker-compose.sqlite.yml +++ b/docker/hub/docker-compose.sqlite.yml @@ -5,7 +5,7 @@ services: restart: always webserver: - image: jonaswinkler/paperless-ng:0.9.10 + image: jonaswinkler/paperless-ng:0.9.11 restart: always depends_on: - broker diff --git a/docs/changelog.rst b/docs/changelog.rst index fe4d89a55..70f5cf683 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,13 @@ Changelog ********* + +paperless-ng 0.9.11 +################### + +* Fixed an issue with the docker image not starting at all due to a configuration change of the web server. + + paperless-ng 0.9.10 ################### diff --git a/src-ui/src/environments/environment.prod.ts b/src-ui/src/environments/environment.prod.ts index 7b707f014..1ac69bc39 100644 --- a/src-ui/src/environments/environment.prod.ts +++ b/src-ui/src/environments/environment.prod.ts @@ -2,5 +2,5 @@ export const environment = { production: true, apiBaseUrl: "/api/", appTitle: "Paperless-ng", - version: "0.9.10" + version: "0.9.11" }; diff --git a/src/paperless/version.py b/src/paperless/version.py index facb097fc..e1ba14cb4 100644 --- a/src/paperless/version.py +++ b/src/paperless/version.py @@ -1 +1 @@ -__version__ = (0, 9, 10) +__version__ = (0, 9, 11)