mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-06 21:13:43 -05:00
Compare commits
1 Commits
82370963da
...
feature-fl
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f26f44c325 |
@@ -10,8 +10,10 @@ component_management:
|
|||||||
paths:
|
paths:
|
||||||
- src-ui/**
|
- src-ui/**
|
||||||
# https://docs.codecov.com/docs/pull-request-comments
|
# https://docs.codecov.com/docs/pull-request-comments
|
||||||
|
# codecov will only comment if coverage changes
|
||||||
comment:
|
comment:
|
||||||
layout: "header, diff, components, flags, files"
|
layout: "header, diff, components, flags, files"
|
||||||
|
require_changes: true
|
||||||
# https://docs.codecov.com/docs/javascript-bundle-analysis
|
# https://docs.codecov.com/docs/javascript-bundle-analysis
|
||||||
require_bundle_changes: true
|
require_bundle_changes: true
|
||||||
bundle_change_threshold: "50Kb"
|
bundle_change_threshold: "50Kb"
|
||||||
|
@@ -33,7 +33,7 @@ warns that
|
|||||||
`OCR for XX failed, but we're going to stick with what we've got since FORGIVING_OCR is enabled`,
|
`OCR for XX failed, but we're going to stick with what we've got since FORGIVING_OCR is enabled`,
|
||||||
then you might need to install the [Tesseract language
|
then you might need to install the [Tesseract language
|
||||||
files](https://packages.ubuntu.com/search?keywords=tesseract-ocr)
|
files](https://packages.ubuntu.com/search?keywords=tesseract-ocr)
|
||||||
matching your document's languages.
|
marching your document's languages.
|
||||||
|
|
||||||
As an example, if you are running Paperless-ngx from any Ubuntu or
|
As an example, if you are running Paperless-ngx from any Ubuntu or
|
||||||
Debian box, and your documents are written in Spanish you may need to
|
Debian box, and your documents are written in Spanish you may need to
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
<div class="selected-icon">
|
<div class="selected-icon">
|
||||||
@if (createdRelativeDate) {
|
@if (createdRelativeDate) {
|
||||||
<a class="text-light focus-variants" href="javascript:void(0)" (click)="clearCreatedRelativeDate()">
|
<a class="text-light focus-variants" href="javascript:void(0)" (click)="clearCreatedRelativeDate()">
|
||||||
<i-bs width="1em" height="1em" name="check" class="variant-unfocused text-dark"></i-bs>
|
<i-bs width="1em" height="1em" name="check" class="variant-unfocused"></i-bs>
|
||||||
<i-bs width="1em" height="1em" name="x" class="variant-focused text-primary"></i-bs>
|
<i-bs width="1em" height="1em" name="x" class="variant-focused text-primary"></i-bs>
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
@@ -444,6 +444,12 @@ export class SettingsService {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._renderer.setAttribute(
|
||||||
|
this.document.documentElement,
|
||||||
|
'data-bs-theme',
|
||||||
|
'dark-flat'
|
||||||
|
)
|
||||||
|
|
||||||
if (themeColor?.length) {
|
if (themeColor?.length) {
|
||||||
const hsl = hexToHsl(themeColor)
|
const hsl = hexToHsl(themeColor)
|
||||||
const bgBrightnessEstimate = estimateBrightnessForColor(themeColor)
|
const bgBrightnessEstimate = estimateBrightnessForColor(themeColor)
|
||||||
|
@@ -349,3 +349,52 @@ $form-check-radio-checked-bg-image-dark: url("data:image/svg+xml,<svg xmlns='htt
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[data-bs-theme="dark-flat"] {
|
||||||
|
body:not(.primary-light):not(.primary-dark) {
|
||||||
|
@include paperless-green-dark-mode;
|
||||||
|
|
||||||
|
.navbar.bg-primary {
|
||||||
|
// navbar is og green in dark mode
|
||||||
|
@include paperless-green;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@include dark-mode;
|
||||||
|
|
||||||
|
.btn-outline-primary, .btn-outline-secondary {
|
||||||
|
border-color: var(--pngx-bg-alt) !important;
|
||||||
|
background-color: var(--pngx-bg-alt) !important;
|
||||||
|
color: var(--bs-body-color) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline-secondary:hover, .btn-outline-secondary:focus, .btn-outline-secondary:active, .btn-outline-secondary.active {
|
||||||
|
background-color: var(--pngx-bg-darker) !important;
|
||||||
|
color: var(--pngx-body-color-accent) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline-danger {
|
||||||
|
border-color: var(--pngx-bg-alt) !important;
|
||||||
|
background-color: var(--pngx-bg-alt) !important;
|
||||||
|
color: var(--bs-danger) !important;
|
||||||
|
|
||||||
|
&:hover, &:focus, &.active, &:active {
|
||||||
|
background-color: var(--pngx-bg-darker) !important;
|
||||||
|
color: var(--bs-danger) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control:not(.btn), input, select, textarea,
|
||||||
|
.form-select:not(.is-invalid):not(:disabled), .form-check-input,
|
||||||
|
.ng-select .ng-select-container {
|
||||||
|
background-color: var(--pngx-bg-darker) !important;
|
||||||
|
color: var(--bs-body-color) !important;
|
||||||
|
border-color: var(--pngx-bg-alt) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group .input-group-text {
|
||||||
|
background-color: var(--pngx-bg-alt);
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
border-color: var(--pngx-bg-alt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -2836,11 +2836,6 @@ class SystemStatusView(PassUserMixin):
|
|||||||
last_trained_task = (
|
last_trained_task = (
|
||||||
PaperlessTask.objects.filter(
|
PaperlessTask.objects.filter(
|
||||||
task_name=PaperlessTask.TaskName.TRAIN_CLASSIFIER,
|
task_name=PaperlessTask.TaskName.TRAIN_CLASSIFIER,
|
||||||
status__in=[
|
|
||||||
states.SUCCESS,
|
|
||||||
states.FAILURE,
|
|
||||||
states.REVOKED,
|
|
||||||
], # ignore running tasks
|
|
||||||
)
|
)
|
||||||
.order_by("-date_done")
|
.order_by("-date_done")
|
||||||
.first()
|
.first()
|
||||||
@@ -2850,7 +2845,7 @@ class SystemStatusView(PassUserMixin):
|
|||||||
if last_trained_task is None:
|
if last_trained_task is None:
|
||||||
classifier_status = "WARNING"
|
classifier_status = "WARNING"
|
||||||
classifier_error = "No classifier training tasks found"
|
classifier_error = "No classifier training tasks found"
|
||||||
elif last_trained_task and last_trained_task.status != states.SUCCESS:
|
elif last_trained_task and last_trained_task.status == states.FAILURE:
|
||||||
classifier_status = "ERROR"
|
classifier_status = "ERROR"
|
||||||
classifier_error = last_trained_task.result
|
classifier_error = last_trained_task.result
|
||||||
classifier_last_trained = (
|
classifier_last_trained = (
|
||||||
@@ -2860,11 +2855,6 @@ class SystemStatusView(PassUserMixin):
|
|||||||
last_sanity_check = (
|
last_sanity_check = (
|
||||||
PaperlessTask.objects.filter(
|
PaperlessTask.objects.filter(
|
||||||
task_name=PaperlessTask.TaskName.CHECK_SANITY,
|
task_name=PaperlessTask.TaskName.CHECK_SANITY,
|
||||||
status__in=[
|
|
||||||
states.SUCCESS,
|
|
||||||
states.FAILURE,
|
|
||||||
states.REVOKED,
|
|
||||||
], # ignore running tasks
|
|
||||||
)
|
)
|
||||||
.order_by("-date_done")
|
.order_by("-date_done")
|
||||||
.first()
|
.first()
|
||||||
@@ -2874,7 +2864,7 @@ class SystemStatusView(PassUserMixin):
|
|||||||
if last_sanity_check is None:
|
if last_sanity_check is None:
|
||||||
sanity_check_status = "WARNING"
|
sanity_check_status = "WARNING"
|
||||||
sanity_check_error = "No sanity check tasks found"
|
sanity_check_error = "No sanity check tasks found"
|
||||||
elif last_sanity_check and last_sanity_check.status != states.SUCCESS:
|
elif last_sanity_check and last_sanity_check.status == states.FAILURE:
|
||||||
sanity_check_status = "ERROR"
|
sanity_check_status = "ERROR"
|
||||||
sanity_check_error = last_sanity_check.result
|
sanity_check_error = last_sanity_check.result
|
||||||
sanity_check_last_run = (
|
sanity_check_last_run = (
|
||||||
|
@@ -1205,8 +1205,8 @@ def _ocr_to_dateparser_languages(ocr_languages: str) -> list[str]:
|
|||||||
|
|
||||||
language_part = ocr_to_dateparser.get(ocr_lang_part)
|
language_part = ocr_to_dateparser.get(ocr_lang_part)
|
||||||
if language_part is None:
|
if language_part is None:
|
||||||
logger.debug(
|
logger.warning(
|
||||||
f'Unable to map OCR language "{ocr_lang_part}" to dateparser locale. ',
|
f'Skipping unknown OCR language "{ocr_language}" — no dateparser equivalent.',
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@@ -1219,7 +1219,7 @@ def _ocr_to_dateparser_languages(ocr_languages: str) -> list[str]:
|
|||||||
try:
|
try:
|
||||||
loader.get_locale_map(locales=[dateparser_language])
|
loader.get_locale_map(locales=[dateparser_language])
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.info(
|
logger.warning(
|
||||||
f"Language variant '{dateparser_language}' not supported by dateparser; falling back to base language '{language_part}'. You can manually set PAPERLESS_DATE_PARSER_LANGUAGES if needed.",
|
f"Language variant '{dateparser_language}' not supported by dateparser; falling back to base language '{language_part}'. You can manually set PAPERLESS_DATE_PARSER_LANGUAGES if needed.",
|
||||||
)
|
)
|
||||||
dateparser_language = language_part
|
dateparser_language = language_part
|
||||||
@@ -1229,12 +1229,12 @@ def _ocr_to_dateparser_languages(ocr_languages: str) -> list[str]:
|
|||||||
result.append(dateparser_language)
|
result.append(dateparser_language)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"Error auto-configuring dateparser languages. Set PAPERLESS_DATE_PARSER_LANGUAGES parameter to avoid this. Detail: {e}",
|
f"Could not configure dateparser languages. Set PAPERLESS_DATE_PARSER_LANGUAGES parameter to avoid this. Detail: {e}",
|
||||||
)
|
)
|
||||||
return []
|
return []
|
||||||
if not result:
|
if not result:
|
||||||
logger.info(
|
logger.warning(
|
||||||
"Unable to automatically determine dateparser languages from OCR_LANGUAGE, falling back to multi-language support.",
|
"Could not configure any dateparser languages from OCR_LANGUAGE — fallback to autodetection.",
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user