mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 16:42:17 +03:00
63b1e4e8ad
no issue - in many places we were passing a string as an argument to a `<PowerSelect>` related component that referred to a component name, that was throwing deprecation warnings because those strings were used dynamically with `{{component}}` later on which isn't statically analyzable - switched to passing a component explicitly with `{{component}}` - https://github.com/embroider-build/embroider/blob/main/REPLACING-COMPONENT-HELPER.md#when-youre-passing-a-component-to-someone-else
35 lines
1.2 KiB
Handlebars
35 lines
1.2 KiB
Handlebars
<GhTokenInput
|
|
@extra={{hash
|
|
tokenComponent=(component "gh-token-input/label-token")
|
|
}}
|
|
@class="gh-member-label-input"
|
|
@onChange={{this.updateLabels}}
|
|
@onCreate={{this.createLabel}}
|
|
@options={{this.availableLabels}}
|
|
@renderInPlace={{true}}
|
|
@selected={{this.selectedLabels}}
|
|
@showCreateWhen={{this.hideCreateOptionOnMatchingLabel}}
|
|
@triggerId={{this.triggerId}}
|
|
@selectedItemComponent={{component "gh-token-input/label-selected-item"}}
|
|
@disabled={{@disabled}}
|
|
@allowCreation={{@allowCreation}}
|
|
as |label|
|
|
>
|
|
<div style="display: flex">
|
|
<span
|
|
class="dropdown-label"
|
|
style="flex-grow: 1"
|
|
title="{{label.name}}"
|
|
data-test-label-filter={{label.name}}>
|
|
{{label.name}}
|
|
</span>
|
|
{{#if (and @allowEdit label.slug)}}
|
|
<button type="button" class="gh-btn-icon dropdown-action-icon" {{on "mouseup" (fn this.editLabel label)}} aria-label="Edit label {{label.name}}" data-test-edit-label={{label.name}}>
|
|
<span>
|
|
{{svg-jar "pen"}}
|
|
</span>
|
|
</button>
|
|
{{/if}}
|
|
</div>
|
|
</GhTokenInput>
|