mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Normalize whitespace in source files
Ensure that no source files have trailing whitespace at end of lines and ensure that all files end with a single trailing newline. This also adds Github Actions to enforce whitespace conventions.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<app-toasts></app-toasts>
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
<router-outlet></router-outlet>
|
||||
|
@@ -45,7 +45,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
ngOnInit(): void {
|
||||
this.consumerStatusService.connect()
|
||||
|
||||
|
||||
|
||||
this.successSubscription = this.consumerStatusService.onDocumentConsumptionFinished().subscribe(status => {
|
||||
if (this.showNotification(SETTINGS_KEYS.NOTIFICATIONS_CONSUMER_SUCCESS)) {
|
||||
this.toastService.show({title: $localize`Document added`, delay: 10000, content: $localize`Document ${status.filename} was added to paperless.`, actionName: $localize`Open document`, action: () => {
|
||||
|
@@ -30,7 +30,7 @@ export class ConfirmDialogComponent implements OnInit {
|
||||
|
||||
@Input()
|
||||
buttonsEnabled = true
|
||||
|
||||
|
||||
confirmButtonEnabled = true
|
||||
seconds = 0
|
||||
|
||||
|
@@ -55,7 +55,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -83,7 +83,7 @@ export class FilterableDropdownSelectionModel {
|
||||
if (fireEvent) {
|
||||
this.changed.next(this)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private getNonTemporary(id: number) {
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<path d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z"/>
|
||||
</svg>
|
||||
</ng-container>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="mr-1">
|
||||
<app-tag *ngIf="isTag; else displayName" [tag]="item" [clickable]="true" linkTitle="Filter by tag"></app-tag>
|
||||
|
@@ -11,7 +11,7 @@ export class AbstractInputComponent<T> implements OnInit, ControlValueAccessor {
|
||||
constructor() { }
|
||||
|
||||
onChange = (newValue: T) => {};
|
||||
|
||||
|
||||
onTouched = () => {};
|
||||
|
||||
writeValue(newValue: any): void {
|
||||
|
@@ -2,4 +2,4 @@
|
||||
<input type="checkbox" class="custom-control-input" [id]="inputId" [(ngModel)]="value" (change)="onChange(value)" (blur)="onTouched()" [disabled]="disabled">
|
||||
<label class="custom-control-label" [for]="inputId">{{title}}</label>
|
||||
<small *ngIf="hint" class="form-text text-muted">{{hint}}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -15,7 +15,7 @@ import { AbstractInputComponent } from '../abstract-input';
|
||||
})
|
||||
export class CheckComponent extends AbstractInputComponent<boolean> {
|
||||
|
||||
constructor() {
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
|
@@ -5,12 +5,12 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" [style.background-color]="value"> </span>
|
||||
</div>
|
||||
|
||||
|
||||
<ng-template #popContent>
|
||||
<div style="min-width: 200px;" class="pb-3">
|
||||
<color-slider [color]="value" (onChangeComplete)="colorChanged($event.color.hex)"></color-slider>
|
||||
</div>
|
||||
|
||||
|
||||
</ng-template>
|
||||
|
||||
<input class="form-control" [class.is-invalid]="error" [id]="inputId" [(ngModel)]="value" (change)="onChange(value)" [autoClose]="'outside'" [ngbPopover]="popContent" placement="bottom" popoverClass="shadow">
|
||||
@@ -30,4 +30,4 @@
|
||||
<div class="invalid-feedback">
|
||||
{{error}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -11,4 +11,4 @@
|
||||
</div>
|
||||
<small *ngIf="hint" class="form-text text-muted">{{hint}}</small>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -5,4 +5,4 @@
|
||||
<div class="invalid-feedback">
|
||||
{{error}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -12,4 +12,4 @@
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-dark" (click)="cancelClicked()" i18n>Cancel</button>
|
||||
<button type="button" class="btn btn-primary" (click)="selectClicked.emit(selected)" i18n>Select</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,2 +1,2 @@
|
||||
<span *ngIf="!clickable" class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</span>
|
||||
<a [routerLink]="" [title]="linkTitle" *ngIf="clickable" class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</a>
|
||||
<a [routerLink]="" [title]="linkTitle" *ngIf="clickable" class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</a>
|
||||
|
@@ -23,7 +23,7 @@ export class StatisticsWidgetComponent implements OnInit, OnDestroy {
|
||||
statistics: Statistics = {}
|
||||
|
||||
subscription: Subscription
|
||||
|
||||
|
||||
private getStatistics(): Observable<Statistics> {
|
||||
return this.http.get(`${environment.apiBaseUrl}statistics/`)
|
||||
}
|
||||
|
@@ -13,4 +13,4 @@
|
||||
<p i18n>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>
|
||||
</app-widget-frame>
|
||||
|
@@ -4,9 +4,9 @@
|
||||
<h5 class="card-title mb-0">{{title}}</h5>
|
||||
<ng-content select ="[header-buttons]"></ng-content>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-body text-dark">
|
||||
<ng-content select ="[content]"></ng-content>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -20,4 +20,4 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,3 +1,3 @@
|
||||
.metadata-column {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
}
|
||||
|
@@ -64,4 +64,4 @@
|
||||
span ::ng-deep .match {
|
||||
color: black;
|
||||
background-color: rgb(255, 211, 66);
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<div class="form-inline d-flex align-items-center">
|
||||
<div class="input-group input-group-sm flex-fill w-auto">
|
||||
<div class="input-group-prepend" ngbDropdown>
|
||||
<button class="btn btn-outline-primary" ngbDropdownToggle>{{textFilterTargetName}}</button>
|
||||
<button class="btn btn-outline-primary" ngbDropdownToggle>{{textFilterTargetName}}</button>
|
||||
<div class="dropdown-menu shadow" ngbDropdownMenu>
|
||||
<button *ngFor="let t of textFilterTargets" ngbDropdownItem [class.active]="textFilterTarget == t.id" (click)="changeTextFilterTarget(t.id)">{{t.name}}</button>
|
||||
</div>
|
||||
|
@@ -32,6 +32,6 @@ export class CorrespondentEditDialogComponent extends EditDialogComponent<Paperl
|
||||
match: new FormControl(""),
|
||||
is_insensitive: new FormControl(true)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ export class CorrespondentListComponent extends GenericListComponent<PaperlessCo
|
||||
constructor(correspondentsService: CorrespondentService, modalService: NgbModal,
|
||||
private list: DocumentListViewService,
|
||||
toastService: ToastService
|
||||
) {
|
||||
) {
|
||||
super(correspondentsService,modalService,CorrespondentEditDialogComponent, toastService)
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
})
|
||||
export class DocumentTypeEditDialogComponent extends EditDialogComponent<PaperlessDocumentType> {
|
||||
|
||||
constructor(service: DocumentTypeService, activeModal: NgbActiveModal, toastService: ToastService) {
|
||||
constructor(service: DocumentTypeService, activeModal: NgbActiveModal, toastService: ToastService) {
|
||||
super(service, activeModal, toastService)
|
||||
}
|
||||
|
||||
|
@@ -49,4 +49,4 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
@@ -52,4 +52,4 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
@@ -5,4 +5,4 @@
|
||||
<path d="M7 6.5C7 7.328 6.552 8 6 8s-1-.672-1-1.5S5.448 5 6 5s1 .672 1 1.5zm4 0c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5S9.448 5 10 5s1 .672 1 1.5z"/>
|
||||
</svg>
|
||||
<h1 i18n>404 Not Found</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -6,7 +6,7 @@ export function cloneFilterRules(filterRules: FilterRule[]): FilterRule[] {
|
||||
for (let rule of filterRules) {
|
||||
newRules.push({rule_type: rule.rule_type, value: rule.value})
|
||||
}
|
||||
return newRules
|
||||
return newRules
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
@@ -19,4 +19,4 @@ export function isFullTextFilterRule(filterRules: FilterRule[]): boolean {
|
||||
export interface FilterRule {
|
||||
rule_type: number
|
||||
value: string
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { MatchingModel } from './matching-model';
|
||||
|
||||
export interface PaperlessCorrespondent extends MatchingModel {
|
||||
|
||||
|
||||
last_correspondence?: Date
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
export interface PaperlessDocumentMetadata {
|
||||
|
||||
|
||||
original_checksum?: string
|
||||
|
||||
archived_checksum?: string
|
||||
@@ -10,4 +10,4 @@ export interface PaperlessDocumentMetadata {
|
||||
|
||||
has_archive_version?: boolean
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -6,4 +6,4 @@ export interface PaperlessDocumentSuggestions {
|
||||
|
||||
document_types?: number[]
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -15,4 +15,4 @@ export interface PaperlessSavedView extends ObjectWithId {
|
||||
|
||||
filter_rules: FilterRule[]
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -3,5 +3,5 @@ export interface Results<T> {
|
||||
count: number
|
||||
|
||||
results: T[]
|
||||
|
||||
|
||||
}
|
||||
|
@@ -8,4 +8,4 @@ export interface WebsocketConsumerStatusMessage {
|
||||
message?: string
|
||||
document_id: number
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ export class ApiVersionInterceptor implements HttpInterceptor {
|
||||
'Accept': `application/json; version=${environment.apiVersion}`
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return next.handle(request);
|
||||
}
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ export class CsrfInterceptor implements HttpInterceptor {
|
||||
let prefix = ""
|
||||
if (this.meta.getTag('name=cookie_prefix')) {
|
||||
prefix = this.meta.getTag('name=cookie_prefix').content
|
||||
}
|
||||
}
|
||||
let csrfToken = this.cookieService.get(`${prefix?prefix:''}csrftoken`)
|
||||
if (csrfToken) {
|
||||
request = request.clone({
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* https://gist.github.com/JonCatmull/ecdf9441aaa37336d9ae2c7f9cb7289a
|
||||
*
|
||||
*
|
||||
* @license
|
||||
* Copyright (c) 2019 Jonathan Catmull.
|
||||
*
|
||||
|
@@ -16,4 +16,4 @@ export class SafePipe implements PipeTransform {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ export class OpenDocumentsService {
|
||||
|
||||
private MAX_OPEN_DOCUMENTS = 5
|
||||
|
||||
constructor(private documentService: DocumentService) {
|
||||
constructor(private documentService: DocumentService) {
|
||||
if (sessionStorage.getItem(OPEN_DOCUMENT_SERVICE.DOCUMENTS)) {
|
||||
try {
|
||||
this.openDocuments = JSON.parse(sessionStorage.getItem(OPEN_DOCUMENT_SERVICE.DOCUMENTS))
|
||||
|
@@ -44,7 +44,7 @@ export class SavedViewService extends AbstractPaperlessService<PaperlessSavedVie
|
||||
tap(() => this.reload())
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
patchMany(objects: PaperlessSavedView[]): Observable<PaperlessSavedView[]> {
|
||||
return combineLatest(objects.map(o => super.patch(o))).pipe(
|
||||
tap(() => this.reload())
|
||||
|
@@ -10,10 +10,10 @@ import { DocumentService } from './document.service';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SearchService {
|
||||
|
||||
|
||||
constructor(private http: HttpClient) { }
|
||||
|
||||
autocomplete(term: string): Observable<string[]> {
|
||||
return this.http.get<string[]>(`${environment.apiBaseUrl}search/autocomplete/`, {params: new HttpParams().set('term', term)})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ function componentToHex(c) {
|
||||
|
||||
/**
|
||||
* https://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c
|
||||
*
|
||||
*
|
||||
* Converts an HSL color value to RGB. Conversion formula
|
||||
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
|
||||
* Assumes h, s, and l are contained in the set [0, 1] and
|
||||
@@ -45,4 +45,4 @@ function hslToRgb(h, s, l){
|
||||
export function randomColor() {
|
||||
let rgb = hslToRgb(Math.random(), 0.6, Math.random() * 0.4 + 0.4)
|
||||
return `#${componentToHex(rgb[0])}${componentToHex(rgb[1])}${componentToHex(rgb[2])}`
|
||||
}
|
||||
}
|
||||
|
@@ -56,4 +56,4 @@ export class LocalizedDateParserFormatter extends NgbDateParserFormatter {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user