mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-18 12:37:08 +01:00
added paperless ui
This commit is contained in:
parent
d5a1a4916e
commit
131533d9eb
173 changed files with 18693 additions and 0 deletions
19
src-ui/src/app/pipes/safe.pipe.ts
Normal file
19
src-ui/src/app/pipes/safe.pipe.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
@Pipe({
|
||||
name: 'safe'
|
||||
})
|
||||
export class SafePipe implements PipeTransform {
|
||||
|
||||
constructor(private sanitizer: DomSanitizer) { }
|
||||
|
||||
transform(url) {
|
||||
if (url == null) {
|
||||
return this.sanitizer.bypassSecurityTrustResourceUrl("")
|
||||
} else {
|
||||
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue