Skip to content

Commit

Permalink
wc: add Variant Browser to primary bar
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Jan 10, 2025
1 parent 9e6ab87 commit 7fb17aa
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/webcomponents/commons/layout/layout-primary-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ export default class LayoutPrimaryBar extends LitElement {
renderStudiesDropdown() {
if (this.opencgaSession?.projects?.length > 0) {
// Note: in the study selection we only display projects with at least one study
const visibleProjects = this.opencgaSession.projects.filter(project => {
return project?.studies?.length > 0;
});
const visibleProjects = this.opencgaSession.projects
.filter(project => {
return project?.studies?.length > 0;
});
return html`
<div class="d-flex dropdown" title="Projects and Studies">
<button class="btn d-flex align-items-center gap-1 border border-gray-700 hover:bg-gray-800 text-white dropdown-toggle" data-bs-toggle="dropdown">
Expand Down Expand Up @@ -124,6 +125,11 @@ export default class LayoutPrimaryBar extends LitElement {
${this.renderStudiesDropdown()}
${this.renderSeparator()}
<div class="d-flex">
<a href="#research/variant-browser" class="d-flex align-items-center btn border border-gray-700 hover:bg-gray-800 text-white">
<i class="fas fa-dna lh-1"></i>
</a>
</div>
<div class="d-flex">
<a href="#research/file-data-manager" class="d-flex align-items-center btn border border-gray-700 hover:bg-gray-800 text-white">
<i class="fas fa-folder lh-1"></i>
Expand Down Expand Up @@ -178,7 +184,7 @@ export default class LayoutPrimaryBar extends LitElement {
<hr class="dropdown-divider">
<a class="dropdown-item cursor-pointer" data-user-menu="logout" @click="${() => this.logout()}">
<i class="fa fa-sign-out-alt me-1"></i>
<span>Log out</span>
<span>Sign out</span>
</a>
</div>
</div>
Expand Down

0 comments on commit 7fb17aa

Please sign in to comment.