2020-10-15 20:03:18 +03:00
|
|
|
{{#each @itemSections as |section sectionIndex|}}
|
|
|
|
{{#if section.items}}
|
|
|
|
{{#if (or (not section.developerExperiment) (enable-developer-experiments))}}
|
2021-03-09 11:12:24 +03:00
|
|
|
<div class="flex flex-column justify-center flex-shrink-0 {{unless (eq sectionIndex 0) "mt3 bt b--whitegrey"}} mb2 pl4 pr4 pt3 midlightgrey ttu f-supersmall fw5 tracked-3" style="min-width: calc(100% - 3.2rem);">
|
2020-10-15 20:03:18 +03:00
|
|
|
{{section.title}}
|
2020-04-06 12:56:40 +03:00
|
|
|
</div>
|
2020-10-15 20:03:18 +03:00
|
|
|
{{#each section.items as |item|}}
|
2021-09-10 11:24:38 +03:00
|
|
|
{{#if (card-is-available item postType=@postType)}}
|
2020-10-26 20:09:09 +03:00
|
|
|
<div
|
|
|
|
class="{{if (eq item @selectedItem) "kg-cardmenu-card-selected"}} {{kg-style "cardmenu-card"}}"
|
|
|
|
data-kg="cardmenu-card"
|
|
|
|
role="menuitem"
|
2020-10-27 17:48:39 +03:00
|
|
|
title="{{item.label}}"
|
2020-10-26 20:09:09 +03:00
|
|
|
{{on "click" (fn @itemClicked item)}}
|
2020-10-27 19:15:58 +03:00
|
|
|
{{did-update this.scrollIntoView (eq item @selectedItem)}}
|
2020-10-26 20:09:09 +03:00
|
|
|
>
|
2020-10-23 11:36:03 +03:00
|
|
|
<div class="{{kg-style "cardmenu-icon"}} {{item.iconClass}}" aria-hidden="true">{{svg-jar item.icon class="w7 h7"}}</div>
|
2020-11-16 19:34:32 +03:00
|
|
|
<div class="{{kg-style "cardmenu-text"}}">
|
|
|
|
<div class="{{kg-style "cardmenu-label"}}">{{item.label}}</div>
|
|
|
|
<div class="{{kg-style "cardmenu-desc"}}">{{item.desc}}</div>
|
|
|
|
</div>
|
2020-10-26 20:09:09 +03:00
|
|
|
{{#if item.deleteClicked}}
|
|
|
|
<span class="kg-cardmenu-action-icon" {{on "click" item.deleteClicked}}>{{svg-jar "trash"}}</span>
|
|
|
|
{{/if}}
|
2020-10-15 20:03:18 +03:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
2020-04-06 12:56:40 +03:00
|
|
|
{{/if}}
|
2020-10-15 20:03:18 +03:00
|
|
|
{{/if}}
|
2018-06-07 13:34:50 +03:00
|
|
|
{{/each}}
|