Merge branch 'main' into dev

This commit is contained in:
Michael Shamoon 2022-03-10 16:40:38 -08:00
commit 96a84d16a6
10 changed files with 743 additions and 393 deletions

View File

@ -4,6 +4,7 @@ on:
push:
tags:
- ngx-*
- beta-*
branches-ignore:
- 'translations**'
pull_request:
@ -143,6 +144,74 @@ jobs:
cd src/
coveralls --service=github
# build and push image to docker hub.
build-docker-image:
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/beta' || startsWith(github.ref, 'refs/tags/ngx-') || startsWith(github.ref, 'refs/tags/beta-'))
runs-on: ubuntu-latest
needs: [tests, codeformatting, codestyle]
steps:
-
name: Prepare
id: prepare
run: |
IMAGE_NAME=ghcr.io/${{ github.repository }}
if [[ $GITHUB_REF == refs/tags/ngx-* ]]; then
TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/tags/ngx-},${IMAGE_NAME}:latest
INSPECT_TAG=${IMAGE_NAME}:latest
elif [[ $GITHUB_REF == refs/tags/beta-* ]]; then
TAGS=${IMAGE_NAME}:beta
INSPECT_TAG=${TAGS}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/heads/}
INSPECT_TAG=${TAGS}
else
exit 1
fi
echo ::set-output name=tags::${TAGS}
echo ::set-output name=inspect_tag::${INSPECT_TAG}
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Login to Github Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: ${{ steps.prepare.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
-
name: Inspect image
run: |
docker buildx imagetools inspect ${{ steps.prepare.outputs.inspect_tag }}
-
name: Export frontend artifact from docker
run: |
docker run -d --name frontend-extract ${{ steps.prepare.outputs.inspect_tag }}
docker cp frontend-extract:/usr/src/paperless/src/documents/static/frontend src/documents/static/frontend/
-
name: Upload frontend artifact
uses: actions/upload-artifact@v2
with:
name: frontend-compiled
path: src/documents/static/frontend/
build-release:
needs: [build-docker-image, documentation, tests, codeformatting, codestyle]
runs-on: ubuntu-20.04
@ -213,7 +282,7 @@ jobs:
publish-release:
runs-on: ubuntu-latest
needs: build-release
if: contains(github.ref, 'refs/tags/ngx-')
if: contains(github.ref, 'refs/tags/ngx-') || contains(github.ref, 'refs/tags/beta-')
steps:
-
name: Download release artifact
@ -225,7 +294,15 @@ jobs:
name: Get version
id: get_version
run: |
echo ::set-output name=version::${GITHUB_REF#refs/tags/ngx-}
if [[ $GITHUB_REF == refs/tags/ngx-* ]]; then
echo ::set-output name=version::${GITHUB_REF#refs/tags/ngx-}
echo ::set-output name=prerelease::false
echo ::set-output name=body::"For a complete list of changes, see the changelog at https://paperless-ngx.readthedocs.io/en/latest/changelog.html"
elif [[ $GITHUB_REF == refs/tags/beta-* ]]; then
echo ::set-output name=version::${GITHUB_REF#refs/tags/beta-}
echo ::set-output name=prerelease::true
echo ::set-output name=body::"For a complete list of changes, see the changelog at https://github.com/paperless-ngx/paperless-ngx/blob/beta/docs/changelog.rst"
fi
-
name: Create release
id: create_release
@ -236,9 +313,8 @@ jobs:
tag_name: ngx-${{ steps.get_version.outputs.version }}
release_name: Paperless-ngx ${{ steps.get_version.outputs.version }}
draft: false
prerelease: false
body: |
For a complete list of changes, see the changelog at https://paperless-ngx.readthedocs.io/en/latest/changelog.html.
prerelease: ${{ steps.get_version.outputs.prerelease }}
body: ${{ steps.get_version.outputs.body }}
-
name: Upload release archive
id: upload-release-asset
@ -249,69 +325,4 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./paperless-ngx.tar.xz
asset_name: paperless-ngx-${{ steps.get_version.outputs.version }}.tar.xz
asset_content_type: application/x-xz
# build and push image to docker hub.
build-docker-image:
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ngx-'))
runs-on: ubuntu-latest
needs: [tests, codeformatting, codestyle]
steps:
-
name: Prepare
id: prepare
run: |
IMAGE_NAME=ghcr.io/${{ github.repository }}
if [[ $GITHUB_REF == refs/tags/ngx-* ]]; then
TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/tags/ngx-},${IMAGE_NAME}:latest
INSPECT_TAG=${IMAGE_NAME}:latest
elif [[ $GITHUB_REF == refs/heads/* ]]; then
TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/heads/}
INSPECT_TAG=${TAGS}
else
exit 1
fi
echo ::set-output name=tags::${TAGS}
echo ::set-output name=inspect_tag::${INSPECT_TAG}
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Login to Github Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: ${{ steps.prepare.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
-
name: Inspect image
run: |
docker buildx imagetools inspect ${{ steps.prepare.outputs.inspect_tag }}
-
name: Export frontend artifact from docker
run: |
docker run -d --name frontend-extract ${{ steps.prepare.outputs.tags }}
docker cp frontend-extract:/usr/src/paperless/src/documents/static/frontend src/documents/static/frontend/
-
name: Upload frontend artifact
uses: actions/upload-artifact@v2
with:
name: frontend-compiled
path: src/documents/static/frontend/
asset_content_type: application/x-xz

View File

@ -5,6 +5,53 @@
Changelog
*********
paperless-ngx 1.6.0
###################
This is the first release of the revived paperless-ngx project 🎉. Thank you to everyone on the paperless-ngx team for your initiative and excellent teamwork!
Version 1.6.0 merges several pending PRs from jonaswinkler's repo and includes new feature updates and bug fixes. Major backend and UI changes include:
* Updated docs, scripts, CI, and containers to paperless-ngx.
* Updated Python and Angular dependencies.
* Dropped support for Python 3.7.
* Dropped support for Ansible playbooks (thanks `@slankes`_ #109). If someone would like to continue supporting them, please see the `ansible repo`_.
* Python code is now required to use Black formatting (thanks `@kpj`_ #168).
* `@tribut`_ added support for a custom SSO logout redirect (jonaswinkler#1258). See ``PAPERLESS_LOGOUT_REDIRECT_URL``.
* `@shamoon`_ added a loading indicator when document list is reloading (jonaswinkler#1297).
* `@shamoon`_ improved the PDF viewer on mobile (#2).
* `@shamoon`_ added 'any' / 'all' and 'not' filtering with tags (#10).
* `@shamoon`_ added warnings for unsaved changes, with smart edit buttons (#13).
* `@benjaminfrank`_ enabled a non-root access to port 80 via systemd (#18).
* `@tribut`_ added simple "delete to trash" functionality (#24). See ``PAPERLESS_TRASH_DIR``.
* `@amenk`_ fixed the search box overlay menu on mobile (#32).
* `@dblitt`_ updated the login form to not auto-capitalize usernames (#36).
* `@evilsidekick293`_ made the worker timeout configurable (#37). See ``PAPERLESS_WORKER_TIMEOUT``.
* `@Nicarim`_ fixed downloads of UTF-8 formatted documents in Firefox (#56).
* `@mweimerskirch`_ sorted the language dropdown by locale (#78).
* `@mweimerskirch`_ enabled the Czech (#83) and Danish (#84) translations.
* `@cschmatzler`_ enabled specifying the webserver port (#124). See ``PAPERLESS_PORT``.
* `@muellermartin`_ fixed an error when uploading transparent PNGs (#133).
* `@shamoon`_ created a slick new logo (#165).
* `@tim-vogel`_ fixed exports missing groups (#193).
Thank you to the following people for their documentation updates, fixes, and comprehensive testing:
`@m0veax`_, `@a17t`_, `@fignew`_, `@muued`_, `@bauerj`_, `@isigmund`_, `@denilsonsa`_, `@mweimerskirch`_, `@alexander-bauer`_, `@apeltzer`_, `@tribut`_, `@yschroeder`_, `@gador`_, `@sAksham-Ar`_, `@sbrunner`_, `@philpagel`_, `@davemachado`_, `@2600box`_, `@qcasey`_, `@Nicarim`_, `@kpj`_, `@filcuk`_, `@Timoms`_, `@mattlamb99`_, `@padraigkitterick`_, `@ajkavanagh`_, `@Tooa`_, `@Unkn0wnCat`_, `@pewter77`_, `@stumpylog`_, `@Toxix`_, `@azapater`_, `@jschpp`_
Another big thanks to the people who have contributed translations:
* Michel Weimerskirch (michel_weimerskirch) suggested 31 translations into French and Luxembourgish.
* jo.vandeginste suggested 21 translations into Dutch.
* Lars Sørensen (Lrss) suggested 486 translations into Danish.
* Alex (Sky-Dragon) voted for 46 translations in German.
* Yannic Schröder (yschroeder) suggested 14 translations into German.
* David Morais Ferreira (DavidMoraisFerreira) voted for 10 translations in Portuguese and Luxembourgish.
* David Morais Ferreira (DavidMoraisFerreira) suggested 88 translations into French, German, Portuguese, Portuguese, Brazilian and Luxembourgish.
* 汪泠沣 (wlfcss) suggested 13 translations into Chinese Traditional.
* Lars Sørensen (Lrss) suggested 167 translations into Danish.
* Philmo67 suggested 11 translations into French.
paperless-ng 1.5.0
##################
@ -1483,6 +1530,49 @@ bulk of the work on this big change.
.. _Brian Cribbs: https://github.com/cribbstechnolog
.. _Brendan M. Sleight: https://github.com/bmsleight
.. _Daniel Albers: https://github.com/AlD
.. _@shamoon: https://github.com/shamoon
.. _@amenk: https://github.com/amenk
.. _@dblitt: https://github.com/dblitt
.. _@evilsidekick293: https://github.com/evilsidekick293
.. _@m0veax: https://github.com/m0veax
.. _@fignew: https://github.com/fignew
.. _@muued: https://github.com/muued
.. _@isigmund: https://github.com/isigmund
.. _@denilsonsa: https://github.com/denilsonsa
.. _@sAksham-Ar: https://github.com/sAksham-Ar
.. _@philpagel: https://github.com/philpagel
.. _@davemachado: https://github.com/davemachado
.. _@2600box: https://github.com/2600box
.. _@qcasey: https://github.com/qcasey
.. _@kpj: https://github.com/kpj
.. _@mweimerskirch: https://github.com/mweimerskirch
.. _@filcuk: https://github.com/filcuk
.. _@FrankStrieter: https://github.com/FrankStrieter
.. _@tribut: https://github.com/tribut
.. _@yschroeder: https://github.com/yschroeder
.. _@gador: https://github.com/gador
.. _@Nicarim: https://github.com/Nicarim
.. _@bauerj: https://github.com/bauerj
.. _@a17t: https://github.com/a17t
.. _@alexander-bauer: https://github.com/alexander-bauer
.. _@apeltzer: https://github.com/apeltzer
.. _@Timoms: https://github.com/Timoms
.. _@sbrunner: https://github.com/sbrunner
.. _@slankes: https://github.com/slankes
.. _@mattlamb99: https://github.com/mattlamb99
.. _@padraigkitterick: https://github.com/padraigkitterick
.. _@ajkavanagh: https://github.com/ajkavanagh
.. _@Tooa: https://github.com/Tooa
.. _@Unkn0wnCat: https://github.com/Unkn0wnCat
.. _@pewter77: https://github.com/pewter77
.. _@cschmatzler: https://github.com/cschmatzler
.. _@muellermartin: https://github.com/muellermartin
.. _@stumpylog: https://github.com/stumpylog
.. _@Toxix: https://github.com/Toxix
.. _@benjaminfrank: https://github.com/benjaminfrank
.. _@azapater: https://github.com/azapater
.. _@tim-vogel: https://github.com/tim-vogel
.. _@jschpp: https://github.com/jschpp
.. _#20: https://github.com/the-paperless-project/paperless/issues/20
.. _#44: https://github.com/the-paperless-project/paperless/issues/44
@ -1595,3 +1685,4 @@ bulk of the work on this big change.
.. _a new home on Docker Hub: https://hub.docker.com/r/danielquinn/paperless/
.. _optipng: http://optipng.sourceforge.net/
.. _DjangoQL: https://github.com/ivelum/djangoql
.. _ansible repo: https://github.com/paperless-ngx/paperless-ngx-ansible

864
src-ui/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,14 +12,14 @@
"private": true,
"dependencies": {
"@angular/animations": "~13.2.4",
"@angular/common": "~13.2.4",
"@angular/common": "~13.2.5",
"@angular/compiler": "~13.2.4",
"@angular/core": "~13.2.4",
"@angular/forms": "~13.2.4",
"@angular/forms": "~13.2.5",
"@angular/localize": "~13.2.4",
"@angular/platform-browser": "~13.2.4",
"@angular/platform-browser": "~13.2.5",
"@angular/platform-browser-dynamic": "~13.2.4",
"@angular/router": "~13.2.4",
"@angular/router": "~13.2.5",
"@ng-bootstrap/ng-bootstrap": "^12.0.0",
"@ng-select/ng-select": "^8.1.1",
"@ngneat/dirty-check-forms": "^1.1.0",
@ -52,7 +52,7 @@
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"protractor": "~7.0.0",
"ts-node": "~10.5.0",
"ts-node": "~10.7.0",
"tslint": "~6.1.3",
"typescript": "~4.5.5"
}

View File

@ -94,10 +94,11 @@ export class DocumentDetailComponent implements OnInit, OnDestroy, DirtyComponen
private toastService: ToastService,
private settings: SettingsService) {
this.titleSubject.pipe(
debounceTime(200),
debounceTime(1000),
distinctUntilChanged(),
takeUntil(this.unsubscribeNotifier)
).subscribe(titleValue => {
this.title = titleValue
this.documentForm.patchValue({'title': titleValue})
})
}
@ -146,7 +147,7 @@ export class DocumentDetailComponent implements OnInit, OnDestroy, DirtyComponen
correspondent: doc.correspondent,
document_type: doc.document_type,
archive_serial_number: doc.archive_serial_number,
tags: doc.tags
tags: [...doc.tags]
})
this.isDirty$ = dirtyCheck(this.documentForm, this.store.asObservable())

View File

@ -6,7 +6,7 @@
<div class="col-md mb-2 mb-xl-0">
<div class="form-inline d-flex align-items-center">
<label class="text-muted me-2 mb-0" i18n>Filter by:</label>
<input class="form-control form-control-sm flex-fill w-auto" type="text" [(ngModel)]="nameFilter" placeholder="Name" i18n-placeholder>
<input class="form-control form-control-sm flex-fill w-auto" type="text" autofocus [(ngModel)]="nameFilter" (keyup)="onNameFilterKeyUp($event)" placeholder="Name" i18n-placeholder>
</div>
</div>

View File

@ -6,7 +6,7 @@
<div class="col-md mb-2 mb-xl-0">
<div class="form-inline d-flex align-items-center">
<label class="text-muted me-2 mb-0" i18n>Filter by:</label>
<input class="form-control form-control-sm flex-fill w-auto" type="text" [(ngModel)]="nameFilter" placeholder="Name" i18n-placeholder>
<input class="form-control form-control-sm flex-fill w-auto" type="text" autofocus [(ngModel)]="nameFilter" (keyup)="onNameFilterKeyUp($event)" placeholder="Name" i18n-placeholder>
</div>
</div>

View File

@ -61,6 +61,7 @@ export abstract class GenericListComponent<T extends ObjectWithId> implements On
distinctUntilChanged()
).subscribe(title => {
this._nameFilter = title
this.page = 1
this.reloadData()
})
}
@ -124,4 +125,8 @@ export abstract class GenericListComponent<T extends ObjectWithId> implements On
set nameFilter(nameFilter: string) {
this.nameFilterDebounce.next(nameFilter)
}
onNameFilterKeyUp(event: KeyboardEvent) {
if (event.code == 'Escape') this.nameFilterDebounce.next(null)
}
}

View File

@ -6,7 +6,7 @@
<div class="col-md mb-2 mb-xl-0">
<div class="form-inline d-flex align-items-center">
<label class="text-muted me-2 mb-0" i18n>Filter by:</label>
<input class="form-control form-control-sm flex-fill w-auto" type="text" [(ngModel)]="nameFilter" placeholder="Name" i18n-placeholder>
<input class="form-control form-control-sm flex-fill w-auto" type="text" autofocus [(ngModel)]="nameFilter" (keyup)="onNameFilterKeyUp($event)" placeholder="Name" i18n-placeholder>
</div>
</div>

View File

@ -5,7 +5,7 @@ export const environment = {
apiBaseUrl: document.baseURI + "api/",
apiVersion: "2",
appTitle: "Paperless-ngx",
version: "1.5.0",
version: "1.6.0",
webSocketHost: window.location.host,
webSocketProtocol: (window.location.protocol == "https:" ? "wss:" : "ws:"),
webSocketBaseUrl: base_url.pathname + "ws/",