tweak username display, dropdown size + spacing

This commit is contained in:
Michael Shamoon
2020-12-31 16:23:08 -08:00
parent be7bf5288b
commit f090537ef4
3 changed files with 49 additions and 14 deletions

View File

@@ -9,7 +9,8 @@ import { SavedViewService } from 'src/app/services/rest/saved-view.service';
import { SearchService } from 'src/app/services/rest/search.service';
import { environment } from 'src/environments/environment';
import { DocumentDetailComponent } from '../document-detail/document-detail.component';
import { Meta } from '@angular/platform-browser';
@Component({
selector: 'app-app-frame',
templateUrl: './app-frame.component.html',
@@ -22,8 +23,11 @@ export class AppFrameComponent implements OnInit, OnDestroy {
private activatedRoute: ActivatedRoute,
private openDocumentsService: OpenDocumentsService,
private searchService: SearchService,
public savedViewService: SavedViewService
public savedViewService: SavedViewService,
private meta: Meta
) {
console.log(meta);
}
versionString = `${environment.appTitle} ${environment.version}`
@@ -55,7 +59,7 @@ export class AppFrameComponent implements OnInit, OnDestroy {
term.length < 2 ? from([[]]) : this.searchService.autocomplete(term)
)
)
itemSelected(event) {
event.preventDefault()
let currentSearch: string = this.searchField.value
@@ -98,4 +102,17 @@ export class AppFrameComponent implements OnInit, OnDestroy {
}
}
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
}
}
}