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, estimateBrightnessForColor,
hexToHsl, hexToHsl,
} from 'src/app/utils/color' } 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 { DEFAULT_DISPLAY_FIELDS, DisplayField } from '../data/document'
import { SavedView } from '../data/saved-view' import { SavedView } from '../data/saved-view'
import { import {
@@ -359,9 +359,8 @@ export class SettingsService {
}), }),
tap((uisettings) => { tap((uisettings) => {
this.assignSafeSettings(uisettings.settings) this.assignSafeSettings(uisettings.settings)
if (this.get(SETTINGS_KEYS.APP_TITLE)?.length) { environment.appTitle =
environment.appTitle = this.get(SETTINGS_KEYS.APP_TITLE) this.get(SETTINGS_KEYS.APP_TITLE) || DEFAULT_APP_TITLE
}
this.maybeMigrateSettings() this.maybeMigrateSettings()
// to update lang cookie // to update lang cookie
if (this.settings['language']?.length) if (this.settings['language']?.length)
+3 -1
View File
@@ -1,10 +1,12 @@
const base_url = new URL(document.baseURI) const base_url = new URL(document.baseURI)
export const DEFAULT_APP_TITLE = 'Paperless-ngx'
export const environment = { export const environment = {
production: true, production: true,
apiBaseUrl: document.baseURI + 'api/', apiBaseUrl: document.baseURI + 'api/',
apiVersion: '10', // match src/paperless/settings.py apiVersion: '10', // match src/paperless/settings.py
appTitle: 'Paperless-ngx', appTitle: DEFAULT_APP_TITLE,
tag: 'prod', tag: 'prod',
version: '3.0.0', version: '3.0.0',
webSocketHost: window.location.host, webSocketHost: window.location.host,
+3 -1
View File
@@ -2,11 +2,13 @@
// `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`. // `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`. // The list of file replacements can be found in `angular.json`.
export const DEFAULT_APP_TITLE = 'Paperless-ngx'
export const environment = { export const environment = {
production: false, production: false,
apiBaseUrl: 'http://localhost:8000/api/', apiBaseUrl: 'http://localhost:8000/api/',
apiVersion: '10', apiVersion: '10',
appTitle: 'Paperless-ngx', appTitle: DEFAULT_APP_TITLE,
tag: 'dev', tag: 'dev',
version: 'DEVELOPMENT', version: 'DEVELOPMENT',
webSocketHost: 'localhost:8000', webSocketHost: 'localhost:8000',