mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-12 00:19:48 +00:00
Feature: app branding (#5357)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import { Component, Input } from '@angular/core'
|
||||
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
|
||||
import { SettingsService } from 'src/app/services/settings.service'
|
||||
import { environment } from 'src/environments/environment'
|
||||
|
||||
@Component({
|
||||
selector: 'pngx-logo',
|
||||
@@ -12,6 +15,17 @@ export class LogoComponent {
|
||||
@Input()
|
||||
height = '6em'
|
||||
|
||||
get customLogo(): string {
|
||||
return this.settingsService.get(SETTINGS_KEYS.APP_LOGO)?.length
|
||||
? environment.apiBaseUrl.replace(
|
||||
/\/api\/$/,
|
||||
this.settingsService.get(SETTINGS_KEYS.APP_LOGO)
|
||||
)
|
||||
: null
|
||||
}
|
||||
|
||||
constructor(private settingsService: SettingsService) {}
|
||||
|
||||
getClasses() {
|
||||
return ['logo'].concat(this.extra_classes).join(' ')
|
||||
}
|
||||
|
Reference in New Issue
Block a user