Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: render custom icon component for extensions in header #47

Merged
merged 1 commit into from
Apr 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions addon/components/layout/header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
{{#each @menuItems as |menuItem|}}
<LinkToExternal @route={{menuItem.route}} id={{concat (dasherize menuItem.route) "-header-button"}} class="next-view-header-item truncate {{menuItem.class}}" role="menuitem">
<div class="w-6">
<FaIcon @icon={{menuItem.icon}} @size="sm" />
{{#if menuItem.iconComponent}}
{{component menuItem.iconComponent options=menuItem.iconComponentOptions}}
{{else}}
<FaIcon @icon={{menuItem.icon}} @prefix={{menuItem.iconPrefix}} @size="sm" />
{{/if}}
</div>
<div>
<span>{{menuItem.title}}</span>
Expand All @@ -20,17 +24,18 @@
{{/each}}
</div>
{{/unless}}
<div id="view-header-left-content-a">
</div>
<div id="view-header-left-content-a"></div>
{{yield}}
<div id="view-header-left-content-b"></div>
</div>
<div class="next-view-header-right">
<Layout::Header::LoadingIndicator />
<div id="view-header-actions"></div>
<div class="flex items-center justify-between">
<div class="flex-1 flex items-center pr-1">
<div class="flex-1 flex items-center pr-1 space-x-1">
<LocaleSelectorTray />
<NotificationTray @registerAPI={{@registerNotificationTrayApi}} @onClickNotification={{@onClickNotification}} />
<ChatTray />
</div>
<div class="flex-1 flex items-center pr-1">
<Layout::Header::Dropdown @items={{this.organizationNavigationItems}} @onAction={{@onAction}} class="flex-shrink-0" @triggerClass="flex-shrink-0" as |dd|>
Expand Down
Loading