mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Use correct direction for RTL content
This commit is contained in:

committed by
Trenton H

parent
0fd51e35e1
commit
da38efebdf
@@ -91,7 +91,7 @@
|
||||
<a ngbNavLink i18n>Content</a>
|
||||
<ng-template ngbNavContent>
|
||||
<div class="mb-3">
|
||||
<textarea class="form-control" id="content" rows="20" formControlName='content'></textarea>
|
||||
<textarea class="form-control" id="content" rows="20" formControlName='content' [class.rtl]="isRTL"></textarea>
|
||||
</div>
|
||||
</ng-template>
|
||||
</li>
|
||||
|
@@ -28,3 +28,7 @@
|
||||
left: 30%;
|
||||
right: 30%;
|
||||
}
|
||||
|
||||
textarea.rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
|
@@ -135,6 +135,13 @@ export class DocumentDetailComponent
|
||||
: this.metadata?.original_mime_type
|
||||
}
|
||||
|
||||
get isRTL() {
|
||||
if (!this.metadata || !this.metadata.lang) return false
|
||||
else {
|
||||
return ['ar', 'he', 'fe'].includes(this.metadata.lang)
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.documentForm.valueChanges
|
||||
.pipe(takeUntil(this.unsubscribeNotifier))
|
||||
|
@@ -10,4 +10,6 @@ export interface PaperlessDocumentMetadata {
|
||||
original_filename?: string
|
||||
|
||||
has_archive_version?: boolean
|
||||
|
||||
lang?: string
|
||||
}
|
||||
|
Reference in New Issue
Block a user