Properly get username & display name

This commit is contained in:
Michael Shamoon
2022-05-09 11:08:28 -07:00
parent 96f86adfb8
commit bcb9c6ccb0
6 changed files with 23 additions and 38 deletions

View File

@@ -23,6 +23,7 @@ import {
AppRemoteVersion,
} from 'src/app/services/rest/remote-version.service'
import { QueryParamsService } from 'src/app/services/query-params.service'
import { SettingsService } from 'src/app/services/settings.service'
@Component({
selector: 'app-app-frame',
@@ -36,10 +37,9 @@ export class AppFrameComponent {
private openDocumentsService: OpenDocumentsService,
private searchService: SearchService,
public savedViewService: SavedViewService,
private list: DocumentListViewService,
private meta: Meta,
private remoteVersionService: RemoteVersionService,
private queryParamsService: QueryParamsService
private queryParamsService: QueryParamsService,
public settingsService: SettingsService
) {
this.remoteVersionService
.checkForUpdates()
@@ -143,17 +143,4 @@ export class AppFrameComponent {
}
})
}
get displayName() {
// TODO: taken from dashboard component, is this the best way to pass around username?
let tagFullName = this.meta.getTag('name=full_name')
let tagUsername = this.meta.getTag('name=username')
if (tagFullName && tagFullName.content) {
return tagFullName.content
} else if (tagUsername && tagUsername.content) {
return tagUsername.content
} else {
return null
}
}
}