Feature: app branding (#5357)

This commit is contained in:
shamoon
2024-01-13 11:57:25 -08:00
committed by GitHub
parent 2da5e46386
commit 2a6e79acc8
34 changed files with 675 additions and 118 deletions

View File

@@ -43,9 +43,11 @@ export enum ConfigOptionType {
Select = 'select',
Boolean = 'boolean',
JSON = 'json',
File = 'file',
}
export const ConfigCategory = {
General: $localize`General Settings`,
OCR: $localize`OCR Settings`,
}
@@ -164,6 +166,20 @@ export const PaperlessConfigOptions: ConfigOption[] = [
config_key: 'PAPERLESS_OCR_USER_ARGS',
category: ConfigCategory.OCR,
},
{
key: 'app_logo',
title: $localize`Application Logo`,
type: ConfigOptionType.File,
config_key: 'PAPERLESS_APP_LOGO',
category: ConfigCategory.General,
},
{
key: 'app_title',
title: $localize`Application Title`,
type: ConfigOptionType.String,
config_key: 'PAPERLESS_APP_TITLE',
category: ConfigCategory.General,
},
]
export interface PaperlessConfig extends ObjectWithId {
@@ -180,4 +196,6 @@ export interface PaperlessConfig extends ObjectWithId {
max_image_pixels: number
color_conversion_strategy: ColorConvertConfig
user_args: object
app_logo: string
app_title: string
}

View File

@@ -14,6 +14,8 @@ export interface UiSetting {
export const SETTINGS_KEYS = {
LANGUAGE: 'language',
APP_LOGO: 'app_logo',
APP_TITLE: 'app_title',
// maintain old general-settings: for backwards compatibility
BULK_EDIT_CONFIRMATION_DIALOGS:
'general-settings:bulk-edit:confirmation-dialogs',
@@ -194,4 +196,14 @@ export const SETTINGS: UiSetting[] = [
type: 'array',
default: [],
},
{
key: SETTINGS_KEYS.APP_LOGO,
type: 'string',
default: '',
},
{
key: SETTINGS_KEYS.APP_TITLE,
type: 'string',
default: '',
},
]