Fix: fix app title restoration (#13208)

This commit is contained in:
shamoon
2026-07-22 18:53:45 -07:00
committed by GitHub
parent afb19fe637
commit 6e052d5507
3 changed files with 9 additions and 6 deletions
+3 -4
View File
@@ -17,7 +17,7 @@ import {
estimateBrightnessForColor,
hexToHsl,
} from 'src/app/utils/color'
import { environment } from 'src/environments/environment'
import { DEFAULT_APP_TITLE, environment } from 'src/environments/environment'
import { DEFAULT_DISPLAY_FIELDS, DisplayField } from '../data/document'
import { SavedView } from '../data/saved-view'
import {
@@ -359,9 +359,8 @@ export class SettingsService {
}),
tap((uisettings) => {
this.assignSafeSettings(uisettings.settings)
if (this.get(SETTINGS_KEYS.APP_TITLE)?.length) {
environment.appTitle = this.get(SETTINGS_KEYS.APP_TITLE)
}
environment.appTitle =
this.get(SETTINGS_KEYS.APP_TITLE) || DEFAULT_APP_TITLE
this.maybeMigrateSettings()
// to update lang cookie
if (this.settings['language']?.length)
+3 -1
View File
@@ -1,10 +1,12 @@
const base_url = new URL(document.baseURI)
export const DEFAULT_APP_TITLE = 'Paperless-ngx'
export const environment = {
production: true,
apiBaseUrl: document.baseURI + 'api/',
apiVersion: '10', // match src/paperless/settings.py
appTitle: 'Paperless-ngx',
appTitle: DEFAULT_APP_TITLE,
tag: 'prod',
version: '3.0.0',
webSocketHost: window.location.host,
+3 -1
View File
@@ -2,11 +2,13 @@
// `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const DEFAULT_APP_TITLE = 'Paperless-ngx'
export const environment = {
production: false,
apiBaseUrl: 'http://localhost:8000/api/',
apiVersion: '10',
appTitle: 'Paperless-ngx',
appTitle: DEFAULT_APP_TITLE,
tag: 'dev',
version: 'DEVELOPMENT',
webSocketHost: 'localhost:8000',