Rename to general config
This commit is contained in:
parent
2cd993204c
commit
7b8543fce8
@ -46,8 +46,8 @@ export enum ConfigOptionType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const ConfigCategory = {
|
export const ConfigCategory = {
|
||||||
|
General: $localize`General Settings`,
|
||||||
OCR: $localize`OCR Settings`,
|
OCR: $localize`OCR Settings`,
|
||||||
Frontend: $localize`Frontend Settings`,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ConfigOption {
|
export interface ConfigOption {
|
||||||
@ -170,7 +170,7 @@ export const PaperlessConfigOptions: ConfigOption[] = [
|
|||||||
title: $localize`Application Title`,
|
title: $localize`Application Title`,
|
||||||
type: ConfigOptionType.String,
|
type: ConfigOptionType.String,
|
||||||
config_key: 'PAPERLESS_APP_TITLE',
|
config_key: 'PAPERLESS_APP_TITLE',
|
||||||
category: ConfigCategory.Frontend,
|
category: ConfigCategory.General,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ from documents.serialisers import WorkflowTriggerSerializer
|
|||||||
from documents.signals import document_updated
|
from documents.signals import document_updated
|
||||||
from documents.tasks import consume_file
|
from documents.tasks import consume_file
|
||||||
from paperless import version
|
from paperless import version
|
||||||
from paperless.config import FrontendConfig
|
from paperless.config import GeneralConfig
|
||||||
from paperless.db import GnuPG
|
from paperless.db import GnuPG
|
||||||
from paperless.views import StandardPagination
|
from paperless.views import StandardPagination
|
||||||
|
|
||||||
@ -1166,12 +1166,11 @@ class UiSettingsView(GenericAPIView):
|
|||||||
"backend_setting": settings.ENABLE_UPDATE_CHECK,
|
"backend_setting": settings.ENABLE_UPDATE_CHECK,
|
||||||
}
|
}
|
||||||
|
|
||||||
frontend_config = FrontendConfig()
|
general_config = GeneralConfig()
|
||||||
|
|
||||||
if settings.APP_TITLE is not None:
|
|
||||||
ui_settings["app_title"] = settings.APP_TITLE
|
ui_settings["app_title"] = settings.APP_TITLE
|
||||||
if frontend_config.app_title is not None and len(frontend_config.app_title) > 0:
|
if general_config.app_title is not None and len(general_config.app_title) > 0:
|
||||||
ui_settings["app_title"] = frontend_config.app_title
|
ui_settings["app_title"] = general_config.app_title
|
||||||
|
|
||||||
user_resp = {
|
user_resp = {
|
||||||
"id": user.id,
|
"id": user.id,
|
||||||
|
@ -99,9 +99,9 @@ class OcrConfig(OutputTypeConfig):
|
|||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
class FrontendConfig(BaseConfig):
|
class GeneralConfig(BaseConfig):
|
||||||
"""
|
"""
|
||||||
Frontend application settings that require global scope
|
General application settings that require global scope
|
||||||
"""
|
"""
|
||||||
|
|
||||||
app_title: str = dataclasses.field(init=False)
|
app_title: str = dataclasses.field(init=False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user