open-consul/ui/packages/consul-ui/app/components/consul/sources-select/index.hbs

26 lines
726 B
Handlebars
Raw Normal View History

{{#if (gt @sources.length 0)}}
<BlockSlot @name='selected'>
<span>
{{t 'common.search.source'}}
</span>
</BlockSlot>
<BlockSlot @name='options'>
{{#let @components.Option as |Option|}}
{{#each @sources as |source|}}
{{#let (icon-mapping source) as |flightIcon|}}
<Option
class={{unless flightIcon source}}
@value={{source}}
@selected={{includes source @filter.source.value}}
>
{{#if flightIcon}}
<FlightIcon @name={{flightIcon}} class='mr-2.5' />
{{/if}}
{{t (concat 'common.brand.' source)}}
</Option>
{{/let}}
{{/each}}
{{/let}}
</BlockSlot>
{{/if}}